Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You have requested a non-existent service "templating.helper.actions" #3

Closed
NotJustPizza opened this issue Jan 2, 2017 · 5 comments

Comments

@NotJustPizza
Copy link

Symfony 3.2.1 (kernel: app, env: dev, debug: true)

> php bin\console assets:publish --env=prod

                                                                                                                       
  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]                                           
  You have requested a non-existent service "templating.helper.actions". Did you mean this: "templating.helper.securi  
  ty"?     

Maybe it was removed? Gregwar/ImageBundle#92

@kylekatarnls
Copy link
Member

Thanks, I will tag a release quickly to make helpers functions optional, so you won't be able to use helper functions but Pug templates will compile, then. I will take the time how to well implement the helper if different in new versions, but I used pug-symfony on Symfony 3 and did not get such error.

@NotJustPizza
Copy link
Author

NotJustPizza commented Jan 2, 2017

Helpers inside pug template (e.g. asset(), path() ) are working well, pages are loading. The problem is with pug caching (cache/dev/pug & cache/prod/pug are empty). and as you see I also cannot use assets:publish.

I tried with dev env:

> php bin\console assets:publish --env=dev
1 directory scanned: xxxxxx\..\views.
0 templates cached.
4 templates failed to be cached.

Process finished with exit code 0 at 10:00:09.
Execution time: 1,998 ms.

@kylekatarnls
Copy link
Member

Hi,

So there are helpers linked to FOSUserBundle. I made them optional. And I start to implement unit test to prevent regressions lik this in the future.

Can you try to upgrade to pug-symfony 2.2.0 and tell me if it fix your problem?

Thanks,

@NotJustPizza
Copy link
Author

"C:\Program Files\PHP\7.0.14\php.exe" bin/console assets:publish --env prod
1 directory scanned: C:\xxx\app/Resources/assets\..\views.
4 templates cached.
0 templates failed to be cached.

Process finished with exit code 0 at 17:57:53.
Execution time: 399 ms.

> "C:\Program Files\PHP\7.0.14\php.exe" bin/console assets:publish --env dev
1 directory scanned: C:\xxx\app/Resources/assets\..\views.
0 templates cached.
4 templates failed to be cached.

Now caching is working for prod, seems legit :) Thank you.

@kylekatarnls
Copy link
Member

Great, indeed, it's the expected behaviour, empty env is not supported. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants