It is bad practice. You would have to mock the container in tests and
thats a big job.

In short: dont do it :-)


t

On Thu, May 26, 2011 at 18:45, Kaipi Yann <ydani...@gmail.com> wrote:
> Hi,
>
> As you probably know, when declaring a service in your app you can pass all
> needed services as parameter in the XML file so they will be use to
> instatiate the new service...
> I wonder what is the impact of passing directly the container, so I pass
> only one parameter to my service and I can access everything I need :
>
> Does it impact a lot the performance of the application or is it just bad
> practice cause you don't know what is really needed ?
>
> Regards.
>
> --
> 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 users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to