"magento/magento-cloud-metapackage": ">=2.4.3 <2.4.4"
"magento/magento-cloud-metapackage": ">=2.4.4 <2.4.5"
W: > php ./vendor/bin/ece-tools schema:generate || true W: PHP Fatal error: During inheritance of Countable: Uncaught RuntimeException: Deprecated Functionality: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 286 in /app/vendor/magento/ece-tools/src/App/ErrorHandler.php:68 W: Stack trace: W: #0 /app/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php(29): Magento\MagentoCloud\App\ErrorHandler->handle(8192, 'Return type of ...', '/app/vendor/com...', 286) W: #1 /app/vendor/composer/ClassLoader.php(571): include('/app/vendor/com...') W: #2 /app/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/app/vendor/com...') W: #3 /app/vendor/composer/composer/src/Composer/Repository/PlatformRepository.php(32): Composer\Autoload\ClassLoader->loadClass('Composer\\Reposi...') W: #4 /app/vendor/composer/ClassLoader.php(571): include('/app/vendor/com...') W: #5 /app/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/app/vendor/com...') W: #6 /app/vendor/composer/composer/src/Composer/Package/Loader/ValidatingArrayLoader.php(401): Composer\Autoload\ClassLoader->loadClass('Composer\\Reposi...') W: #7 /app/vendor/composer/composer/src/Composer/Package/Loader/RootPackageLoader.php(75): Composer\Package\Loader\ValidatingArrayLoader::hasPackageNamingError('magento/magento...') W: #8 /app/vendor/composer/composer/src/Composer/Factory.php(377): Composer\Package\Loader\RootPackageLoader->load(Array, 'Composer\\Packag...', '/app') W: #9 /app/vendor/magento/ece-tools/src/App/Container.php(87): Composer\Factory->createComposer(Object(Composer\IO\BufferIO), Array, false, '/app') W: #10 /app/vendor/magento/ece-tools/src/App/Container.php(50): Magento\MagentoCloud\App\Container->createComposerInstance(Object(Magento\MagentoCloud\Filesystem\SystemList)) W: #11 /app/vendor/magento/ece-tools/bootstrap.php(17): Magento\MagentoCloud\App\Container->__construct('/app/vendor/mag...', '/app') W: #12 /app/vendor/magento/ece-tools/bin/ece-tools(7): require('/app/vendor/mag...') W: #13 /app/vendor/bin/ece-tools(117): include('/app/vendor/mag...') W: #14 {main} in /app/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 29
Hi Agustin,
I have been having a similar issue, did you manage to resolve it?
Thanks
Paul
Have the same issue with php 8.1. Any solutions or suggestions how to fix it?
I found that we also need to update composer root update plugin. Maybe it helps to somebody
composer require magento/composer-root-update-plugin ~2.0 --no-update
I fixed this by updating symfony/console. The original requirement in my composer.json was 4.4.26. I changed it to ~4.4.0 and ran composer update so it would install the latest version of 4.4.x. In my case, I ended up with 4.4.44 and I no longer see the PHP error.
You can use the following url to read more about the composer-root-update-plugin.
When upgrading to a new version, first run below command. This makes sure that your root composer.json dependencies are updated to reflect the new magento version. After that run `composer update` to upgrade magento to the new version.
composer require-commerce magento/product-community-edition 2.4.4 --no-update --verbose