gwkunze / dynamo-session-bundle

DynamoDb Session Handler for Symfony 2
MIT License
13 stars 10 forks source link

aws-sdk-php v3 needs version in the config #8

Open rfgALEX opened 9 years ago

rfgALEX commented 9 years ago

When trying to use aws-sdk-php v3, composer complains that there is no version set. can only use aws-sdk-php v2 till this is fixed.

when trying to run composer update, it returns this error:

[InvalidArgumentException] Missing required client configuration options: version: (string) A "version" configuration value is required. Specifying a version constraint ensures that your code will not be affected by a breaking change made to the service. For example, when using Amazon S3, you can lock your API version to "2006-03-01".

Your build of the SDK has the following version(s) of "dynamodb": * "2012-08-10"

You may provide "latest" to the "version" configuration value to utilize the
most recent available API version that your client's API provider can find.
Note: Using 'latest' in a production application is not recommended.

A list of available API versions can be found on each client's API documentation
page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are
unable to load a specific API version, then you may need to update your copy of
the SDK.

In: GWK\DynamoSessionBundle\DependencyInjection\Configuration.php

you need an extra config setting for "version" and default to "latest" if it isn't set.

// Version 2 $this->handler = DynamoDbClient :: factory ([ 'Region' => 'us-east-2' ]);

// Version 3 $this->handler = new DynamoDbClient ([ 'Region' => 'us-east-2', 'Version' => '2015-04-15' ]);

I've also heard that aws-sdk-php v3 isn't in a stable state and DynamoDB has issues, so it is probably best to stay with v2 till it is fixed.

gwkunze commented 9 years ago

I'll see if I can take a look at this asap, do you have any sources about these issues with DynamoDB in v3 you mention?

rfgALEX commented 9 years ago

In the base of your symfony project, edit the composer.json file and add with your library:

"aws/aws-sdk-php": "3.*", "gwk/dynamo-session-bundle" : "0.6",

and in your config.yml have the session bundle configured. then after saving, run:

composer update --profile

it will return the error and cease updating all the vendors.

aklinkert commented 8 years ago

This is still a Problem, actually. I'd like to install an unique version for aws-sdk, but have to install both v2 and v3 to keep this bundle working. Could you please fix this? :) Thanks a lot man!