Easyadminbundle: Fix deprecations in test builders: The getParser() method is deprecated

Created on 25 Oct 2016  路  4Comments  路  Source: EasyCorp/EasyAdminBundle

According to https://ci.appveyor.com/project/Javier/easyadminbundle/build/1.0.915:

The getParser() method is deprecated since version 1.25 and will be removed in 2.0: 4x
    1x in ActionTargetTest::testNewViewActions from JavierEguiluz\Bundle\EasyAdminBundle\Tests\Controller
    1x in ActionTargetTest::testShowViewActions from JavierEguiluz\Bundle\EasyAdminBundle\Tests\Controller
    1x in ActionTargetTest::testEditViewActions from JavierEguiluz\Bundle\EasyAdminBundle\Tests\Controller
    1x in ActionTargetTest::testListViewActions from JavierEguiluz\Bundle\EasyAdminBundle\Tests\Controller

I follow the trace in the test. It seems triggered by the class ActionTargetTest, which it calls to $this->requestListView(); as parent class in AbstractTestCase. In some part, the crawler is triggering the twig enviroment and calling to getParser() so I don't have idea how to avoid/fix this issue to make a PR and help you, but at least I try to give you my 2 cent explaining the warning ;)

bug

All 4 comments

@shakaran thanks for investigating this! I propose to wait a bit before we fix this because Twig is furiously changing its internals and deprecating a lot of things. At the moment this could be an internal Twig error or a real deprecation that we must deal. We'll see :)

@javiereguiluz ok, it seems a good idea wait a bit, you have more knowledge about internals ;)

These deprecations should be fixed with the next Symfony patches releases.

The exact cause seems to be this line in the TranslationDefaultDomainNodeVisitor.php file of the Symfony Twig Bridge. It's already fixed in the dev branches, so it'll be soled in the upcoming 3.1.7 version.

Closing it as fixed then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seb-jean picture seb-jean  路  3Comments

cve picture cve  路  4Comments

haithem-rihane picture haithem-rihane  路  4Comments

tamert picture tamert  路  3Comments

liarco picture liarco  路  3Comments