Adventures in software engineering

Code smells in PHP - Don't repeat yourself

Code smells allow us to spot traits in our code that may not stop it doing its job, but may indicate deeper rooted problems with the design of the code. I like the concept of code smells because it gives me a simple list of tells I can easily spot in my code which help improve the maintanability of that code. In this series we’ll go through some common code smells, why they’re bad, how to spot them and how to remove them from the codebase.

Continue Reading

Include a composer package as a git repository

Sometimes, you want to see how a composer package affects the including project as you make changes. But making changes to the package, committing, pushing and then pulling down the updated package can be a painful process. Luckily, composer allows us to specify that we’d like to pull down the full repository for specific packages. We are then able to modify this repo and see our changes instantly before committing anything.

Continue Reading