Question

As I'm fairly new to the Magento ecosystem, I'm wondering what the best practice is for writing extensions. Is it better to write an extension for each major release (2.0, 2.1, 2.2), or can one extension work on all releases?

I've written an extension for 2.1, and I'm trying to port it to 2.0, but I'm running into several problems, i. e. classes like \Magento\Framework\App\Request\DataPersistorInterface are missing and XML tags like listingToolbar aren't recognized. The translate attribute is not allowed in menu.xml

Was it helpful?

Solution

Magento 2 is still new and quickly evolving with lots of backwards incompatible changes. This is good, because 2.0 was a horribly unstable alpha version.

But unfortunately it means that as an extension developer, if you want to support older 2.x versions, you need to maintain separate branches.

I would not recommend to support 2.0 at all because it's not worth the trouble for the few early adopters that did not upgrade yet, and also not try to support 2.1 for too long anymore. But that's a business decision in the end.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top