aws / aws-sdk-php-symfony

Apache License 2.0
350 stars 89 forks source link

Warnings creating ConfigBuilder #77

Closed tacman closed 2 years ago

tacman commented 3 years ago

Please fill out the sections below to help us address your issue.

Version of AWS Service Provider for Symfony?

2.2.2

Version of Symfony (bin/console --version in project dir)?

5.3.2

Version of PHP (php -v)?

8.0.7

What issue did you see?

2.2.2

10:34:40 WARNING   [app] Failed to generate ConfigBuilder for extension Aws\Symfony\DependencyInjection\AwsExtension. ["exception" => LogicException { …},"extensionClass" => "Aws\Symfony\DependencyInjection\AwsExtension"]

Steps to reproduce

composer req aws/aws-sdk-php-symfony
bin/console cache:clear -v
ekinof commented 3 years ago

I've got the same issue on my symfony project

Cryde commented 3 years ago

I'm wonder if it's a blocker or not :thinking:

fl0cke commented 2 years ago

Same problem here.

aleksbrgt commented 2 years ago

In the configuration the following is done: https://github.com/aws/aws-sdk-php-symfony/blob/1b040b3b491ecb0f09bfbb1be590ba7818ae4aeb/src/DependencyInjection/Configuration.php#L13-L19

So, putting AWS_MERGE_CONFIG to true is fixing the issue

aleksbrgt commented 2 years ago

I'm wonder if it's a blocker or not thinking

It seems it's not thankfully, or at least we didn't have any issue alongside this warning, communication with aws was still working as expected.

AlexBevilacqua commented 2 years ago

Hi, same happens here

@aleksbrgt https://github.com/aws/aws-sdk-php-symfony/issues/77#issuecomment-937773017 This did the trick for me too, thank you!

the only problem I have with that, is that I need an actual environment variable for enabling this option (which btw, if I understood correctly should be the "new default behavior", isn't it?)

this is because Symfony's DotEnv doesn't use putenv() anymore, basically - (since version 4.2)

shouldn't maybe this parameter, be changed to a configuration? or are there maybe plans to make a new release that breaks BC with the old default behavior?

I'm also fine with the way it is kinda, but, would there be any problem with changing getenv() to $_ENV[] ? that way it could be configured via env files (..maybe add it to the recipe also?)

aleksbrgt commented 2 years ago

I totally agree that it should be more easily configurable, feel free to make a PR. But the main issue is that this repo seems to be dead af unfortunately, so I'm not sure it will ever be merged once submitted.

SamRemis commented 2 years ago

Not totally dead, just not enough hours in the day to pay as much attention to the ancillary repos as I'd like. I can't promise when I can look at the PR, but if someone submits it and there's enough community reviews, that would save me some time and make for a faster merge

Khez commented 2 years ago

To recap:

  1. @aleksbrgt is correct in https://github.com/aws/aws-sdk-php-symfony/issues/77#issuecomment-937773017

    So, putting AWS_MERGE_CONFIG to true is fixing the issue

  2. @AlexBevilacqua is correct in https://github.com/aws/aws-sdk-php-symfony/issues/77#issuecomment-972371298

    Symfony's DotEnv doesn't use putenv() anymore, basically - (since version 4.2)

  3. @jorge-ruukfy made a PR #82

    Fix bug with dotenv overloading.

@SamRemis Is there anything we can help with in regard to getting #82 merged ? Feel free to tag me if there's anything we can do to push the PR along :)

SamRemis commented 2 years ago

@Khez, I just left a comment on the PR, any feedback would be great :)

Khez commented 2 years ago

@SamRemis gave my two cents, specifically deprecating the old behaviour (since this is a symfony bundle and that's the symfony way)

As mentioned, need a PR? I'm excited to see this warning go away on cache:clear as soon as possible 😃

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.