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
Symfony 3 - You have requested a non-existent service "templating.helper.assets". #92
Comments
Of course, when I wrote it and did some more research I found the issue:
Will create a pull request! |
#91 already exists, but I think that will break SF2 versions... Hmmm... |
Could we simply test wether the services exist? |
Maybe something like |
Sounds like a plan! I'll give it a try! |
@Gregwar PR is ready when you are :) |
@Gregwar would you mind pushing a release? Currently no released version of the ImageBundle is compatible with the current Symfony 3.x because of this issue. |
@Gregwar ping |
Tagged |
The templating.helper.assets service was replaced in Symfony 3.0.* by assets.packages |
Hello,
I'm having some troubles using this bundle in my Symfony 3 application.
Tried using
{{ image('/code/symfony/web/img/404.png').resize(100,100) }}
in the twig template, but got the error:Error: Method Gregwar\ImageBundle\ImageHandler::__toString() must not throw an exception
After some searches on Google I found that I should call jpeg() method to have a better error. Received this error:
An exception has been thrown during the rendering of a template ("You have requested a non-existent service "templating.helper.assets".") in AppBundle::default/frontpage.html.twig at line 13.
Also tried directly in the controller,
$foo = $this->get('image.handling')->open('/code/symfony/web/img/404.png')->jpeg();
but got the same error.Is it me who missed something or anything that changed in Symfony 3?
The text was updated successfully, but these errors were encountered: