Sylius: Argument 3 passed to Sonata\Twig\Extension\TemplateExtension::__construct() must be an instance of Sonata\CoreBundle\Model\Adapter\AdapterInterface, instance of Sonata\Doctrine\Adapter\AdapterChain given

Created on 14 Dec 2018  路  4Comments  路  Source: Sylius/Sylius

Sylius version affected: 1.0, 1.1, 1.2

Description
This error is thrown when calling bin/console cache:warmup in a fresh installation with composer create-project

Steps to reproduce
run

$ composer create-project sylius/sylius test

follow the install-instructions.

run

$ bin/console cache:warmup 

in the created project.

Possible Solution
Quick fix could be to set a conflict in composer.json like:

    "conflict": {
        "sonata-project/core-bundle": ">=3.12"
    },
Potential Bug

Most helpful comment

Works fine again with v3.13.4 for me. I think this issue can be closed.

All 4 comments

This error in Sonata also just generally breaks Sylius and you get this "Symfony Exception" error when you try to use it Sylius in the browser:

Argument 3 passed to Sonata\Twig\Extension\TemplateExtension::__construct() must be an instance of Sonata\CoreBundle\Model\Adapter\AdapterInterface, instance of Sonata\Doctrine\Adapter\AdapterChain given, called in C:\xampp\htdocs\sylius\var\cache\dev\ContainerDyQ1aWr\srcApp_KernelDevDebugContainer.php on line 3879

This should now be resolved, sorry for the inconvenience.

Works fine again with v3.13.4 for me. I think this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefandoorn picture stefandoorn  路  3Comments

javiereguiluz picture javiereguiluz  路  3Comments

stefandoorn picture stefandoorn  路  3Comments

crbelaus picture crbelaus  路  3Comments

loic425 picture loic425  路  3Comments