magento / zf1

ZF1 adopted for Magento 2. Use composer in Magento 2 root to download it.
BSD 3-Clause "New" or "Revised" License
60 stars 61 forks source link

Update composer.json to replace zendframework/zf1 dependency #11

Closed tpetry closed 6 years ago

tpetry commented 6 years ago

Currently magento/zendframework1 does not state that it is an replacement of zendframework/zendframework1. So if you have added another dependency which depends on any version of zendframework/zendframework1both magento's and zendframework's implementation of zf1 will be installed.

This may not sound like a problem first but composer is unable to choose which package it should use to get the requested classes. If you are generating optimized autoload files you best see this problem while you get hundreds of warnings. Which package is choosen seems to be deterministic on the dependencies you have, sometimes i got magento's one and sometimes zend's one:

Warning: Ambiguous class resolution, "Zend_Serializer" was found in both "/Users/tpetry/www/zf-fork-demo/vendor/zendframework/zendframework1/library/Zend/Serializer.php" and "/Users/tpetry/www/zf-fork-demo/vendor/magento/zendframework1/library/Zend/Serializer.php", the first will be used.