php-di

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


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?


Solution

  • 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