Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with vlucas/phpdotenv and Composer 2.2 #608

Closed
tstoeckler opened this issue Dec 22, 2021 · 3 comments
Closed

Issue with vlucas/phpdotenv and Composer 2.2 #608

tstoeckler opened this issue Dec 22, 2021 · 3 comments

Comments

@tstoeckler
Copy link
Contributor

Due to composer/composer#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...

@edurenye
Copy link

edurenye commented Dec 22, 2021

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

@mroest
Copy link

mroest commented Dec 22, 2021

Same issue here...

@edurenye
Copy link

edurenye commented Dec 22, 2021

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

@pfrenssen pfrenssen changed the title Issue with vlucac/phpdotenv and Composer 2.2 Issue with vlucas/phpdotenv and Composer 2.2 Dec 26, 2021
@webflo webflo closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants