-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed config issue with AWS SDK v3 in AwsS3ResolverFactory #683
Conversation
What if we add a new factory for v3 sdk? Same time we can deprecate curent aws factory. It would be good if you can add some docs on when to use what factory. Sounds good? |
@kieste are you planning to finish this PR? |
Yes I will fix this before end of the year. |
@makasim separated old and new SDK client config code into different factory classes. Added a note to the documentation. |
@@ -32,7 +33,11 @@ public function build(ContainerBuilder $container) | |||
$extension = $container->getExtension('liip_imagine'); | |||
|
|||
$extension->addResolverFactory(new WebPathResolverFactory()); | |||
$extension->addResolverFactory(new AwsS3ResolverFactory()); | |||
if (defined('\Aws\Sdk::VERSION') && version_compare(\Aws\Sdk::VERSION, '3.0.0', '>=')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
register both, and let a developer decided which one to use. Also would be good to add an exception if a resolver is used with wrong sdk.
@makasim after taking a closer look at my current setup I realized that I am not using the factories any more. (Currently I am creating the AwsS3Resolver as a service and injecting it directly into a proxy resolver.) So I can't finish this pull request now with your suggested changes. (I must progress with my current project.) But I aggree to all of your comments. This totally makes sense. But it's too much effort for me at the moment. |
Thanks for your contribution, I took care of your PR. Soon in the master |
I just modified the pull request from glenn-- so that his changes pass PHP 5.3 checks.