Closed lbcd closed 6 years ago
Hi, I have the same issue after composer update (ubuntu, php 7.1, symfony 2.8). Currently downgraded a2lix translations to version 2.2.0 and it works fine.
You can test my PR then, to see if it fixes your issue
+1 with Symfony 2.7
Unfortunetely version 2.4.0 doesn't solve the issue:
composer update a2lix/translation-form-bundle
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Removing a2lix/translation-form-bundle (2.1.2)
- Installing a2lix/translation-form-bundle (2.4.0): Downloading (100%)
Writing lock file
Generating autoload files
Warning: Ambiguous class resolution, "AppKernel" was found in both "$baseDir . '/app/AppKernel.php" and "/srv/vendor/player/devicemanagmentbundle/app/AppKernel.php", the first will be used.
Warning: Ambiguous class resolution, "AppCache" was found in both "$baseDir . '/app/AppCache.php" and "/srv/vendor/player/devicemanagmentbundle/app/AppCache.php", the first will be used.
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[Symfony\Component\DependencyInjection\Exception\ScopeWideningInjectionException]
Scope Widening Injection detected: The definition "a2lix_translation_form.default.type.translatedentity" references the service "request" which belongs to a narrower scope. Generally, it is safer to either move "a2lix_translation_form.default.type.translatedentity" to scope "request" or alternatively rely on the provider pattern by injecting the container itself, and requesting the service "request" each time it is needed. In rare, special cases however that might not be necessary, then you can set the reference to strict=false to get rid of this error.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
[Symfony\Component\DependencyInjection\Exception\ScopeWideningInjectionException]
Scope Widening Injection detected: The definition "a2lix_translation_form.default.type.translatedentity" ref
erences the service "request" which belongs to a narrower scope. Generally, it is safer to either move "a2lix_
translation_form.default.type.translatedentity" to scope "request" or alternatively rely on the provider patte
rn by injecting the container itself, and requesting the service "request" each time it is needed. In rare, sp
ecial cases however that might not be necessary, then you can set the reference to strict=false to get rid of`
I missed a removal on the configuration.
2.4.1 should work. Can you check?
It's ok ! Thank you.
Environment
Linux / Docker / SF 2.8
Symfony packages
symfony/assetic-bundle v2.8.2 v2.8.2 Integrates Assetic into Symfony2 symfony/monolog-bundle v2.12.1 v3.2.0 Symfony MonologBundle symfony/phpunit-bridge v2.8.36 v4.0.6 Symfony PHPUnit Bridge symfony/polyfill-apcu v1.7.0 v1.7.0 Symfony polyfill backporting apcu_* functions to lower PHP versions symfony/polyfill-intl-icu v1.7.0 v1.7.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.7.0 v1.7.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php54 v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions symfony/polyfill-php55 v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions symfony/polyfill-php56 v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions symfony/polyfill-php70 v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions symfony/polyfill-util v1.7.0 v1.7.0 Symfony utilities for portability of PHP codes symfony/security-acl v3.0.1 v3.0.1 Symfony Security Component - ACL (Access Control List) symfony/swiftmailer-bundle v2.6.7 v3.2.1 Symfony SwiftmailerBundle symfony/symfony v2.8.36 v4.0.6 The Symfony PHP framework
PHP version
PHP 7.1.14-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Feb 9 2018 10:06:35) ( NTS )
Subject
Composer update failed TranslationFormBundle 2.3.0
Steps to reproduce
Composer update
Expected results
No error
Actual results
[Symfony\Component\DependencyInjection\Exception\ScopeWideningInjectionException]
Scope Widening Injection detected: The definition "a2lix_translation_form.default.type.translatedentity" references the service "request" which belongs to a narrower scope. Generally, it is safer to either move "a2lix_translation_form.default.type.translatedentity" to scope "request" or alternatively rely on the provider pattern by injecting the container itself, and requesting the service "request" each time it is needed. In rare, special cases however that might not be necessary, then you can set the reference to strict=false to get rid of this error.