diff -ru src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php --- src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php 2024-06-08 07:59:58.965947070 +0000 +++ src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php 2024-06-08 08:00:19.464666337 +0000 @@ -390,7 +390,7 @@ $type = ProxyHelper::exportType($parameter); $type = $type ? sprintf('is type-hinted "%s"', preg_replace('/(^|[(|&])\\\\|^\?\\\\?/', '\1', $type)) : 'has no type-hint'; - throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); + throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" "%s", you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); } // specifically pass the default value diff -ru src/Symfony/Component/DependencyInjection/EnvVarProcessor.php src/Symfony/Component/DependencyInjection/EnvVarProcessor.php --- src/Symfony/Component/DependencyInjection/EnvVarProcessor.php 2024-06-08 08:00:00.947016582 +0000 +++ src/Symfony/Component/DependencyInjection/EnvVarProcessor.php 2024-06-08 08:00:19.465666372 +0000 @@ -82,7 +82,7 @@ } if (!isset($array[$key]) && !\array_key_exists($key, $array)) { - throw new EnvNotFoundException(sprintf('Key "%s" not found in %s (resolved from "%s").', $key, json_encode($array), $next)); + throw new EnvNotFoundException(sprintf('Key "%s" not found in "%s" (resolved from "%s").', $key, json_encode($array), $next)); } return $array[$key];