Open Source
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. Articles about Magento and Adobe Commerce are on the blog.
Copy integrity and crossorigin to script preload tags — on GitHub
With Subresource Integrity in Magento 2.4.7+, script tags carry integrity and crossorigin, but the generated <link rel="preload" as="script"> carried neither. The browser could not match the preload to the script, discarded it and fetched the script twice. LinkParser now copies both attributes from the source tag.
Send the current store ID as the magento_store_id parameter — on GitHub
The magento_store_id custom parameter sent to New Relic was always empty, because the observer base class injected the bare Store model, which is never loaded for a store. It now injects StoreManagerInterface and reads the ID from the current store.
Warn about missing online rates based on the online rates — on GitHub
Check::execute() tested the stored rates before logging No online rates found, so an empty or failed feed never produced that warning and a store without stored rates got a misleading second one. The condition now tests the online rates, with unit tests for both cases.
Accept the websites scope in theme:change and fix swapped columns in theme:design_config — on GitHub
theme:change <theme> websites <id> always failed the scope check although websites is the name Magento stores, and theme:design_config printed names and IDs in the opposite order to its table headers. The whitelist now lists websites and the rows follow the header order.
Remove deprecated ReflectionProperty::setAccessible() calls for PHP 8.5 — on GitHub
On PHP 8.5 setAccessible() is deprecated, and Magento 2.4.9 turns every deprecation into an exception. That broke REST base64 image uploads and customer file uploads, and made the suspicious media path guard skip its check on every request. The three calls are removed.
Add Magento compatibility checks with GitHub Actions — on GitHub
One GitHub Actions workflow checks every pull request and push: Composer validation, PHP lint, the Magento coding standard, setup:di:compile, static content deployment, the unit tests and PHPStan, on the latest patch of each supported Magento Open Source release at its lowest and highest PHP version. The release list refreshes on every run, so a new Magento or PHP version is tested without a workflow change.
Track product clicks when the form has no product input — on GitHub
On Hyvä, clicking a product link inside a form without input[name="product"] threw a TypeError and no select_item event was pushed. The product id now falls back to the numeric suffix of the closest product-item-info_<id> wrapper, as the Luma clicks.js does, and the push is skipped only when neither source gives an id.
Resolve data layer tag classes when read, not when parsed — on GitHub
Tags declared as xsi:type="object" in data_layer.xml were instantiated while the XML was converted, and the result sat in a config cache entry shared by all store views. A store-dependent tag such as CurrencyCode kept the value of whichever store view warmed the cache. The converter now stores only the class name and XmlConfig resolves it per store view on read.
Apply the configured SameSite to cookies written by storefront JavaScript — on GitHub
With SameSite set to None only the session cookie followed the setting, while form_key and the other cookies written by core JavaScript stayed Lax. A small template now sets window.cookiesConfig.samesite from the configuration, emitting None only when the session cookie is secure.
Only merged work is listed here, and only the parts worth a comment — the full history, including everything still in review, lives on GitHub .
bin/magento yireo_emailtester2:send --product_id=<id>ignored the option, because the command read the product ID from thecustomer_idoption. The email used the customer ID as the product, or the configured default product when no customer was given.SendCommand::execute()now readsproduct_id.