These are my blog posts, where I talk about stuff
This is purely a listicle of stuff I did this year which I thought was awesome. It’s somewhat verbose and not particularly well written, but one of my goals in 2019 is to try and waste less time endlessly re-drafting blog posts.
We use vimeo/psalm, an exceptional static analyzer for PHP. It’s amazing and I think
every PHP project should be using it. It also has an extra option
--find-dead-code that has Psalm report issues
Because you got beyond the clickbaity title, you’re rewarded with a TLDR:
TLDR: I’ll be shutting down PiggyBike at the end of the year.
We use Symfony Functional Tests extensively to test the APIs we build for our application. By being able to replicate an entire HTTP request and run actual database queries against fixtures in SQLite generated with Faker, we get fast, repeatable tests that give us confidence our application works as expected.
Recently, I was refactoring some legacy code that was incredibly complex (integer overflow on the N-path complexity score) and with no tests around it. It also was a significant part of the product that provided the core value to our customers. We wanted to decompose a big fat controller into some smaller logical services so we could reason with what was happening and migrate some components to reuse other parts of the system. Even though it was fairly trivial work, it can easily be seen as a risky activity and required a pretty thorough code review.