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

Incompatibility issues #10

Open
smouzour opened this issue Nov 1, 2022 · 3 comments
Open

Incompatibility issues #10

smouzour opened this issue Nov 1, 2022 · 3 comments

Comments

@smouzour
Copy link

smouzour commented Nov 1, 2022

Hello all,

We had a project with
Drupal -- 9.4.8
PHP -- 8.1.6
drupal/console-dotenv -- 0.3.1
vlucas/phpdotenv -- ^2.3

We face these notices with auto_detect_line_endings
https://php.watch/versions/8.1/auto_detect_line_endings-ini-deprecated but can not bypassed with setting auto_detect_line_endings=On/Off

So we found that we need to update the vlucas/phpdotenv library
(https://github.com/vlucas/phpdotenv/issues/534v ) but we had the error in the screenshot
Screenshot_209

Is the drupal/console-dotenv library going to be compatible will all the rests and also avoiding the thousands notices messages?

Thanks a lot.

@MokDevelopment
Copy link

MokDevelopment commented Nov 2, 2022

I have the exact same issue. We had to update to PHP 8.2 which creates issues with vlucas/phpdotenv being on version 2, which cannot be used for php higher than 8.1

Even weirder after turning back to 8.1 the error stays.

@smouzour
Copy link
Author

smouzour commented Nov 3, 2022

We resolve the issue by creating a custom patch for vlucas/phpdotenv.
It is actually change the line
ini_set('auto_detect_line_endings', '1');
to
ini_set('auto_detect_line_endings', '0');
in vendor/vlucas/phpdotenv/src/Loader.php file

We don't know if this is the best practice and it should take place in a new release of the library...

@MokDevelopment
Copy link

oh thanks @smouzour this is helpful.
In future we might create a custom solution. I don't think this module is still maintained.

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

2 participants