You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/posts/2013-04-25-easy-digital-downloads-receipt-bcc.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
---
2
+
title: Easy Digital Downloads Receipt BCC
2
3
summary: Earlier this evening Pippin, author of Easy Digital Downloads tweeted about an idea for a simple little plugin to extend EDD's customer receipts
Copy file name to clipboardExpand all lines: src/posts/2013-06-11-using-guard-phpunit-with-composer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Using guard-phpunit with composer
2
+
title: Using Guard-phpunit with Composer
3
3
---
4
4
5
5
While reading through a book on unit testing with PHP I ran into a few issues using guard with phpunit. This article guides me (and maybe you) through the process of installing & configuring guard with PHPUnit.
Copy file name to clipboardExpand all lines: src/posts/2013-11-12-anchor-cms-in-laravel-part-1.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
---
2
+
title: Anchor CMS in Laravel Part One
2
3
summary: Part 1 of building AnchorCMS in Laravel. I really like AnchorCMS, its super clean and simple and I like the extensibility of Laravel. Can we combine the two?
Copy file name to clipboardExpand all lines: src/posts/2023-02-11-dev-diaries-episode-1.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ We could just risk it and fix problems as we discover them but that sounds like
32
32
33
33
A few years ago my friend [Tom](https://www.tomseldon.co.uk) created a section in the app for dev tooling to live which is super handy. A new tool was added which had one job…
34
34
35
-
## The Task
35
+
## The task
36
36
37
37
For every topic downloaded in the app, first run all the transformers split between old and new, then compare them! If they match then great carry on. If they don't match then stop and show where they differ in something thats easy to use.
38
38
@@ -42,7 +42,7 @@ We'd also need to test this against other content languages such as Spanish. Dif
42
42
43
43
Ok well to build this we have to solve a few problems along the way.
44
44
45
-
## Problem 1: How to Flip Between Old and New Transformers
45
+
## Problem #1: How to flip ­between old and new transformers?
46
46
47
47
First up we want to restrict how much code we have to write at once before we can get to testing. The transformation layer is sits below the repository layer so thats where we need to switch between old and new transformers. Each repository extends a `BaseRepository` class which contains some helper methods that all repositories can use.
48
48
@@ -70,7 +70,7 @@ find (topicId) {
70
70
71
71
Cool thats the first problem sorted, we can now toggle between old and new transformers 🙌
72
72
73
-
## Problem 2: How Can We Toggle the Feature on Demand
73
+
## Problem #2: How can we ­toggle the feature on demand?
74
74
75
75
In the past our feature flag looked at the state from two sources, either remotely via firebase or locally via the codebase depending on the type of flag it was. This is fine 99% of the time but for our tool we wanted to be able to toggle the feature at runtime, otherwise we'd be comparing the same transformer against itself 🤦♂️
76
76
@@ -100,7 +100,7 @@ Cool, so this allows us to change the state of a flag whenever we want. A nice b
100
100
101
101

102
102
103
-
## Making the Page
103
+
## Making the page
104
104
105
105
Ok so the page is actually pretty simple, it's just some text that describes what it does and a button that starts the testing.
106
106
@@ -228,7 +228,7 @@ This is pretty similar to the mock code earlier. We disable the flag, test, enab
228
228
229
229
If they don't match we throw an error with the repository and topic that failed. Also we log to the console both old and new JSON so we can dig into it and see whats up.
230
230
231
-
### Quality of Life Extras
231
+
### Quality of life extras
232
232
233
233
We're more or less done with the tool now which is great news but I wanted to add a few extra things just to make life using the tool a bit nicer. As it stands if there was a difference in the output between transformers it would be pretty tricky to know exactly where that difference is, these objects are often quite big and heavily nested!
Copy file name to clipboardExpand all lines: src/posts/2023-04-23-dev-diaries-episode-2.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Lessons Learned the Hard Way With Dependencies
2
+
title: Lessons Learned the Hard Way with Dependencies
3
3
summary: Learning the hard way that sometimes it's better to build your own than to struggle with existing tools
4
4
tags:
5
5
- Dev Diaries
@@ -25,17 +25,17 @@ Theres a lot that some dependencies offer. They're often authored by multiple pe
25
25
26
26
But be careful. It's worth taking the time to look at the dependencies available to you. Look at the common things like:
27
27
28
-
-How many authors are there?
29
-
-Whats the activity like on the repository?Is there a lot of recent action or has it been untouched for years? This might not be a bad thing if the dependency does what it needs to and has no bugs but it could also be a sign of a dead project.
30
-
-Whats the license like?Can you even use this dependency? Is there a fee you need to pay?
28
+
-_How many authors are there?_
29
+
-_Whats the activity like on the repository?_ <br/>Is there a lot of recent action or has it been untouched for years? This might not be a bad thing if the dependency does what it needs to and has no bugs but it could also be a sign of a dead project.
30
+
-_Whats the license like?_ <br/>Can you even use this dependency? Is there a fee you need to pay?
31
31
32
-
But there are also more nuanced things to look at, personal to you and your team / project.
32
+
There are also more nuanced things to look at, personal to you, your team & project.
33
33
34
-
Check out the code. How much of what it does is relevant to your needs? For example the dependency we were using was complaint to the entire OpenID Connect spec. We only needed the Authorization Code flow so a lot of the code in the dependency was redundant. When it came to something being wrong we had a lot of irrelevant code to comb through to understand what was going on.
34
+
Check out the code. How much of what it does is relevant to your needs? For example our dependency included code for the entire OpenID Connect spec. We only needed the Authorization Code flow so a lot of the code in the dependency was redundant. During debugging this meant we had a lot of irrelevant code to comb through to understand what was going on.
35
35
36
-
If you do need to tweak, can you? Without it being a bit of a pain in the bum. Some dependencies that are a bit larger make use of adapter / strategy patterns that allow you to write custom code that adheres to an interface the dependency asks for. If you can't is it patchable?
36
+
If you do need to tweak, can you? Without it being a bit of a pain in the bum. Some dependencies that are a bit larger make use of adapter / strategy patterns that allow you to write custom code that adheres to an interface. If you can't, is it patchable?
37
37
38
-
Lastly should you need to switch to something else, what options are available to you? Are you spoilt for choice or is it more slim pickings? If its the latter how confident are you in being able to replace it with something you've written?
38
+
Lastly should you need to switch to something else, what options are available to you? Are you spoilt for choice or is it slim pickings? If its the latter how confident are you in being able to replace it with something you've written?
39
39
40
40
As for us, we're on the road towards writing our own package. It's a slow process but we're getting there, cobbling together knowledge from specs and other projects to build something that works for us.
0 commit comments