aws / aws-sdk-php-symfony

Apache License 2.0
350 stars 89 forks source link

Use $_ENV instead getenv for dotenv overloading #82

Closed jorge-ruukfy closed 2 years ago

jorge-ruukfy commented 2 years ago

Fix bug with dotenv overloading. In prod environment, getenv does not reach the overloaded values with dotenv

{"message":"Failed to generate ConfigBuilder for extension Aws\Symfony\DependencyInjection\AwsExtension.","context":{"exception":{"class":"LogicException","message":"The node was expected to be an ArrayNode. This Configuration includes an edge case not supported yet.","code":0,"file":"/var/www/service/vendor/symfony/config/Builder/ConfigBuilderGenerator.php:103"},"extensionClass":"Aws\Symfony\DependencyInjection\AwsExtension"},"level":300,"level_name":"WARNING","channel":"app","datetime":"2022-03-18T13:00:00.153193+00:00","extra":{}}

Miraell commented 2 years ago

@SamRemis could you merge this if possible?

SamRemis commented 2 years ago

@Miraell I don't think I'll be able to since getenv() is case insensitive on windows platforms and $_ENV is not, so this could wind up breaking for customers who use different casing. I'll bring it up today to the team though, and get another opinion

drzraf commented 2 years ago

Exactly the same error but that patch didn't fix it.

SamRemis commented 2 years ago

closed by https://github.com/aws/aws-sdk-php-symfony/pull/87