lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

In recent Dotenv versions `getenv()` is discouraged. #352

Closed wivaku closed 4 years ago

wivaku commented 4 years ago

In recent Dotenv versions getenv() is discouraged. https://github.com/vlucas/phpdotenv#putenv-and-getenv

The current code relies on getenv(): https://github.com/lesstif/php-jira-rest-client/blob/f4d872daeb9af30d6bb000a4add245f23e920f25/src/Configuration/DotEnvConfiguration.php#L56

Should be $_ENV[$key] instead.

Originally posted by @wivaku in https://github.com/lesstif/php-jira-rest-client/issues/319#issuecomment-703747954

wivaku commented 4 years ago

BTW. the mentioned Dotenv::createUnsafeImmutable() did not seem to work as workaround for existing getenv().

lesstif commented 4 years ago

@wivaku thanks!