use constructor property promotion

by @xabbuh

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/57329/f184ada7dda208e44cc7c27597563a627e3352ee/exception_messages.diff | patch -p0
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];

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages