This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Upgrade 2.0 -> 2.3: Event Listeners

New topics about Symfony 2 should go here

Upgrade 2.0 -> 2.3: Event Listeners

by m.oezkorkmaz » Wed May 20, 2015 2:09 pm


I just got a project involving symfony2 in the company I am working in. I am currently trying to upgrade from 2.0.x to 2.3.
So far, everything is okay but the authentication mechanism, which is a very customized solution in the company here.

The main problem is the order of listeners invoked.

In the 2.0 version, the first thing invoked is the authentication listener.
In the ported version (2.3) this happen smuch later. In fact after we check for a logged in user. Did I miss something or did the order changed?

In my bundle I am registering factories as follows:

Code: Select all
class MyBundle extends Bundle
    public function build(ContainerBuilder $container)

        $extension = $container->getExtension('security');
        $extension->addSecurityListenerFactory(new TokenLoginSecurityFactory());
        $extension->addSecurityListenerFactory(new AutoLoginSecurityFactory());
        $extension->addSecurityListenerFactory(new UnsecureWebshopSecurityFactory());
        $extension->addSecurityListenerFactory(new DomainUsernamePasswordSecurityFactory());

Is it possible to give the DomainUsernamePassword stuff a high prio?

I'm really new into Symfony and since this is my first experience with this framework, it's very disappointing how a simple upgrade in a non-major release could break an application like this.

Any help is appreciated :-/

Thanks in advance,

Junior Member
Posts: 1
Joined: Wed May 20, 2015 1:56 pm