PHP 8.1 も同様でした。
ただ、Exception が切れなくなりました。
$ docker-compose exec ec-cube php -ddisplay_errors=1 data/vendor/bin/eccube
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "Eccube2\Command\Install\InsertDataCommand": argument "$eventDispatcher" of method "__construct()" references interface "Symfony\Component\EventDispatcher\EventDispatcherInterface" but no such service exists. You should maybe alias this interface to the existing "event_dispatcher" service. in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:54
Stack trace:
#0 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(83): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Object(Symfony\Component\DependencyInjection\Definition), true)
#1 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php(32): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, true)
#2 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(47): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Array, true)
#3 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/Compiler.php(94): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#4 /var/www/app/data/vendor/symfony/dependency-injection/ContainerBuilder.php(762): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#5 /var/www/app/data/vendor/ec-cube2/cli/src/Eccube2/Console/Application.php(33): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#6 /var/www/app/data/vendor/ec-cube2/cli/bin/eccube(9): Eccube2\Console\Application->__construct()
#7 /var/www/app/data/vendor/bin/eccube(119): include('/var/www/app/da...')
#8 {main}
thrown in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php on line 54
git restore composer.*
docker-compose exec ec-cube sh -c 'rm -r data/vendor/*'
docker-compose exec ec-cube composer config --unset platform.php
docker-compose exec ec-cube composer install
docker-compose exec ec-cube composer require symfony/yaml:^4.0 --ignore-platform-req=php
docker-compose exec ec-cube composer require ec-cube2/cli --ignore-platform-req=php
PHP 7 依存の解決が難しいため「--ignore-platform-req=php」を入れました。
$ docker-compose exec ec-cube php -v
PHP 8.1.27 (cli) (built: Feb 1 2024 02:59:09) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
with Zend OPcache v8.1.27, Copyright (c), by Zend Technologies
$ git show --format='%H' --no-patch
1101e98ebc5520f4e89ce0d04f65fa2f5bfb986e
----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。