On 17.02.2011, at 21:56, Jordi Boggiano wrote:

> On 17.02.2011 21:31, Kris Wallsmith wrote:
>> Let's discuss, but my initial reaction is positive. There should be a
>> firewall between requests to avoid unexpected behavior when upgrading
>> from HttpCache to Varnish. In this sense, it makes sense for container
>> scope to be the exception, not the default. The ease of use for
>> beginners that you mention is also a strong pro.
> 
> For having experienced the WTF myself and having seen a few others
> suffer it too, yes, I have to agree it'd be much easier if we could skip
> this and only those that need/want to know will know.


Another approach Kris proposed on IRC was simply silently "fixing" the scope in 
case none is defined explicitly.
Aka when injecting the request service into a controller and that controller 
has no explicit scope set, it would be silently set to request.

This would have the benefit of keeping more services in the container scope, 
which could help performance. However it would of course mean that these 
controller instances must not do anything with their state that would prevent 
them from working correctly if used multiple times over the course of a 
request. Furthermore it makes it harder for developer to realize that they are 
moving services to a narrower scope when they add a service.

Then again performance continuos developers should always explicitly configure 
their scopes, which includes Symfony2 core and Bundle authors who want 3rd 
parties to reuse their Bundles.

regards,
Lukas Kahwe Smith
[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