Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f7f216

Browse filesBrowse files
minor #56837 [DependencyInjection] Add simple tagging to phpdoc for Autoconfigure attribute (curry684)
This PR was merged into the 7.1 branch. Discussion ---------- [DependencyInjection] Add simple tagging to phpdoc for Autoconfigure attribute | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | None | License | MIT 7.1RC1 added PHPdoc comments to DI attributes. For the following code: ```php #[Autoconfigure(tags: [self::class], shared: false)] interface TaskMessageInterface extends MessageInterface { } ``` PHPstan now fails: ``` Parameter $tags of attribute class Symfony\Component\DependencyInjection\Attribute\Autoconfigure constructor expects array<array>|null, array<int, string> given. ``` So it would appear someone missed the simple and plain notation of an array of strings. Attached PR adds `string[]` to the attribute, fixing the omission. Commits ------- 5898cb8 Add simple tagging to phpdoc for Autoconfigure attribute
2 parents 4fae754 + 5898cb8 commit 8f7f216
Copy full SHA for 8f7f216

File tree

1 file changed

+10
-10
lines changed
Filter options

1 file changed

+10
-10
lines changed

‎src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
class Autoconfigure
2121
{
2222
/**
23-
* @param array<array-key, array<array-key, mixed>>|null $tags The tags to add to the service
24-
* @param array<string, array<array-key, mixed>>|null $calls The calls to be made when instantiating the service
25-
* @param array<string, mixed>|null $bind The bindings to declare for the service
26-
* @param bool|string|null $lazy Whether the service is lazy-loaded
27-
* @param bool|null $public Whether to declare the service as public
28-
* @param bool|null $shared Whether to declare the service as shared
29-
* @param bool|null $autowire Whether to declare the service as autowired
30-
* @param array<string, mixed>|null $properties The properties to define when creating the service
31-
* @param array<class-string, string>|string|null $configurator A PHP function, reference or an array containing a class/Reference and a method to call after the service is fully initialized
32-
* @param string|null $constructor The public static method to use to instantiate the service
23+
* @param array<array-key, array<array-key, mixed>>|string[]|null $tags The tags to add to the service
24+
* @param array<string, array<array-key, mixed>>|null $calls The calls to be made when instantiating the service
25+
* @param array<string, mixed>|null $bind The bindings to declare for the service
26+
* @param bool|string|null $lazy Whether the service is lazy-loaded
27+
* @param bool|null $public Whether to declare the service as public
28+
* @param bool|null $shared Whether to declare the service as shared
29+
* @param bool|null $autowire Whether to declare the service as autowired
30+
* @param array<string, mixed>|null $properties The properties to define when creating the service
31+
* @param array<class-string, string>|string|null $configurator A PHP function, reference or an array containing a class/Reference and a method to call after the service is fully initialized
32+
* @param string|null $constructor The public static method to use to instantiate the service
3333
*/
3434
public function __construct(
3535
public ?array $tags = null,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.