Closed nanderson11 closed 6 months ago
Great catch -- it should definitely be pegged to the supported version of Composer for the most recent version, which at this time is 2.2.
I pegged the version of Composer for 2.2.0
for PHP 8.2
Should I do this for 8.1 and 8.3?
Hi, @markshust
The official system requirements for Magento 2.4.5 state that Composer 2.2
is supported.
However, Composer 2.2.0
throws the error
Fatal error: Uncaught Error: Class "Magento\Framework\Component\ComponentRegistrar" not found in /var/www/html/setup/src/Magento/Setup/registration.php:9
during composer commands.
This bug has been fixed in later versions of Composer 2.2
.
So, we should peg Composer for the 2.2.18
instead of the 2.2.0
version to resolve this issue.
Fixed in https://github.com/markshust/docker-magento/pull/1090. I'll tag new versions and recompile very shortly.
Description When setting docker-magento up for the first time, it installs the latest version of Composer from what I see here https://github.com/markshust/docker-magento/blob/69f29dea57f12e8f7363e483b753a299d15cb030/images/php/8.2/Dockerfile#L95. Currently, this installs Composer 2.7.1. After setup, if I run
bin/composer
(without arguments), it outputs an error (below). This seems to be caused by the issue discussed here https://github.com/composer/composer/issues/11843, caused by an incompatibility with Composer 2.7+ and Magento.Expected Result I think it would be nice if instead of installing the latest version of Composer, it installed the latest version of Composer that's compatible with Magento as outlined here: https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html. I know that you can technically install different versions of Magento in docker-magento though, so maybe it just defaults to whatever version of Composer is compatible with the default version of Magento that's installed.
Actual Result