From 11383773bfec629060348a12c464d1bafd691111 Mon Sep 17 00:00:00 2001 From: Benoit Galati Date: Wed, 21 Feb 2018 08:39:11 +0100 Subject: [PATCH] Document the container.autowiring.strict_mode option fix https://github.com/symfony/symfony-docs/issues/8561 --- UPGRADE-4.0.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index ee9d187638..ea1a2613da 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -163,7 +163,18 @@ DependencyInjection autowire: true ``` - * Autowiring services based on the types they implement is not supported anymore. Rename (or alias) your services to their FQCN id to make them autowirable. + * Autowiring services based on the types they implement is not supported anymore. + It will only look for an alias or a service id that matches a given FQCN. + Rename (or alias) your services to their FQCN id to make them autowirable. + In 3.4, you can activate this behavior instead of having deprecation messages + by setting the following parameter: + + ```yml + parameters: + container.autowiring.strict_mode: true + ``` + + From 4.0, you can remove it as it's the default behavior and the parameter is not handled anymore. * `_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names.