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

ServiceSubscriberTrait - Should use Required attribute for setContainer instead of annotation #45679

Copy link
Copy link
Closed
@AndreasA

Description

@AndreasA
Issue body actions

Symfony version(s) affected

5.4-6.1

Description

Not that important a bug, but the ServiceSubscriberTrait only works in combintation with PHP8.0 attributes, so using the old @required annotation is a bit weird, instead the #[Required] attribute should be used.

How to reproduce

See https://github.com/symfony/symfony/blob/v5.4.6/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php#L101

Possible Solution

Use attribute instead

Additional Context

Not really an issue but also not a feature request. not sure what I should have selected instead. Personally, I thought bug was the best choice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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