There is really not much overhead when using DBAL instead of PDO. I think this was mainly done to keep the dependencies low, but I also agree that we should use the Doctrine connection here. That's also what we are doing for ACL. As an added benefit these queries will also show up in the profiler, and the webdebug toolbar.
For people who want to use this component standalone (in a non-Symfony2 context) we could still keep the PdoSessionStorage. Kind regards, Johannes On Sun, Apr 17, 2011 at 8:44 PM, Lukas Kahwe Smith <[email protected]>wrote: > > 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 > -- 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
