symfony/symfony — pull request #6085 by Fran6co (2012-11-21 23:38:02+00:00)
Title: failing case in event dispatcher when another service uses a value relying on the priority init

This is just the failing test case, still trying to figure out the proper fix. A real case to reproduce this problem is in https://github.com/symfony/AsseticBundle/issues/138:

* Use assetic variables with locale
* Have a listener on onKernelRequest that depends on twig (in my case is knp paginator)

Assetic is going to use the default locale instead of the proper locale set by LocaleListener, because the variables are initialized before the LocaleListener has chance to update them.

Not sure if it would be better to fix the ContainerAwareEventDispatcher to respect the priority even for the service initialization or to fix the request dependency in Symfony\Bundle\AsseticBundle\DefaultValueSupplier.