Magento – Why aren’t Magento developers using Zend Framework 2 for Magento 2

magento2zend-framework

Magento will continue to mostly use the original Zend Framework (version 1) for Magento 2 (source: Magento 2 and Zend Framework 2 )

Seeing as how Magento 2 will not be backwards compatible with Magento 1 anyway, why are they not upgrading to Zend Framework 2?

I'm hoping for an authoritative, technical answer.

Best Answer

Just to repeat the important parts above, Magento 2 applications should use the official Magento 2 APIs, not Zend directly. Thus developers should not care which we build upon.

For inquiring minds, Magento 2 uses bits out of different frameworks. We use the database access out of Zend 1. We investigated moving to Doctrine, but it was too much work for the Magento 2.0.0 release. We may however do it in 2.1, 2.2, 3.0, or... (no commitment yet). When we do get to it, we may also change our mind whether to use ZF1, ZF2, Doctrine etc based on new information available. Magento 2 might also have a YML file in it (meaning we use part of Symfony). A part of the installer used some of ZF2 (should we develop a new app on ZF1?), but this may change. We also saw a tiny part of Angular that possibly looked interesting for MV* in JavaScript.

But as soon as you are looking what is under the Magento framework, you are probably doing the wrong thing. Your application code should not care. You should be using the "official" APIs provided by Magento framework so we can change the internals without affecting existing customer sites or extensions. By "official", we are going to document which APIs are "supported" APIs (not done very well yet) - to make upgrades more reliable, we are going to keep these APIs as stable as possible, but make changes to the underlying code base to improve performance etc.

Note: I don't look in this area very often - Magento 2 questions are watched on the GitHub issue tracker. We are trying to keep them all there at present.