You may know, the Zend Framework has a new path of development as the Laminas project. Laminas is simply the next step in the evolution of the Zend Framework.
Today, only the naming and governance of the framework has changed. The Laminas code base:
To ensure seamless integrations between all Laminas packages and existing Zend Framework projects — including third-party libraries with Zend Framework code — the project's Technical Steering Committee migrated existing packages to new GitHub repositories.
Anyone can still install all existing Zend Framework, Apigility, and Expressive packages. However, these versions will no longer be maintained by the community.
For more information, see the official blog post.
What does this mean in terms of Magento infrastructure?
The new release of Magento 2.3.5 will contain a few changes to the code and configuration that allow Magento team and extension developers use the Laminas libraries:
composer.json
files setup/config/application.config.php
setup/config/di.config.php
\Magento\Setup\Module
\Magento\Setup\Mvc\Bootstrap\InitParamListener
\Zend\Mvc\Controller\LazyControllerAbstractFactory
We continue to use Zend namespace for \Zend\Mvc\Controller\LazyControllerAbstractFactory
to avoid any changes to the autoload section of the root composer.json file.
Our changes are backward compatible and you can continue to use your current code. We recommend extension developers and system integrators to begin migrating their extensions to use Laminas. It's not required for compatibility with the patch release but is required for a long-term solution.
This backward-compatible solution is based on laminas/laminas-dependency-plugin from Laminas and laminas/laminas-zendframework-bridge. laminas/laminas-dependency-plugin intercepts requests to install packages from the Zend Framework and will replace them with the equivalents from the Laminas Project. laminas/laminas-zendframework-bridge provides a custom autoloader that aliases legacy Zend Framework, Apigility, and Expressive classes to their replacements under the Laminas Project.
The same changes for 2.3.5 will apply to 2.4.0:
In addition:
We continue to use Zend namespace for \Zend\Mvc\Controller\LazyControllerAbstractFactory
to avoid any changes to the autoload section of the root composer.json file.
We have backward incompatible changes for 2 classes:
Magento\Backend\App\Area\FrontNameResolver::_construct
- input argument type was changed Magento\Framework\App\Response\HttpInterface::getHeader
- declared return type was changed
If you do not have a rewrite for Magento\Backend\App\Area\FrontNameResolver
and do not depend on the instance class returned from Magento\Framework\App\Response\HttpInterface::getHeader, these changes will not affect your code.
Extension developers should check their extensions to ensure that they don’t have rewrites for Magento classes that use Zend Framework 2 classes as method arguments or are direct descendants of Zend Framework 2 classes. If the extension contains such code, extension developers need to apply changes to be compatible with Magento version 2.4.0.
In most cases, our changes will be backward compatible excepts as described above.
Due to features of Composer that laminas/laminas-dependency-plugin uses, we require Composer 1.7.0 and up. If you are unsure what version you are on, run `composer --version`. If you are on an older version, run `composer self-update`.
If you are interested in full migration of your code to use the Laminas libraries, we recommend the following tool. Here is the official recommendation for migration to Laminas libraries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.