Sonataadminbundle: Unable to load the "Symfony\Component\Form\FormRenderer" runtime after updating my project

Created on 14 Nov 2017  路  9Comments  路  Source: sonata-project/SonataAdminBundle

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.x-dev 5b722f7    dev-master 922b055
sonata-project/block-bundle              3.5.0              3.5.0             
sonata-project/cache                     2.0.0              2.0.0             
sonata-project/core-bundle               3.6.0              3.6.0             
sonata-project/datagrid-bundle           2.2.1              2.2.1             
sonata-project/doctrine-extensions       1.0.2              1.0.2             
sonata-project/doctrine-orm-admin-bundle 3.1.7              3.1.7             
sonata-project/easy-extends-bundle       2.2.0              2.2.0             
sonata-project/exporter                  1.7.1              1.7.1             
sonata-project/google-authenticator      2.0.0              2.0.0             
sonata-project/user-bundle               dev-master 5c6324c dev-master 5c6324c

Symfony packages

$ composer show --latest 'symfony/*'

symfony/monolog-bundle     v3.1.2  v3.1.2  Symfony MonologBundle
symfony/phpunit-bridge     v3.3.12 v3.3.12 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.6.0  v1.6.0  Symfony polyfill backporting apcu...
symfony/polyfill-intl-icu  v1.6.0  v1.6.0  Symfony polyfill for intl's ICU-r...
symfony/polyfill-mbstring  v1.6.0  v1.6.0  Symfony polyfill for the Mbstring...
symfony/polyfill-php56     v1.6.0  v1.6.0  Symfony polyfill backporting some...
symfony/polyfill-php70     v1.6.0  v1.6.0  Symfony polyfill backporting some...
symfony/polyfill-util      v1.6.0  v1.6.0  Symfony utilities for portability...
symfony/security-acl       v3.0.0  v3.0.0  Symfony Security Component - ACL ...
symfony/swiftmailer-bundle v2.6.7  v3.1.6  Symfony SwiftmailerBundle
symfony/symfony            v3.3.12 v3.3.12 The Symfony PHP framework

PHP version

$ php -v
PHP 7.1.11 (cli) (built: Oct 25 2017 07:27:25) ( NTS )

Subject

getting 'Unable to load the "Symfony\Component\Form\FormRenderer" runtime' after updating all packages of my project

Steps to reproduce

I just updated my projects with : $ composer update

Expected results

I was hoping that the project works as it did before the update.

Actual results

Error message : Unable to load the "Symfony\Component\Form\FormRenderer" runtime.

screenshot-2017-11-14 unable to load the symfony component form formrenderer runtime 500 internal server error

bug

All 9 comments

Seems like between Symfony 3.3 and 3.4 they changed how to retrieve runtime ...

I will need to find time to test this properly on all SF versions, and how to fix them all... If you want to provide a fix or help investigating this issue, it will be helpful :)

Seems like between Symfony 3.3 and 3.4 they changed how to retrieve runtime ...

this shouldn't happen, due to their BC promise.... 馃槩

Well, indeed it shouldn't happen, but it is happening because I am using 3.4 and it works perfectly fine for me with the actual code, and it wasn't working with the previous one :/

Other option would be revert my PR and find another solution. But until tonight I won't have time for anything

Not sure how to fix this.. @nicolas-grekas can you give us some help?

It looks to me that this is caused by the changes made in #4749. The class of the twig.form.renderer service from Symfony's TwigBundle is an instance of Symfony\Bridge\Twig\Form\TwigRenderer until Symfony 3.3. It only is an instance of twig.form.renderer" class="Symfony\Component\Form\FormRenderer as of Symfon 3.4.

Fixed on #4762

Was this page helpful?
0 / 5 - 0 ratings