Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Add support for Exclude attribute#49492
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lyrixx commentedFeb 22, 2023
| Q | A |
|---|---|
| Branch? | 6.3 |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Tickets | Fix#46643 |
| License | MIT |
| Doc PR |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
3a93c5d to66af40fCompare| } | ||
| /** | ||
| * @dataProvider provideRegisterClassesWithExcludeAttributeTests |
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.
let's replace the provider with@testWith [true] [false]
derrabus commentedFeb 22, 2023
FTR: This feature has been discussed and rejected once:#46655 |
alanpoulain commentedFeb 22, 2023
Why not just adding the attribute suggested in#47196? #[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::TARGET_FUNCTION | Attribute::IS_REPEATABLE)]finalclass Excludeextends When{publicfunction__construct() {parent::__construct('never'); }} |
lyrixx commentedFeb 22, 2023
@derrabus I know but I think many people need it @alanpoulain because this is a hack 😊 |
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I don't have strong enough arguments to reject a second time so LGTM :)
nicolas-grekas commentedFeb 23, 2023
Thank you@lyrixx. |