View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007367 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2022-10-19 16:42 | 2024-09-25 09:31 |
Reporter | Steven | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 6.5.0 | ||||
Summary | 0007367: Recommended Composer version breaks removing of console commands | ||||
Description | If you use recommended Composer version 2.2, running composer remove for an extension introducing a custom OE Console command, results in an error on Composer execution. See first note for the error written to oxideshop.log. After updating to current Composer version 2.4, the executions runs without errors, but this version is not recommended for current OXID eShop 6.5: https://docs.oxid-esales.com/eshop/en/6.5/installation/new-installation/server-and-system-requirements.html#composer | ||||
Steps To Reproduce | 01. Use at least OXID eShop 6.5. 02. Make sure you are using Composer 2.2.x: composer -v 03. Install an extension with a custom command. You can use the Academy component Product Counter Console: composer require -n oxid-academy/product-counter-console 04. Uninstall the extension again: composer remove -n oxid-academy/product-counter-console 05. The Composer execution removes the component, but stops afterwards. 06. You can find an error entry in your oxideshop.log. 07. You may run Composer again. It should work now. Probably because the component was removed. 08. Update Composer: composer selfupdate 09. Install the extension again: composer require -n oxid-academy/product-counter-console 10. Remove again: composer remove -n oxid-academy/product-counter-console 11. Composer execution finishes without any errors. | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | 8.1 | ||||
Database Version | Not defined | ||||
|
[2022-10-19 11:44:40] OXID Logger.ERROR: [19 Oct 11:44:40.345398 2022] [exception] [type Error] [code 0] [file /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php] [line 520] [message Call to undefined method Symfony\Component\Console\Helper\Helper::length()] [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #0 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(580): Symfony\Component\Console\Helper\ProgressBar::Symfony\Component\Console\Helper\{closure}(Object(Symfony\Component\Console\Helper\ProgressBar), Object(Symfony\Component\Console\Output\StreamOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #1 [internal function]: Symfony\Component\Console\Helper\ProgressBar->Symfony\Component\Console\Helper\{closure}(Array) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #2 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(593): preg_replace_callback('{%([a-z\\-_]+)(?...', Object(Closure), ' %current% [%ba...') [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #3 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(416): Symfony\Component\Console\Helper\ProgressBar->buildLine() [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #4 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(325): Symfony\Component\Console\Helper\ProgressBar->display() [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #5 phar:///usr/bin/composer/src/Composer/Util/Loop.php(89): Symfony\Component\Console\Helper\ProgressBar->start(0) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #6 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(497): Composer\Util\Loop->wait(Array, Object(Symfony\Component\Console\Helper\ProgressBar)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #7 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(470): Composer\Installer\InstallationManager->waitOnPromises(Array) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #8 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(390): Composer\Installer\InstallationManager->executeBatch(Object(Composer\Repository\InstalledFilesystemRepository), Array, Array, true, true, Array) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #9 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(282): Composer\Installer\InstallationManager->downloadAndExecuteBatch(Object(Composer\Repository\InstalledFilesystemRepository), Array, Array, true, true, Array) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] #10 phar:///usr/bin/composer/src/Composer/Installer.php(763): Composer\Installer\InstallationManager->execute(Object(Composer\Repository\InstalledFilesystemRepository), Array, true, true) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000011 phar:///usr/bin/composer/src/Composer/Installer.php(590): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), true) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000012 phar:///usr/bin/composer/src/Composer/Installer.php(279): Composer\Installer->doUpdate(Object(Composer\Repository\InstalledFilesystemRepository), true) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000013 phar:///usr/bin/composer/src/Composer/Command/RemoveCommand.php(282): Composer\Installer->run() [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000014 phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\RemoveCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000015 phar:///usr/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000016 phar:///usr/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(Composer\Command\RemoveCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000017 phar:///usr/bin/composer/src/Composer/Console/Application.php(336): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000018 phar:///usr/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000019 phar:///usr/bin/composer/src/Composer/Console/Application.php(131): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000020 phar:///usr/bin/composer/bin/composer(83): Composer\Console\Application->run() [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000021 /usr/bin/composer(29): require('phar:///usr/bin...') [19 Oct 11:44:40.345398 2022] [exception] [stacktrace] 0000022 {main} [] [] [19 Oct 11:44:40.346386 2022] [uncaught error] [type E_ERROR] [file /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php] [line 520] [code ] [message Uncaught Error: Call to undefined method Symfony\Component\Console\Helper\Helper::length() in /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php:520 Stack trace: #0 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(580): Symfony\Component\Console\Helper\ProgressBar::Symfony\Component\Console\Helper\{closure}(Object(Symfony\Component\Console\Helper\ProgressBar), Object(Symfony\Component\Console\Output\StreamOutput)) #1 [internal function]: Symfony\Component\Console\Helper\ProgressBar->Symfony\Component\Console\Helper\{closure}(Array) #2 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(593): preg_replace_callback('{%([a-z\\-_]+)(?...', Object(Closure), ' %current% [%ba...') #3 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(416): Symfony\Component\Console\Helper\ProgressBar->buildLine() #4 /var/www/oxideshop/vendor/symfony/console/Helper/ProgressBar.php(325): Symfony\Component\Console\Helper\ProgressBar->display() #5 phar:///usr/bin/composer/src/Composer/Util/Loop.php(89): Symfony\Component\Console\Helper\ProgressBar->start(0) #6 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(497): Composer\Util\Loop->wait(Array, Object(Symfony\Component\Console\Helper\ProgressBar)) #7 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(470): Composer\Installer\InstallationManager->waitOnPromises(Array) #8 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(390): Composer\Installer\InstallationManager->executeBatch(Object(Composer\Repository\InstalledFilesystemRepository), Array, Array, true, true, Array) #9 phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php(282): Composer\Installer\InstallationManager->downloadAndExecuteBatch(Object(Composer\Repository\InstalledFilesystemRepository), Array, Array, true, true, Array) #10 phar:///usr/bin/composer/src/Composer/Installer.php(763): Composer\Installer\InstallationManager->execute(Object(Composer\Repository\InstalledFilesystemRepository), Array, true, true) 0000011 phar:///usr/bin/composer/src/Composer/Installer.php(590): Composer\Installer->doInstall(Object(Composer\Repository\InstalledFilesystemRepository), true) 0000012 phar:///usr/bin/composer/src/Composer/Installer.php(279): Composer\Installer->doUpdate(Object(Composer\Repository\InstalledFilesystemRepository), true) 0000013 phar:///usr/bin/composer/src/Composer/Command/RemoveCommand.php(282): Composer\Installer->run() 0000014 phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\RemoveCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000015 phar:///usr/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000016 phar:///usr/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(Composer\Command\RemoveCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000017 phar:///usr/bin/composer/src/Composer/Console/Application.php(336): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000018 phar:///usr/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000019 phar:///usr/bin/composer/src/Composer/Console/Application.php(131): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 0000020 phar:///usr/bin/composer/bin/composer(83): Composer\Console\Application->run() 0000021 /usr/bin/composer(29): require('phar:///usr/bin...') 0000022 {main} thrown] |
|
I get no error message while the remove, but i can confirm the logging of above error message in oxideshop.log QA - SG - |
|
Perhaps the issue is here that in 6.5 the composer package composer/composer in version > 2.2 is used (in the newest patch 2.7.1) , while before 6.5 it's composer/composer in version 2.2.* We also had many problems with composer 2.2 for oxid 6.5 and switched to stable usage of composer > 2.2 |