Contributions
Shaping the tools I use every day, one pull request at a time
A hand-picked selection: only the contributions worth reading about, not every merged pull request.
Group the Ordered Products report by SKU — on GitHub
Every variation of a configurable product collapsed into one row, so a merchant could see the product sold but never which size or colour. Grouping by SKU, with an index added to keep the query in check.
Get rid of array_merge inside loops — on GitHub
foreach () { $x = array_merge($x, ...); } reallocates the whole array on every iteration — quadratic by construction. Rewritten across 42 files.
Fix the random autoloader failure in integration tests — on GitHub
Integration runs failed intermittently with Call to a member function findFile() on array whenever the autoloader had not been registered as expected. The kind of flake that gets rerun for months instead of read.
Add the <magentoCron> test action — on GitHub
Functional tests waited on real cron or faked it with CLI calls. A first-class action that runs cron groups and respects the 60-second interval between runs of the same group.
Refactor the TestGenerator class — on GitHub
The class that turns XML tests into PHP was the least readable and one of the slowest parts of the framework. Same output, far less to hold in your head.
Stop one unit test sleeping 30 seconds on every run — on GitHub
ConsumerRunnerTest took 30.002 seconds, of which 30 were a hardcoded sleep. The interval is now injected and set to zero in the test — everyone running the unit suite locally got those 30 seconds back.
Make the missing EAV attribute warning aggregatable — on GitHub
Reindex logged a padded multi-line warning per missing attribute, so every entry was a unique string and no log tool could group them. Short message, attribute id and entity type moved into the log context.
Name New Relic transactions after the CLI command — on GitHub
Every CLI run — reindex, cron, import — landed in New Relic under one anonymous transaction, so you could see that something was slow but never which command. Now the command name is the transaction name.
Document the non-deprecated way to add a customer EAV attribute — on GitHub
Magento 2.1 deprecated $attribute->save() and $attribute->getResource(), but every tutorial and Stack Overflow answer still used them for used_in_forms. Added the section showing the current approach.
Only merged work is listed here, and only the parts worth a comment — the full history, including everything still in review, lives on GitHub.
With
image_widthandimage_heightmissing from the image parameters,getRatioproduced a fatal error rather than a missing thumbnail. Values now fall back to zero, covered by a unit test.