-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.2.9
Description
I ran docker-compose exec php composer update "symfony/*" --with-all-dependencies
with symfony version 4.2.*
and got this error:
request.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "Variable "label_translation_parameters" does not exist." at /var/www/application/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig line 227 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): Variable \"label_translation_parameters\" does not exist. at /var/www/application/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig:227)"}
Here's the composer update log
- Updating doctrine/annotations (v1.6.0 => v1.6.1): Loading from cache
- Updating doctrine/collections (v1.5.0 => v1.6.1): Loading from cache
- Updating doctrine/persistence (v1.1.0 => 1.1.1): Loading from cache
- Updating doctrine/doctrine-bundle (1.10.2 => 1.11.1): Loading from cache
- Updating doctrine/instantiator (1.1.0 => 1.2.0): Loading from cache
- Updating nikic/php-parser (v4.2.1 => v4.2.2): Loading from cache
- Updating twig/twig (v2.6.2 => v2.11.0): Loading from cache
- Updating symfony/twig-bridge (v4.2.4 => v4.2.9): Loading from cache
- Updating symfony/twig-bundle (v4.2.7 => v4.2.9): Loading from cache
- Updating symfony/web-profiler-bundle (v4.2.8 => v4.2.9): Loading from cache
- Updating phpdocumentor/reflection-docblock (4.3.0 => 4.3.1): Loading from cache
- Updating doctrine/migrations (v2.0.0 => v2.0.2): Loading from cache
How to reproduce
install latest 4.2.9 and update with dependencies. Create a controller with a FormType with some required value. Then write an automated test that simply saves the form empty.
$crawler = $client->request('GET', '/test');
$form = $crawler->selectButton('Save')->form();
It seems the problem is not when you use env=dev, because the html5 required will trigger and disallow the submit.. still looking into it
Possible Solution
Probably dependency version of twig-bundle should be fixed or issue should be fixed in twig-bundle by having some kind of non-breaking fallback.
Additional context