drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

Issue with vlucas/phpdotenv and Composer 2.2

Open tstoeckler opened this issue 3 years ago • 3 comments

Due to https://github.com/composer/composer/pull/10065 Composer will now require any files specified as part of the autoloader when executing scripts and plugins, so in particular for this repo this that means load.environment.php will be loaded when the composer/installers plugin is installed, which might be before vlucas/phpdotenv is installed. Requiring the file then results in

Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found in .../load.environment.php:14

Probably checking class_exists() and just bailing if that's false is fine? But not sure...

tstoeckler avatar Dec 22 '21 13:12 tstoeckler

Got the same error, for now my workaround is to stick with version 2.1.14.

edurenye avatar Dec 22 '21 14:12 edurenye

Same issue here...

mroest avatar Dec 22 '21 15:12 mroest

This seem to have been fixed in https://github.com/composer/composer/issues/10382, you can test using composer self-update --snapshot. At least it worked for me.

edurenye avatar Dec 22 '21 17:12 edurenye