browse the blogs

[ 11 Apr 2016 ]

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 aren’t always good developers.

Even the Magento core team sometimes dips into using an object manager instance directly, and while I wouldn’t recommend it for shipping production code, using an object manager can be much faster for prototyping new ideas or when you’re working with an unfamiliar part of the object hierarchy.

This is all covered in my Object Manager series, but its worth mentioning here again.

When you use the …

[ 9 Apr 2016 ]

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 practice of using Magento Connect’s version compatibility features to say “Any version of PHP 5.x that’s ever released”. It sounds like Magento Connect won’t install most packages in a PHP 7 system due to the settings extension vendors originally used, back when the idea of a PHP 6 or 7 seemed like a far off dream.

[ 8 Apr 2016 ]

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 understand integrations, you need to understand the problem integrations want to solve.

Magento 2 Integrations

There are many third party services that want to integration with Magento. Analytics trackers, order processing system, etc. Put another way, many of these third party services would like to integrate with the Magento API.

In Magento 1, this meant a store owner had to

  1. Create a set of Web Services …

[ 5 Apr 2016 ]

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.

[ 4 Apr 2016 ]

List Command not Wokring · Issue #121 · astorm/pestle:

Fixed the list command in pestle, my PHP command line framework/Magneto code generation tool. Software is hard and often embarrassing.

[ 31 Mar 2016 ]

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 with a single freestanding Magento instance without writing native Magento/PHP code and installing it into that freestanding service. To fully understand the Magento 2 API, it helps to understand the Magento 1 API.

Magento 1 API Overview

Magento 1 initially shipped with a SOAP and XML-RPC based API. Later versions of Magento 1 introduced a REST API, although this REST API had less business …

[ 28 Mar 2016 ]

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.

[ 23 Mar 2016 ]

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.

[ 22 Mar 2016 ]

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 specific language (DSL) implemented via a .travis.yml file that allows you to configure your enviornment.

If you have a project similar to yours – copying that project’s .travis.yml file is usually enough to get you started. If you don’t then you’re building an enviornment from scratch, which can be a tedious affair.

The linked GitHub repository offers a sample .travis.yml file for Magento 2 projects. …

[ 18 Mar 2016 ]

Removing a Block from Magento 2 Layouts:

I’ve dug into the Magento 2 layout enough to discover that

  1. On the PHP level, there are methods for removing/unsetting a block from the layout
  2. That these methods are not exposed via the Layout DSL