Ok I completely missed the ResolveInterfaceInjectorsPass and a typo issue in
my interfaces section of config.yml made me think that Interface Injection
did not happen correctly. But it works very well!

Thanks Bulat, Interface Injection is a great functionality by the way :)

On Mon, Mar 28, 2011 at 1:39 PM, Bulat Shakirzyanov <[email protected]>wrote:

> Hi,
>
> In case of a dumped container, interface injection calls are merged onto
> the definitions.
> That way we get rid of an extra interface injection lookup that involves if
> (... instanceof ...) checks.
> This is done for performance reasons.
> I suggest you take a look at the dumped container and make sure all
> interface injections actually
> happen as part of service instantiation.
> If they are not there, then we have a problem...
>
> Best,
>
> On Mon, Mar 28, 2011 at 7:24 AM, Loïc Frering <[email protected]>wrote:
>
>> 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
>>
>
>
>
> --
> *Bulat Shakirzyanov* | Software Alchemist
>
> *a: *about.me/avalanche123
> *e:* [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
>



-- 
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