Magento 2: Adding Arbitrary HTML to the of Every Page? This developer tried to embrace the new <head/> and <body/> standards in Magento 2’s layout, and you won’t belive what happens next. Spoilers – what happens next is he learns the <head/> directive has no way to add arbitary HTML, but that adding [...]
astorm
The error Parse error: syntax error, unexpected ’)’, expecting ’&’ or variable (T_VARIABLE) in is by far te most common thing I’m seeing during Magento 2 development. Its root cause? public function __construct( MagentoFrameworkAppRequestInterface $requestInterface, ) I’m injecting a dependency by [...]
astorm
eBayEnterprise/magento-log An interesting Magento 1 project that creates a PSR 1 wrapper for Magento 1 logging. Useful if there’s a tool/library out there expecting a PSR logging interface that you want to use with Magento 1.
astorm
I ran into this error Fatal error: Call to a member function getId() on a non-object in /path/to/magento/lib/internal/Magento/Framework/View/Model/Layout/Merge.php on line 745 after loading a new system’s MySQL database into my local development environment. Magento 2’s theme settings allow you to pick a specific theme from a [...]
astorm
Magento 2: Sending a Custom Header/Response from a Controller This one’s an interesting example of the challenges faced when refactoring legacy code, as well as the limitations of what a “classical OOP” approach can do for you in a PHP enviornment. First, this answer, while correct in the fact that it works, is not [...]
astorm