In symfony 1.0.x i was able to use the same database for session handling like the one defined in databases.yml
For example, databases.yml:
all:
myDatabase:
class: sfPropelDatabase
param:
dsn: pgsql://user:password@localhost/database
factories.yml:
storage:
class: sfPostgreSQLSessionStorage
param:
database: myDatabase
...
In symfony 1.1.0-DEV with the same setup i get an exception with "You need to pass a sfPostgreSQLDatabase to the sfPostgreSQLSessionStorage". This worked in symfony 1.0.x
In symfony 1.0.x i was also able to create a custom session storage class ("mySessionStorage" extending "sfPostgreSQLSessionStorage") in my lib folder and override the sessionWrite() method, to write some additional data in an extended session table. So my set up was like
databases.yml:
all:
myDatabase:
class: sfPropelDatabase
param:
dsn: pgsql://user:password@localhost/database
factories.yml:
storage:
class: mySessionStorage
param:
database: myDatabase
...
This does not work in symfony 1.1.0-DEV anymore. I get an exception "You need to pass a myDatabase to the mySessionStorage".
I think this changed a little with the introduction of sfDatabaseSessionStorage, and i know symfony 1.1.0 is still under development. But what is (or will be) in symfony 1.1.0 the right way to extend a session database class? I think this line: http://trac.symfony-project.com/browser/branches/1.1/lib/storage/sfDatabaseSessionStorage.class.php#L96
does not take into account the possibility of extended classes.
Michael