Category: Programming Quickies
Back in they day, I ran a Tumblr blog named Magento Quickies where I’d post shorter, less in-depth posts about my travels through Magento’s source code. This Programming Quickies categories is the successor to that Tumblr blog. You’ll find all the old Magento Quickies content here, as well as new short posts about programming in general.
This section has its own RSS feed, the old Magento Quickies feed should should be redirecting, and we’re cross posting notifications for new posts over to magento-quickies.tumblr.com. In other words, you shouldn’t need to know any of this, but the duct tape that keeps the internet held together isn’t aging well, so your mileage may vary.
Below you'll find all the Programming Quickies articles on the site,
followed by a chronological listing of the same.
You may also browse the
7
series directly via the following links.
Pestle, Four Steps to Async Iterators, Checking in on OpenMage and Magento in 2020, Text Encoding and Unicode, Shopware's Development Environment, A Sentimental Gen-X Programmer Culls his Tech Books, and, Containers, Containers, Containers.
Carved out some time this weekend to add Repository generating code to pestle’s generate_crud_model command. Now, in addition to creating your standard Magento 2 Model/ResourceModel/Collection objects, you’ll also get a repository for your object with the de-facto standard save, getById, getList, delete, and deleteById [...]
astorm
Repository Filter Groups Applied Inconsistently · Issue #4287 · magento/magento2 My bug report to Magento on the previously mention filter group vs. filter inconsistency. Hopefully it’s not ignored.
astorm
I touched on this in my longer Magento 2: Understanding Object Repositories tutorial, but it’s worth repeating. The relationship between individual filters and filter groups in Magento 2 repositories is inconsistent. There’s some tribal wisdom floating around that filters should be applied as OR conditions, and filter groups [...]
astorm
MageScotch — A Magento 1 and Magento 2 Vagrant box Another “ready to go” Magento 2 (also Magento 1!) vagrant VM – although this one is offered and maintained by Joshua Warren, so it’s worth more than a casual look. It seems to be based on the Scotch Box vagrant project, which purports to offer a ready to go [...]
astorm
I recently started a new series over on my main website that sets out to explain everything a Magento 2 developer would need to know about composer. The first article covers setting up a satis mirror of repo.magento.com, Magento 2’s official composer repository. An ideal deployment system wouldn’t just mirror Magento [...]
astorm
If you’re giving Magento’s new Marketplace feature a spin for the first time, you may be surprised to find that it requires you have your three Magento 2 cron jobs running. There’s a few reasons for this. The first is a clever solution to the perennial PHP permissions problems when running commands and creating files as [...]
astorm
If you’re trying out Magento’s new Marketplace feature (essentially a ground up redesign, both backend and UX, for Magento Connect), you may run into a 404 error when you try to access the “Web Setup Wizard” (which is where you can access Component Manager, which is what lets you add purchases to your system). [...]
astorm
Sometimes, when you’re working with a Magento 2 command line script, you’ll see an uncaught exception that looks like the following. Area code not set: Area code must be set before starting a session Areas in Magento refer to different sections of an application (like frontend cart, or the adminhtml admin console) available [...]
astorm
If you’re being a good Magento 2 programmer, you’re not directly accessing an object manager instance. You’re using dependency injection to inject your objects in a constructor so future programmers will have a clear place to see a class’s dependencies, and change them if need be. But we know good programmers [...]
astorm
An Interesting Challenge for folks Using Magento 1 and PHP 7 Magento 1 doesn’t officially support PHP 7, but the changes needed to Magento’s core code to get this working aren’t too strenuous, and even third party extensions can be patched/modified to make this work. Whatever interesting here is the de-facto standard [...]
astorm
This one’s a follow up to my Magento 2: Understanding the Web API Architecture post. In that post I gloss over Magento’s oAuth implementation, and what I did say got several details wrong. This article aims to fix that. To understand Magento’s oAuth features, you need to understand the (related) integrations feature. To [...]
astorm
Magento 2 Feature Request: Simple, Standard, Seamless, PHP Install Option My thoughts on the state of Magento 2 from a product point of view, with a focus on why Magento needs to to shore up some PHP basics. Related to my open letter.
astorm
List Command not Wokring · Issue #121 · astorm/pestle Fixed the list command in pestle, my PHP command line framework/Magento code generation tool. Software is hard and often embarrassing.
astorm
Another high level first pass at an important topic for Magento 2 developers. Corrections and clarifications are more than welcome. Magento 2, like Magento 1, has a “web” API. This has nothing to do with the @api notation on classes, methods, and interfaces. The Web API is a way for programmers to programmatically interact [...]
astorm
Another Shell Scripts for M2 Setup This time from Karen over at Web Shop Apps. It’s slower than we’d all like, but things are starting to consolidate around Magento 2 development.
astorm
Shell Script to Install Magento 2 Havne’t tried it yet, but this shell script purports to offer a simplified Magento 2 installer experience. Glad to see these sorts of things bubbling up to the surface.
astorm
Magento Travis Build Starter Travis is a popular, hosted system for automatically creating test environments for open source projects hosted on a GitHub. The word automatic can be a little misleading though – Travis hooks up to the GitHub API, handles spawning new virtual machines (presumably at AWS/EC2), and has a simple domain [...]
astorm
Removing a Block from Magento 2 Layouts I’ve dug into the Magento 2 layout enough to discover that On the PHP level, there are methods for removing/unsetting a block from the layout That these methods are not exposed via the Layout DSL
astorm
If you’ve read previous articles on the subject, you know that every URL in Magento 2 corresponds to a single controller file, and each controller file has a single execute method. This execute method is responsible for returning a “result” object (i.e. an object that implements the [...]
astorm
Thanks to Magento 2’s MVVM approach the traditional responsibilities of a controller object have been pushed into the “view model” layer (i.e. a block’s _prepareLayout method). The main job a controller performs in Magento 2 is to Determine what sort of response is needed (HTML page, JSON, Redirect) Create an [...]
astorm