lightmaker/dynamo-session-handler-bundle

A simple Symfony2 bundle to wrap the AWS SDK for PHP DynamoDB Session Handler

1.2.1 2016-01-06 04:51 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:41:29 UTC


README

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