2017 © Pedro Peláez
 

symfony-bundle propel-session-bundle

Symfony bundle to manage sessions

image

unitedasian/propel-session-bundle

Symfony bundle to manage sessions

  • Tuesday, October 4, 2016
  • by opichon
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10,498 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

UAMPropelSessionBundle

UAMPropelSessionBundle is an opinitionated symfony bundle that provides a convenient implementation of sessions via Propel ORM., (*1)

The motivation for this bundle was an issue of inconvenience:, (*2)

  • Configuring sessions in multiple symfony apps is repetitive, yet so standardized as not worth the effort each time.
  • The session table does not really need a schema nor Propel OM classes in the app; yet if not present, the propel:migration:generate-diff will attempt to remove it each time it is run.

To resolve this, this bundle provides a ready-to-use configuration for the app's sessions-related settings, as well as a Propel schema for the sessions table., (*3)

This bundle is highly opinionated:, (*4)

It provides no latitude for customization; if the settings it provides are unsuitable for your app, then you should customize the session settings the usual way in your app's configuration., (*5)

This bundle also deliberately ignores basic principles of software design, and assumes the existence of certain named container parameters; if these parameters are absent, the app may fail cryptically. On the other hand, these parameters are usually present in any symfony apps; changing their names in the app config to match the names exeepcted by the bundle presents little difficulty., (*6)

This bundle uses the default table name for sessions (sessions) and default column names (sess_id, sess_data, sess_time, sess_lifetime)., (*7)

The following parameters should be defined somewhere in the app:, (*8)

  • database_host
  • database_port
  • database_name
  • database_user
  • database_password

Usage

Add the bundle to your app's composer.json file requirements:, (*9)

    require: {
        "unitedasian/propel-session-bundle": "~1.0",
        ...
    }

Enable the bundle in your app's kernel:, (*10)

# app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            new UAM\Bundle\PropelSessionBundle\UAMPropelSessionBundle(),
            ...
        );

        ... 

        return $bundles;
    }

Create the sessions table: There are plenty of ways to do so via a propel command, such as propel:sql:build; the easiest method is probably to run propel:migration:generate-diff and then propel:migration:migrate., (*11)

Update your app's configuration to use the session handler service provided by the bundle:, (*12)

# app/config/config.yml

framework:
    session:
        handler_id: unitedasian.session.handler.pdo

The Versions

04/10 2016

dev-master

9999999-dev https://github.com/unitedasian/propel-session-bundle

Symfony bundle to manage sessions

  Sources   Download

MIT

The Requires

 

bundle symfony session

04/10 2016
10/01 2016

1.0.7

1.0.7.0 https://github.com/unitedasian/propel-session-bundle

Symfony bundle to manage sessions

  Sources   Download

MIT

The Requires

 

bundle symfony session

10/01 2016

1.0.6

1.0.6.0 https://github.com/unitedasian/propel-session-bundle

Symfony bundle to manage sessions

  Sources   Download

MIT

The Requires

 

bundle symfony session

06/01 2016

1.0.5

1.0.5.0 https://github.com/unitedasian/propel-session-bundle

Symfony bundle to manage sessions

  Sources   Download

MIT

The Requires

 

bundle symfony session