The service “sonata.admin.block.admin_list” has a dependency on a non-existent service “sonata.templating”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



The service “sonata.admin.block.admin_list” has a dependency on a non-existent service “sonata.templating”



I am using Sonata Admin Bundle version 3.31.1, after I updated my composer it started to give the following error


The service "sonata.admin.block.admin_list" has a dependency on a non-existent service "sonata.templating".



My symfony is 3.4 and here is the composer.json file



"name": "msen/api",
"license": "proprietary",
"type": "project",
"autoload":
"psr-4":
"": "src/"
,
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
,
"autoload-dev":
"psr-4":
"Tests\": "tests/"

,
"require":
"php": ">=7.1.6",
"ext-intl" : "*",
"symfony/symfony": "^3.4",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^3.1",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"liuggio/excelbundle": "^2.0",
"twig/extensions": "^1.4",
"symfony/var-dumper": "^3.2",
"payum/core": "^1.4",
"league/uri": "~4.2",
"php-http/guzzle6-adapter": "^1.1.1",
"payum/paypal-express-checkout-nvp": "^1.3",
"payum/offline": "^1.3",
"payum/payum-bundle": "^2.2",
"sonata-project/admin-bundle": "^3.31.1",
"sonata-project/doctrine-orm-admin-bundle": "^3.3",
"phpmailer/phpmailer": "^5.2",
"symfony/config": "^3.3",
"symfony/translation": "^3.3",
"symfony/yaml": "^3.3",
"aws/aws-sdk-php-symfony": "^1.3"
,
"require-dev":
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"phpunit/phpunit": "6.5.0"

,
"scripts":
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget"
]
,
"extra":
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters":
"file": "app/config/parameters.yml"





Here is the AppKernel where I did put Sonata


new SonataDoctrineORMAdminBundleSonataDoctrineORMAdminBundle(),
new SonataAdminBundleSonataAdminBundle(),



It was working before without any problems. Does Sonata has kind of bug? I did upgrade to Symfony 3.4 before successfully. But it seems Sonata changed?
Any work around for this?




2 Answers
2



Adding these 2 lines in AppKernel.php solved the problem


new SonataCoreBundleSonataCoreBundle(),
new SonataBlockBundleSonataBlockBundle(),





Please mark your answer as accepted
– Jim Panse
Feb 13 at 7:58



Maybe you are missing this inside your config.yml:


framework:
...
templating:
engines: ['twig']






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard