When I started work on pestle’s Magento 2 code generation, I deliberately left the the <preference/> feature of Magento’s di.xml files off the list of commands. This was, in short, to help encourage the use of plugins over preferences. i.e. to encourage developers to use the system that allowed multiple extensions to [...]
astorm
This one’s more interesting than it is useful (or its main use is as a debugging exercise), but while I was working on a UI Component tutorial I wanted to turn off the XSD validation for ui_component files. It turns out there’s a dedicated object that can control whether the XSD validations are applied [...]
astorm
For folks using pestle, my PHP command line frameworking + Magento code generation tool, I’ve just added a selfupdate command. This will make a backup of your current version, grab the latest version, and update your local copy (permissions allowing, of course) $ pestle.phar selfupdate Downloaded to /private/tmp/pestle_DZOXou [...]
astorm
If you're new to PHP, you may find the concept of autoloading a little confusing. When PHP first introduced classes, there was no defined way to load class definition files — end-user-programmers were expected to use require and include to pull in the classes definitions
astorm
If you're following along over on the Pulse Storm blog, you'll know we've just released Commerce bug 3.1. This is mostly a bug fix/Magento 2.1 compatibility release, but there are a few new features hidden beneath the surface.
astorm
One of the big changes for Magento 2 developers is the introduction of a formal, "semantic versioning" system to the platform. If you're a Magento developer and this comes as news to you, don't feel bad. Although there's been plenty of talk about the
astorm
I'm happy to announce the immediate availability of the Pulse Storm Launcher UI enhancement for WordPress, including integrations with WooCommerce and WP eCommerce. The source is currently available on GitHub, and I'm hoping to carve out some time to get it submitted to the
astorm
I’m knee deep in a rewrite of No Frills Magento Layout for Magento 2 – I know the systems well enough to use them, but I’m still coming up to speed on the underlying object implementations. This is important, since my approach in No Frills is Here’s how you’d do this in PHP, here’s how to do the same [...]
astorm
Although the technique still works, various members of Magento’s engineering team have discouraged using Magento 1’s <action method="..."/> syntax to call methods on blocks from layout update XML files. <block ...> <action method="addTab"> <argument name="name" [...]
astorm
Magento 2 module creator and code generator | Mage2Gen Haven’t had a chance to check this out yet, but it looks like another Magento 2 module generation tool. This one seems to be an “everything and the kitchen sink” approach (vs. pestle which lets you build only the parts you need) but that approach does mean you get a [...]
astorm
Can’t Add a new UI Component Type · Issue #5647 · magento/magento2 An interesting side effect of the new XML schemas – the definition.xml files for UI components have their top nodes locked down, which means developers can’t add their own UI component types.
astorm
Formatting Dates in Magento Javascript If you’re doing any work in Magento’s RequireJS based javascript modules and see a dateFormat string defaults: { dateFormat: 'MMM d, YYYY h:mm:ss A' }, Chances are its a Moment.js date format string. You can pull in the main moment function via a RequireJS shim define(['moment'], [...]
astorm
Today we're going to talk about a new feature in Magento 2 -- UI Components. This may end up being a stand alone article, or it may be the start of a longer in depth series. I'm still figuring out the best way to
astorm
Demystifying Plugins (MageTitans Italy 2016) Concise explanation of the code involved in using a Magento 2 Plugin to change core system behavior, with the talk over here if you’re the sort who likes context.
astorm
I’ve been digging through Magento’s UI Components this week and hit a stumbling block. The main KnockoutJS template that kicks off rendering (vendor/magento//module-ui/view/base/web/templates/collection.html) looks like this <each args="data: elems, as: 'element'"><render [...]
astorm
I just updated pestle with a new magento2:generate:ui:grid command. Magento 2.1+ only, not likely to be ported backwards to the 2.0.x branch. A longer article over on alanstorm.com is forthcoming, but here’s the quickie version. Here’s the arguments to use to create a UI Component Listing. $ pestle.phar [...]
astorm
If you’re following along with Magento 2 development, you’ve probably heard the drum beat that the Model/Resource Model/Collections are old and tired, and the Repository classes are new and wired. While the move towards repositories is is a Good Thing™, a Magento 2 developers still needs to know the old CRUD system, and that [...]
astorm
How Interceptors are Generated TLDR; The object manager appends Interceptor to the class name you asked for if there’s a plugin. Then a second PHP Autoloader will look for Interceptor at the end of a classes name, and if it can’t find a definition via normal means, the autoloader generates the class.
astorm
One of the things Magento 2.1 doesn’t bring to the table is the ability to symlink your modules and other components. It’s hard to tell if this is a deliberate omission, or just something that’s not a priority for the development team and keeps getting lost in the shuffle. If you checkout the Context section of this [...]
astorm
This is another one of those 10,000 foot view posts, as much to get my own head straight about something as anything else. In programming, the term scope usually means If I’ve defined variable X “here”, where else can I access it? Magento’s core team have borrowed the term scope to described Magento’s [...]
astorm