[DependencyInjection] Add `#[AutowireInline]` attribute to allow service definition at the class level

by @DaDeather

Some issues have been detected in this pull request

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/52820/5144cea03a33e11de6f7a4397979d729d90b7efc/cs.diff | patch -p0
diff -ru src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php
--- src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php	2024-04-02 08:02:28.358871284 +0000
+++ src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php	2024-04-02 08:02:33.895064247 +0000
@@ -42,7 +42,7 @@
             return $value;
         }
 
-        if ($constructor === null) {
+        if (null === $constructor) {
             return $value;
         }
 

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/52820/5144cea03a33e11de6f7a4397979d729d90b7efc/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-04-02 08:02:27.915855842 +0000
+++ src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php	2024-04-02 08:02:47.971554883 +0000
@@ -380,7 +380,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

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages