Skip to content
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

Make DynamoDB session handler implement native SessionHandlerInterface where possible #145

Merged
merged 2 commits into from
Sep 10, 2013
Merged

Make DynamoDB session handler implement native SessionHandlerInterface where possible #145

merged 2 commits into from
Sep 10, 2013

Conversation

datibbaw
Copy link
Contributor

@datibbaw datibbaw commented Sep 6, 2013

Projects like Silex accept session handlers that implement \SessionHandlerInterface, which was added to PHP in 5.4.

I've added a version check to make sure this still runs under 5.3 by defining an empty interface.


namespace Aws\DynamoDb\Session;

if (version_compare(phpversion(), '5.4', '>=')) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might if (PHP_VERSION_ID >= 50400) work better here? It's designed for comparisons, and version strings can have interesting vendor-specific attributes in them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea :)

@gws
Copy link

gws commented Sep 6, 2013

👍

@jeremeamia
Copy link
Contributor

👍 Seems like this should help with interoperability with frameworks. I'll submit it for our internal review. I also need you to confirm that you are willing to submit this code under the Apache 2.0 License. Thanks.

@datibbaw
Copy link
Contributor Author

datibbaw commented Sep 6, 2013

I hereby agree to submit this under Apache 2 license :)

@jeremeamia
Copy link
Contributor

Thanks for being a good sport. :-)

jeremeamia added a commit that referenced this pull request Sep 10, 2013
Make DynamoDB session handler implement native SessionHandlerInterface where possible
@jeremeamia jeremeamia merged commit 7806d81 into aws:master Sep 10, 2013
@jeremeamia
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants