We are currently trying to update an older pimcore version v. 5.2.2 to the latest version. We tried to execute php console pimcore:update --update=5.3.2 as we want to upgrade step by step.
As pimcore 5 is EOL, we get no support on this on pimcore’s github
We already tried the following steps, to update, but it still fails with a fatal error.
- execute php bin/console pimcore:update --update=5.2.3
- wait for update to finish and try executing ‘composer update’
- composer update fails with message:
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Unused binding "Symfony\Contracts\HttpClient\HttpClientInterface" in service "instanceof.Monolog\Handler\HandlerInterface.0.Pimcore\Log\Handler\ApplicationLoggerDb". in .../pimcore/pimcore/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php on line 50 Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Unused binding "Symfony\Contracts\HttpClient\HttpClientInterface" in service "instanceof.Monolog\Handler\HandlerInterface.0.Pimcore\Log\Handler\ApplicationLoggerDb". in .../pimcore/pimcore/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php on line 50
4.After reading https://github.com/symfony/monolog-bundle/issues/365 and https://github.com/pimcore/pimcore/pull/7255, we tried to set a hard version constraint to"symfony/monolog-bundle": "3.5.0"
in composer.json file and try to do the update again - Now composer update will fail with following message:
Fatal error: Uncaught RuntimeException: The autoloader expected class "Pimcore\Log\Handler\ApplicationLoggerDb" to be defined in file "...vendor/composer/../../pimcore/lib/Pimcore/Log/Handler/ApplicationLoggerDb.php". The file was found but the class was not in it, the class name or namespace probably has a typo. in .../vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:293 Stack trace: #0 .../vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php(160): Symfony\Component\Debug\DebugClassLoader->checkClass('Pimcore\\Log\\Han...', '/var/www/vhosts...') #1 [internal function]: Symfony\Component\Debug\DebugClassLoader->loadClass('Pimcore\\Log\\Han...') #2 [internal function]: spl_autoload_call('Pimcore\\Log\\Han...') #3 .../vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php(78): class_exists('Pimcore\\Log\\Han...' in .../vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php on line 293 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
Does anyone know a way of fixing that, or can someone provide us with a different approach for executing the update to the latest version from 5.2.2?