AliHichem / AliDatatableBundle

Symfony2 Ajax Datagrid Bundle for doctrine2 entities
MIT License
112 stars 72 forks source link

Not usable with controller as a service? #129

Closed robertfausk closed 9 years ago

robertfausk commented 9 years ago

If I use the controller as a service architecture I need to set scope for this controller.

ScopeCrossingInjectionException in CheckReferenceValidityPass.php line 147:
Scope Crossing Injection detected:
The definition "app.controller.waypoint_controller" references the service "datatable" which belongs to another scope hierarchy.
This service might not be available consistently.
Generally, it is safer to either move the definition "app.controller.waypoint_controller" to scope "prototype", or declare "container" as a child scope of "prototype".
If you can be sure that the other scope is always active, you can set the reference to strict=false to get rid of this error.```
AliHichem commented 9 years ago

how are you using the controller as a service" with this bundle ? would you mind giving us a small example of what you want to archive ?