Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento
front end book you'll ever need. Get your copy
today!

Magento 2’s automatic constructor dependency injection system presents a problem for class trees with multiple levels of inheritance. First, programmers end up needing to call parent constructors with the right arguments, and in the right order. Second, class hierarchies also create confusion w/r/t the object manager’s configuration — namely, which constructor should the object manager reference when looking for arguments to instantiate and inject?

Magento 1’s block class hierarchy has a lot of inheritance. Magento 1 plugins modeled on the core code also have block class hierarchy with lots of inheritance. Magento 1 avoided the __construct problem by not having an automatic constructor dependency injection system, and by having an alternate _construct method (single underscore) that was free of arguments. Converting a module’s blocks, and getting the parent/child block constructor arguments to line up right, is a time consuming part of converting a Magento 1 module to Magento 2.