sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
319 stars 139 forks source link

You have requested a non-existent service "form.extension". #357

Closed oksidisko closed 7 years ago

oksidisko commented 7 years ago

Environment

ubuntu 16

Sonata packages

$ composer show sonata-project/*
sonata-project/admin-bundle              3.9.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.2.0 Symfony SonataBlockBundle
sonata-project/cache                     1.0.7 Cache library
sonata-project/core-bundle               3.1.1 Symfony SonataCoreBundle
sonata-project/doctrine-orm-admin-bundle 3.1.1 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  1.7.0 Lightweight Exporter library

Symfony packages

$ composer show symfony/*
symfony/phpunit-bridge    v3.1.3 Symfony PHPUnit Bridge
symfony/polyfill-intl-icu v1.2.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring v1.2.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56    v1.2.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70    v1.2.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util     v1.2.0 Symfony utilities for portability of PHP codes
symfony/security-acl      v3.0.0 Symfony Security Component - ACL (Access Control List)
symfony/symfony           v3.1.4 The Symfony PHP framework

PHP version

$ php -v
PHP 7.0.10-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
    with Zend OPcache v7.0.10-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies

Subject

Just trying to install sonata admin bundle, and got error

Steps to reproduce

bin/console cache:clear -v or just any symfony page

Expected results

nothing special

Actual results

 [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]  
  You have requested a non-existent service "form.extension".                 

Exception trace:
 () at /var/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:754
 Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() at /var/www/vendor/sonata-project/core-bundle/DependencyInjection/Compiler/FormFactoryCompilerPass.php:43
 Sonata\CoreBundle\DependencyInjection\Compiler\FormFactoryCompilerPass->process() at /var/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:104
 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /var/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:528
 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:477
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:117
 Symfony\Component\HttpKernel\Kernel->boot() at /var/www/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:68
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:118
 Symfony\Component\Console\Application->run() at /var/www/bin/console:29
oksidisko commented 7 years ago

Solved by adding

framework:
   form: ~
hadrizi commented 3 years ago

@oksidisko can you tell where did you actually added this

phansys commented 3 years ago

@oksidisko, please see https://symfony.com/doc/current/reference/configuration/framework.html#reference-framework-form.

We try to keep github issues for feature requests and bugs only. This looks like a configuration bug.