PHP-DI DI\env() method doesn't work when using with symfony/dotenv or vlucas/phpdotenv

403 views Asked by At

Since it's not recommended to use getenv() and symfony/dotenv, vlucas/phpdotenv have disabled it by default, how is it possible to configure DI\Definition\Resolve\EnvironmentVariableResolver to use custom $variableReader constructor parameter?

1

There are 1 answers

1
Angel S. Moreno On BEST ANSWER

Problem seems to fixed with the recent merge: https://github.com/PHP-DI/PHP-DI/pull/757

This was the work applied https://github.com/PHP-DI/PHP-DI/pull/757/files