Skip to content

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Feb 22, 2023

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #46643
License MIT
Doc PR

@lyrixx lyrixx force-pushed the exclude branch 3 times, most recently from 3a93c5d to 66af40f Compare February 22, 2023 12:04
}

/**
* @dataProvider provideRegisterClassesWithExcludeAttributeTests
Copy link
Member

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
Copy link
Member

FTR: This feature has been discussed and rejected once: #46655

@alanpoulain
Copy link
Contributor

Why not just adding the attribute suggested in #47196?

#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::TARGET_FUNCTION | Attribute::IS_REPEATABLE)]
final class Exclude extends When
{
    public function __construct()
    {
        parent::__construct('never');
    }
}

@lyrixx
Copy link
Member Author

lyrixx commented Feb 22, 2023

@derrabus I know but I think many people need it

@alanpoulain because this is a hack 😊

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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
Copy link
Member

Thank you @lyrixx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DependencyInjection] Add attribute #[Exclude]
5 participants