Christophe Coevoet
Christophe Coevoet
As explained in the documentation, `@Inject` on private and protected properties only works in controllers, not in services: http://jmsyst.com/bundles/JMSDiExtraBundle/master/usage#property-injection
@slavafomin your example is a bad use-case anyway, as the kernel environment is available as a parameter named `kernel.environment`
until beta1 ? no as it is released :) I will be for beta2 in fact
@adadgio the difference is that this bundle actually replaces your controllers by special classes generated with AOP to enable such extra features. This is possible because it replaces the service...
and btw, if your service does not have any way to inject the parameter in it through its public API (i.e. without using hacks to access the internals of the...
to use controllers as services with the routing annotation of SensioFrameworkExtraBundle, you need to give it the service id: http://symfony.com/doc/current/cookbook/controller/service.html#using-annotation-routing
Using the controller class as a service for something else than routing ? It looks like you are putting too much stuff in your controller. The logic should be moved...
The exception has nothing to do with JMSDiExtraBundle. It is thrown in SonataMediaBundle
Can you paste the stack trace of the exception ? It could help debugging this
You are giving me the error message only, not the stack trace