Skip to content

Dynamo Session Handler Bundle is a simple Symfony wrapper around the AWS SDK for PHP DynamoDB Session Handler

License

Notifications You must be signed in to change notification settings

LightmakerCanada/DynamoSessionHandlerBundle

Repository files navigation

DynamoSessionHandlerBundle

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads

A simple Symfony2 bundle to wrap the AWS SDK for PHP DynamoDB Session Handler for easy use in your Symfony >2.1 application.

For more info see: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/feature-dynamodb-session-handler.html

Installation

Add to Composer

Add the following to your projects composer.json

{
    "require": {
        "lightmaker/dynamo-session-handler-bundle": "1.0.*"
    }
}

composer.phar update

Update your Kernel

# AppKernel.php
public function registerBundles() {
  $bundles = array(
    new Lightmaker\DynamoSessionHandlerBundle\LightmakerDynamoSessionHandlerBundle()
  );
}

Add optional configuration

See the official AWS SDK for PHP DynamoDB Session Handler docs for more info on configuration: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/feature-dynamodb-session-handler.html#configuration

# app/config/config.yml
lightmaker_dynamo_session_handler:
    table_name:
    hash_key:
    session_lifetime:
    consistent_read:
    locking_strategy:
    automatic_gc:
    gc_batch_size:
    gc_operation_delay:
    max_lock_wait_time:
    min_lock_retry_microtime:
    max_lock_retry_microtime:

Set the Symfony framework config to use the DynamoDB Session Handler

# app/config/config.yml
framework:
    session:
        handler_id: dynamoSessionHandler

About

Dynamo Session Handler Bundle is a simple Symfony wrapper around the AWS SDK for PHP DynamoDB Session Handler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages