Skip to content
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

[1.x] Add before hook support to features with names #130

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Dec 12, 2024

This PR adds before hook support to features with custom names.

fixes #129

A feature before hook fires before we hit the database, allowing runtime interception of feature checks. This feature is not currently supported for features with custom names, e.g.,

class MyFeature
{
    public $name = 'my-feature';

    // ...
}

@timacdonald timacdonald force-pushed the before-with-name branch 2 times, most recently from 2899b05 to 5f6df2b Compare December 12, 2024 02:40
@timacdonald timacdonald changed the title [1.x] Before with name [1.x] Add before hook support to features with names Dec 12, 2024
@timacdonald timacdonald marked this pull request as ready for review December 12, 2024 22:38
@taylorotwell taylorotwell merged commit d1522c6 into 1.x Dec 13, 2024
8 checks passed
@taylorotwell taylorotwell deleted the before-with-name branch December 13, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Method before() not being called with custom feature name
2 participants