pomm-project / pomm-bundle

Pomm2 bundle for Symfony
81 stars 31 forks source link

Dependency on a non-existent service `profiler' #13

Closed tlode closed 9 years ago

tlode commented 9 years ago

When running in prod environment, I get this error message

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "pomm.controller.profiler" has a dependency on a non-existent service "profiler"

Could it be that the service pomm.controller.profiler should reference @profiler as an optional argument in pomm-bundle/sources/lib/Resources/config/services.yml?

pomm.controller.profiler:
        class: "PommProject\\SymfonyBridge\\Controller\\PommProfilerController"
        arguments: ['@router', '@?profiler', '@twig', '@pomm']

I don't know if this would be the right solution, I am just getting started with symfony.

sanpii commented 9 years ago

I don't know if this would be the right solution, I am just getting started with symfony.

It’s a solution but I prefer loading the profiler services only if the @profiler service exists. Without it, the profiler controller have no sense.

tlode commented 9 years ago

I agree. Thank you for looking into it!