On 15.04.2011, at 15:16, ryan weaver wrote: > Hey guys- > > So, there is currently a service setup to handle PDO session storage: > https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml#L27 > > However, it's first argument references a service "pdo_connection", which > doesn't exist. So, right now, the user will need to define that service > themselves to use PDO session. > > So, I'd like to define this pdo_connection service and allow DI extension > options to configure it. But, which XML DI config resource should it belong > to? More broadly, what is the intension of the "pdo_connection" service - is > this something session-specific (and therefore it should be renamed to > session.pdo_connection) or something meant to be more global? Shouldn't we > also allow the user to re-use a PDO connection from Doctrine (i.e. point the > session storage to an existing PDO service). > > I'm happy to make this change, but realized that I wanted some feedback first.
So first up I agree that the current state should be changed. However I fail to see the reason for using PDO here. Sure the code is simple enough to be able to use PDO directly, but for configuration it seems quite redundant and worse will lead to a redundant DB connection when the user also uses Doctrine DBAL/ORM. So imho we should switch things over to DBAL and then simply configure the service ID of the DBAL connection we want to use. This is simple, prevents redundant connections, problem solved. Now if someone needs to squeeze even more performance out of things and also chooses to not use DBAL, then I think he/she will be fine on their own. regards, Lukas Kahwe Smith [email protected] -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
