2017 © Pedro Peláez
 

library symfony-session-timeout

Invalidate Symfony sessions based on inactivity for a certain period of time

image

lionware/symfony-session-timeout

Invalidate Symfony sessions based on inactivity for a certain period of time

  • Thursday, July 6, 2017
  • by nick.stemerdink
  • Repository
  • 1 Watchers
  • 5 Stars
  • 8,194 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 12 % Grown

The README.md

Symfony session timeout

Invalidate Symfony sessions based on inactivity for a certain period of time., (*1)

This does not make use of garbage collection as suggested in http://symfony.com/doc/current/components/http_foundation/session_configuration.html#session-idle-time-keep-alive. This method is more accurate and does not depend on garbage collection parameters to function well., (*2)

Installation

Add SymfonySessionTimeout in your composer.json, (*3)

{
    "require": {
        "lionware/symfony-session-timeout": "*"
    }
}

Register the bundle in your app/AppKernel.php:, (*4)

public function registerBundles()
{
    $bundles = array(
        // ...
        new Lionware\SymfonySessionTimeoutBundle\LionwareSymfonySessionTimeoutBundle()
    );
)

Add the parameter in app/config/parameters.yml and set the value to your preferred expiration time (which is set to an hour in this example)., (*5)

parameters:
    lionware_session_expiration_time: 3600

Add the configuration in app/config/config.yml, (*6)

lionware_symfony_session_timeout:
    session:
        expiration_time: "%lionware_session_expiration_time%"

Notes

Expiration of the cookie also means expiration of the session, therefore it is wise to set it to a relatively high value or 0 (valid for the length of the browser session)., (*7)

# app/config/config.yml
framework:
    session:
        cookie_lifetime: 0

The Versions

06/07 2017

dev-master

9999999-dev

Invalidate Symfony sessions based on inactivity for a certain period of time

  Sources   Download

MIT

The Requires

 

by Nick Stemerdink

06/07 2017

v1.0.2

1.0.2.0

Invalidate Symfony sessions based on inactivity for a certain period of time

  Sources   Download

MIT

The Requires

 

by Nick Stemerdink

27/03 2017

v1.0.1

1.0.1.0

Invalidate Symfony sessions based on inactivity for a certain period of time

  Sources   Download

MIT

The Requires

 

by Nick Stemerdink

01/09 2015

v1.0.0

1.0.0.0

Invalidate Symfony sessions based on inactivity for a certain period of time

  Sources   Download

MIT

The Requires

 

by Nick Stemerdink