LaKrue / TwigstringBundle

This Symfony2 Bundle adds the possibillity to render strings instead of files with the Symfony native Twig templateing engine.
20 stars 18 forks source link

An error after updating to Sf2.1 #7

Open matiasmm opened 12 years ago

matiasmm commented 12 years ago

Since I updated to Sf2.1 I'm getting the following error when I call the twigstring service

Warning: Missing argument 2 for Ital\Framework\SpecialCommentsBundle\Handler::__construct(),
 called in /home/matias/workspace/proyecto/app/cache/dev/be/4f12d16ca15ebe3c1d000000_4f12d16ca15ebe3c1d010000/appDevDebugProjectContainer.php   
on line 2613 and defined in /home/matias/workspace/proyecto/src/Ital/Framework/SpecialCommentsBundle/Handler.php
line 11 

But I could solved creating the service with this way:

<service id="templating.engine.twig2" class="%templating.engine.twig2.class%" public="false">
        <argument type="service" id="twig2" />
        <argument type="service" id="templating.name_parser" />
        <argument type="service" id="templating.locator" />  <!-- Added this new parameter --->
        <argument type="service" id="templating.globals" />
</service>

I don't know if there is a better solution.