-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[DependencyInjection][HttpKernel] Add PHPDoc to attribute classes and properties #51971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DependencyInjection][HttpKernel] Add PHPDoc to attribute classes and properties #51971
Conversation
7224e66 to
d774f7a
Compare
GromNaN
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work.
src/Symfony/Component/DependencyInjection/Attribute/AsAlias.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutowireIterator.php
Outdated
Show resolved
Hide resolved
1a2ff9b to
093bd61
Compare
src/Symfony/Component/DependencyInjection/Attribute/AsAlias.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutoconfigureTag.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutowireServiceClosure.php
Outdated
Show resolved
Hide resolved
|
@GromNaN is there any reason, why we don't use proper |
5807835 to
0b7bb65
Compare
0b7bb65 to
fce3ee9
Compare
src/Symfony/Component/DependencyInjection/Attribute/AsDecorator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AsDecorator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/TaggedIterator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutoconfigureTag.php
Outdated
Show resolved
Hide resolved
74cced5 to
3d46327
Compare
src/Symfony/Component/DependencyInjection/Attribute/TaggedLocator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutowireIterator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutowireIterator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/AutowireLocator.php
Outdated
Show resolved
Hide resolved
GromNaN
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after a few corrections to the types.
src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/Attribute/MapQueryParameter.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/Attribute/MapQueryParameter.php
Outdated
Show resolved
Hide resolved
5611f41 to
4b2f2b2
Compare
4b2f2b2 to
6d0a0ad
Compare
| #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] | ||
| final class AsAlias | ||
| { | ||
| public function __construct( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@param should be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the whole PR 👍
e4a570b to
984e721
Compare
…w] Add PHPDoc to attribute classes and properties (alexandre-daubois) This PR was merged into the 7.1 branch. Discussion ---------- [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Part of #51920 | License | MIT One more round. :information_source: A first review of this kind is being done [here](#51971), I'll adjust this PR accordingly once done 🙂 Commits ------- 8a2ac5a [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties
…w] Add PHPDoc to attribute classes and properties (alexandre-daubois) This PR was merged into the 7.1 branch. Discussion ---------- [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Part of symfony/symfony#51920 | License | MIT One more round. :information_source: A first review of this kind is being done [here](symfony/symfony#51971), I'll adjust this PR accordingly once done 🙂 Commits ------- 8a2ac5a6d2 [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties
…w] Add PHPDoc to attribute classes and properties (alexandre-daubois) This PR was merged into the 7.1 branch. Discussion ---------- [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Part of symfony/symfony#51920 | License | MIT One more round. :information_source: A first review of this kind is being done [here](symfony/symfony#51971), I'll adjust this PR accordingly once done 🙂 Commits ------- 8a2ac5a6d2 [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties
…w] Add PHPDoc to attribute classes and properties (alexandre-daubois) This PR was merged into the 7.1 branch. Discussion ---------- [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Part of symfony/symfony#51920 | License | MIT One more round. :information_source: A first review of this kind is being done [here](symfony/symfony#51971), I'll adjust this PR accordingly once done 🙂 Commits ------- 8a2ac5a6d2 [Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties
| /** | ||
| * @param string $decorates The service id to decorate | ||
| * @param int $priority The priority of this decoration when multiple decorators are declared for the same service | ||
| * @param int $onInvalid The behavior to adopt when the decoration is invalid. Must be one of the {@see ContainerInterface} constants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param int $onInvalid The behavior to adopt when the decoration is invalid. Must be one of the {@see ContainerInterface} constants | |
| * @param int $onInvalid The behavior to adopt when the decoration is invalid; must be one of the {@see ContainerInterface} constants |
| { | ||
| /** | ||
| * @param string|null $index The property or method to use to index the item in the locator | ||
| * @param int|null $priority The priority of the item. The higher the number, the earlier the tagged service will be located in the locator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param int|null $priority The priority of the item. The higher the number, the earlier the tagged service will be located in the locator | |
| * @param int|null $priority The priority of the item; the higher the number, the earlier the tagged service will be located in the locator |
| namespace Symfony\Component\DependencyInjection\Attribute; | ||
|
|
||
| /** | ||
| * An attribute to autowire the inner object of decorating services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * An attribute to autowire the inner object of decorating services. | |
| * Autowires the inner object of decorating services. |
| use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
|
||
| /** | ||
| * An attribute to declare a decorating service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * An attribute to declare a decorating service. | |
| * Declares a decorating service. |
| public ?string $name = null, | ||
| ) { | ||
| /** | ||
| * @param string|null $name The service alias to autowire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param string|null $name The service alias to autowire | |
| * @param string|null $name The name of the target autowiring alias |
| /** | ||
| * @param string|null $format The DateTime format to use, @see https://www.php.net/manual/en/datetime.format.php | ||
| * @param bool $disabled Whether this value resolver is disabled. This allows to enable a value resolver globally while disabling it in specific cases. | ||
| * @param class-string $resolver The class name of the resolver to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't have to be a FQCN, does it?
| * @see https://php.net/filter.filters.validate for filter, flags and options | ||
| * | ||
| * @param string|null $name The name of the query parameter. If null, the name of the argument in the controller will be used. | ||
| * @param string|null $name The name of the query parameter. If null, the name of the argument in the controller will be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param string|null $name The name of the query parameter. If null, the name of the argument in the controller will be used | |
| * @param string|null $name The name of the query parameter; if null, the name of the argument in the controller will be used |
| /** | ||
| * @param class-string<ValueResolverInterface>|string $resolver | ||
| * @param class-string<ValueResolverInterface>|string $resolver The class name of the resolver to use | ||
| * @param bool $disabled Whether this value resolver is disabled. This allows to enable a value resolver globally while disabling it in specific cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param bool $disabled Whether this value resolver is disabled. This allows to enable a value resolver globally while disabling it in specific cases. | |
| * @param bool $disabled Whether this value resolver is disabled; this allows to enable a value resolver globally while disabling it in specific cases |
| namespace Symfony\Component\HttpKernel\Attribute; | ||
|
|
||
| /** | ||
| * An attribute to define the HTTP status code applied to an exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * An attribute to define the HTTP status code applied to an exception. | |
| * Defines the HTTP status code applied to an exception. |
| use Psr\Log\LogLevel; | ||
|
|
||
| /** | ||
| * An attribute to define the log level applied to an exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * An attribute to define the log level applied to an exception. | |
| * Defines the log level applied to an exception. |
984e721 to
7e2ae5a
Compare
| * @see https://php.net/filter.filters.validate for filter, flags and options | ||
| * | ||
| * @param string|null $name The name of the query parameter. If null, the name of the argument in the controller will be used. | ||
| * @param string|null $name The name of the query parameter; if null, the name of the argument in the controller will be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param string|null $name The name of the query parameter; if null, the name of the argument in the controller will be used | |
| * @param string|null $name The name of the query parameter; if null, the name of the argument in the controller will be used |
| use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; | ||
|
|
||
| /** | ||
| * An attribute to tell which value resolver should be used for a given parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defines the value resolver to use for a given parameter.
| * @param bool|null $autowire Whether to declare the service as autowired | ||
| * @param array<string, mixed>|null $properties The properties to define when creating the service | ||
| * @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 | ||
| * @param string|null $constructor The public static inner method to use to instantiate the service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param string|null $constructor The public static inner method to use to instantiate the service | |
| * @param string|null $constructor The public static method to use to instantiate the service |
0f2a4c0 to
0c171b5
Compare
|
Fabbot's having (and giving) hard times with some of the advanced types 😅 Addressed remaining comments, thanks |
0c171b5 to
a9030f1
Compare
|
Thank you @alexandre-daubois. |
Friendly ping @GromNaN, is that what you had in mind? 🙂