symfony2admingenerator / AdmingeneratorGeneratorBundle

(old-legacy) Admingenerator for Symfony2, parse generator.yml files to build classes
http://symfony2admingenerator.org/
MIT License
360 stars 125 forks source link

Problem after upgrade to Symfony 2.6 #814

Closed tobias-93 closed 9 years ago

tobias-93 commented 9 years ago

In Symfony 2.6, the shortcut isCsrfTokenValid($id, $token) is added to the Controller class, see http://symfony.com/blog/new-in-symfony-2-6-new-shortcut-methods-for-controllers. This method is also provided in Resources\templates\CommonAdmin\csrf_protection.php.twig, but with a different signature (isCsrfTokenValid($intention)). This delivers the following error: [Symfony\Component\Debug\Exception\ContextErrorException] Runtime Notice: Declaration of Admingenerated\IdbAdminGeneratorBundle\BaseAdminStudyCombinationController\ListController::isCsrfTokenValid() should be compatible with Symfony\Bundle\FrameworkBundle\Controller\Controller::isCsrfTokenValid($id, $token)

A solution for this, could be to rename the AdminGenerator provided method (e.g. to isCsrfTokenValidAdmin($intention). Please fix this, so everybody can upgrade to Symfony 2.6.

tobias-93 commented 9 years ago

Duplicate of #789