laminas / laminas-stdlib

SPL extensions, array utilities, error handlers, and more
https://docs.laminas.dev/laminas-stdlib/
BSD 3-Clause "New" or "Revised" License
190 stars 40 forks source link

Updating to 3.18.0 fails in magento 2 #111

Closed antonfries closed 1 year ago

antonfries commented 1 year ago

BC Break Report

Q A
Version 3.18.0

Summary

Previous behavior

No error

Current behavior

`In DeploystrategyAbstract.php line 347:

[Error] Class "Laminas\Stdlib\Glob" not found

Exception trace: at /server/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/ Deploystrategy/DeploystrategyAbstract.php:347 MagentoHackathon\Composer\Magento\Deploystrategy\DeploystrategyAbstract->removeContentOfCategory() at /srv/www/magen to/standard/2dot4/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Deploystrategy/Depl oystrategyAbstract.php:324 MagentoHackathon\Composer\Magento\Deploystrategy\DeploystrategyAbstract->remove() at /srv/www/magento/standard/2dot4 /vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Deploystrategy/DeploystrategyAbstrac t.php:94 MagentoHackathon\Composer\Magento\Deploystrategy\DeploystrategyAbstract->clean() at /server/ vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Installer.php:611 MagentoHackathon\Composer\Magento\Installer->update() at phar:///usr/local/bin/composer2/src/Composer/Installer/Inst allationManager.php:485 Composer\Installer\InstallationManager->update() at phar:///usr/local/bin/composer2/src/Composer/Installer/Installat ionManager.php:378 Composer\Installer\InstallationManager->Composer\Installer{closure}() at phar:///usr/local/bin/composer2/vendor/rea ct/promise/src/FulfilledPromise.php:28 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer2/src/Composer/Installer/InstallationManager .php:377 Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer2/src/Composer/Installer/Ins tallationManager.php:319 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer2/src/Composer/In staller/InstallationManager.php:218 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer2/src/Composer/Installer.php:797 Composer\Installer->doInstall() at phar:///usr/local/bin/composer2/src/Composer/Installer.php:622 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer2/src/Composer/Installer.php:287 Composer\Installer->run() at phar:///usr/local/bin/composer2/src/Composer/Command/UpdateCommand.php:247 `

How to reproduce

Updating composer in a Magento Open Source 2.4.6 instance

froschdesign commented 1 year ago

Class "Laminas\Stdlib\Glob" not found

The class is present:

https://github.com/laminas/laminas-stdlib/blob/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf/src/Glob.php#L24-L27

antonfries commented 1 year ago

Fixed it by resetting to a earlier dependency state and then doing a composer update.

perryholden commented 12 months ago

@antonfries - Could you post the earlier version number? Thanks.

EDIT: Never mind. I see in your description you upgraded from 3.17. I can verify that if you specify the following in composer.json ("laminas/laminas-stdlib": "~3.17.0"), then the update will work.