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
Issue with template helper #81
Comments
I have made a PR to fix this #83 |
Using this PR results in another error in SonataAdminBundle. Trying to access your admin dashboard returns this error: An exception has been thrown during the rendering of a template ("Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Sonata\BlockBundle\Templating\Helper\BlockHelper' does not have a method 'renderBlock' in C:\wamp\www\Project\app\cache\dev\twig\16\5f\1b0eed585d7af7065254af4c935d.php line 54") in SonataAdminBundle:Core:dashboard.html.twig at line 21. |
Sorry, I did not know it was merged. Everything is fine. |
I still get this exception in production while php app/console cache:warmup --env=prod --no-debug
PHP Fatal error: Can't inherit abstract function Twig_ExtensionInterface::getName() (previously declared abstract in Symfony\Component\Templating\Helper\HelperInterface) in /var/www/html/shared/vendor/sonata-project/block-bundle/Sonata/BlockBundle/Twig/Extension/BlockExtension.php on line 17 |
Me too...
|
I just installed the Sonata Project Admin bundle and after clearing the cache, I get the following error message: FatalErrorException: Compile Error: Can't inherit abstract function Twig_ExtensionInterface::getName() (previously declared abstract in Symfony\Component\Templating\Helper\HelperInterface) in C:\www\test4\vendor\sonata-project\block-bundle\Sonata\BlockBundle\Twig\Extension\BlockExtension.php line 17 This only happens after I install the bundle. I was able to clear cache with no error prior to installing the bundle. Not sure what to do, but obviously cannot use the bundle if this error exists. Any help? |
Not sure what happens in your case, I have seen discussions about this but it should be solved by now. Are you sure you run the latest code? |
The issue is coming from php version < 5.3.8 where one class implements 2 interfaces which hold the same method name. The issue has been fixed in the master branch. I will create a new tag ASAP |
Thanks. I am running the most recent code. Just a note that I was able to install the sonata-sandbox with no problem. |
This issue still persists for me. I have the following installed:
|
Can't inherit abstract function Twig_ExtensionInterface::getName(): Have this error on deployment server. Error does not exist on dev box. Using same code including composer.lock. Code works on: PHP 5.3.10-1ubuntu3.6 |
@czarcar this has been fixed on 2.2.6, update your dependencies |
Thank you. FYI upgraded PHP on server last night to 5.3.27 problem went away. |
Just updated to Sonata/BlockBundle 2.2.6 and I still get this problem. I'm on PHP 5.4.4. Any idea? Error: Call to undefined method Sonata\BlockBundle\Twig\Extension\BlockExtension::renderBlock() in app/cache/dev/classes.php line 12424 |
Hey,
I just updated my vendors for the latest SonataAdminBundle and therefore also the BlockBundle was checked out. Trying to build the cache I'm getting this weird error:
I don't understand the message as it's implying that one abstract class extends a method from its parent abstract class.
Edit: After another look I found that both
Twig_ExtensionInterface
and the inheritedSymfony\Component\Templating\Helper\HelperInterface
require agetName()
method.Cheers
Matthias
The text was updated successfully, but these errors were encountered: