[symfony-users] [symfony2] [beta4] ScopeWideningInjectionException in prod environment using php templates

2011-06-10 Thread pzwosta
Hi,

with update to Beta 4 I get this Exception - only in prod environment (with 
debug set to true on creating AppKernel). Without debug=true the server 
returns an empty page. 

Scope Widening Injection detected: The definition assetic.helper.static 
references the service templating.helper.assets which belongs to a 
narrower scope. Generally, it is safer to either move 
assetic.helper.static to scope request or alternatively rely on the 
provider pattern by injecting the container itself, and requesting the 
service templating.helper.assets each time it is needed. In rare, special 
cases however that might not be necessary, then you can set the reference to 
strict=false to get rid of this error.

Adding scope =request in line 20 of  this service definition in 
templating_php.xml solves the problem but I don't know what I'm doing. 

service id=assetic.helper.static 
class=%assetic.helper.static.class% scope=request
tag name=assetic.templating.php /
argument type=service id=templating.helper.assets /
argument type=service id=assetic.asset_factory /
/service
 
Can anyone give me a hint what to do? Is it a bug?

regards Peter  


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


Re: [symfony-users] [symfony2] [beta4] ScopeWideningInjectionException in prod environment using php templates

2011-06-10 Thread Kris Wallsmith
Yes, please submit a pull request to fix this.

Thanks,
Kris

On Friday, June 10, 2011 at 12:40 PM, pzwosta wrote:

 Hi,
 
 with update to Beta 4 I get this Exception - only in prod environment (with 
 debug set to true on creating AppKernel). Without debug=true the server 
 returns an empty page. 
 
 Scope Widening Injection detected: The definition assetic.helper.static 
 references the service templating.helper.assets which belongs to a narrower 
 scope. Generally, it is safer to either move assetic.helper.static to scope 
 request or alternatively rely on the provider pattern by injecting the 
 container itself, and requesting the service templating.helper.assets each 
 time it is needed. In rare, special cases however that might not be 
 necessary, then you can set the reference to strict=false to get rid of this 
 error.
 
 Adding scope =request in line 20 of this service definition in 
 templating_php.xml solves the problem but I don't know what I'm doing. 
 
 service id=assetic.helper.static class=%assetic.helper.static.class% 
 scope=request
 tag name=assetic.templating.php /
 argument type=service id=templating.helper.assets /
 argument type=service id=assetic.asset_factory /
 /service
 
 Can anyone give me a hint what to do? Is it a bug?
 
 regards Peter 
 
 
  -- 
  If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com (http://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 
 (mailto:symfony-users@googlegroups.com)
  To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com 
 (mailto: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