Hello,

It seems to me that Interface Injection is not possible right now into a
Symfony2 application as long as the container is *dumped*, for caching
purpose, *while frozen*. Here is the call stack that made me come to this
conclusion:

   - Symfony\Component\HttpKernel\*Kernel*::boot()
   - Symfony\Component\HttpKernel\*Kernel*::initializeContainer()
   - Symfony\Component\HttpKernel\*Kernel*::buildContainer()
   - Symfony\Component\DependencyInjection\*ContainerBuilder*::compile()
   - Symfony\Component\DependencyInjection\*Container*::compile()
      - which frozen the container
   - Symfony\Component\HttpKernel\*Kernel*::dumpContainer()
   - Symfony\Component\DependencyInjection\Dumper\*PhpDumper*::dump()
   - Symfony\Component\DependencyInjection\Dumper\*PhpDumper*
   ::addInterfaceInjectors()
      - which returns immediately if the container is frozen
      - and as a consequence disable Interface Injection

Do I miss something and Interface Injection can be achieve?

If not I'll be glad to raise an issue or contribute to a workaround :)

Regards,

--
Loïc Frering
[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

Reply via email to