"A journey of a thousand miles begins with a single step" --Lao Tzu

PHP Fatal error: require(): Failed opening required '/app/vendor/composer/composer/src/Composer/installed.php'

Wednesday, August 4th, 2021

If your Magento Commerce Cloud deployment fails with the following errors:

PHP Fatal error: require(): Failed opening required '/app/vendor/composer/composer/src/Composer/installed.php' (include_path='/app/vendor/magento/zendframework1/library:.:/usr/share/php') in /app/vendor/composer/composer/src/Composer/InstalledVersions.php on line 319
 [2021-08-02 17:34:48] ERROR: [12] The command "php ./vendor/bin/ece-patches apply --no-interaction" failed. PHP Warning: require(/app/vendor/composer/composer/src/Composer/installed.php): failed to open stream: No such file or directory in /app/vendor/composer/composer/src/Composer/InstalledVersions.php on line 319
 PHP Fatal error: require(): Failed opening required '/app/vendor/composer/composer/src/Composer/installed.php' (include_path='/app/vendor/magento/zendframework1/library:.:/usr/share/php') in /app/vendor/composer/composer/src/Composer/InstalledVersions.php on line 319
 W: 
 W: In Processor.php line 129:
 W: 
 W: The command "php ./vendor/bin/ece-patches apply --no-interaction" failed. P 
 W: HP Warning: require(/app/vendor/composer/composer/src/Composer/installed.p 
 W: hp): failed to open stream: No such file or directory in /app/vendor/compos 
 W: er/composer/src/Composer/InstalledVersions.php on line 319 
 W: PHP Fatal error: require(): Failed opening required '/app/vendor/composer/ 
 W: composer/src/Composer/installed.php' (include_path='/app/vendor/magento/zen 
 W: dframework1/library:.:/usr/share/php') in /app/vendor/composer/composer/src 
 W: /Composer/InstalledVersions.php on line 319 
 W: 
 W: 
 W: In ApplyPatches.php line 45:
 W: 
 W: The command "php ./vendor/bin/ece-patches apply --no-interaction" failed. P 
 W: HP Warning: require(/app/vendor/composer/composer/src/Composer/installed.p 
 W: hp): failed to open stream: No such file or directory in /app/vendor/compos 
 W: er/composer/src/Composer/InstalledVersions.php on line 319 
 W: PHP Fatal error: require(): Failed opening required '/app/vendor/composer/ 
 W: composer/src/Composer/installed.php' (include_path='/app/vendor/magento/zen 
 W: dframework1/library:.:/usr/share/php') in /app/vendor/composer/composer/src 
 W: /Composer/InstalledVersions.php on line 319 
 W: 
 W: 
 W: In Shell.php line 86:
 W: 
 W: The command "php ./vendor/bin/ece-patches apply --no-interaction" failed. P 
 W: HP Warning: require(/app/vendor/composer/composer/src/Composer/installed.p 
 W: hp): failed to open stream: No such file or directory in /app/vendor/compos 
 W: er/composer/src/Composer/InstalledVersions.php on line 319 
 W: PHP Fatal error: require(): Failed opening required '/app/vendor/composer/ 
 W: composer/src/Composer/installed.php' (include_path='/app/vendor/magento/zen 
 W: dframework1/library:.:/usr/share/php') in /app/vendor/composer/composer/src 
 W: /Composer/InstalledVersions.php on line 319 
 W: 

Then verify that you are running Composer 1.10.x and NOT Composer 2.x!! Be sure to verify your version of semver as well.

As of August 2021, these versions for Magento 2.3.7/2.4.x should be:

composer/composer 1.10.22
composer/semver 1.7.2



Views: 381