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

[9.x] Fix ExcludeIf constructor #41931

Merged
merged 2 commits into from
Apr 12, 2022
Merged

Conversation

seriquynh
Copy link
Contributor

The ExcludeIf constructor only accepts a callable or bool value. But the current check could not ensure that, it accepts either numbers, string, object or anything else. I've just fixed and added missing tests.

@taylorotwell taylorotwell merged commit 0d49faf into laravel:9.x Apr 12, 2022
BrandonSurowiec added a commit to BrandonSurowiec/framework that referenced this pull request Jun 27, 2022
This applies the same fixes to ProhibitIf as ExcludeIf.
- Missing @throws declaration in docblock: laravel#41729
- Enforces a boolean in the constructor: laravel#41931 laravel#41969

Also fixes the ExcludeIf @var docblock to match as a \Closure
taylorotwell pushed a commit that referenced this pull request Jun 27, 2022
This applies the same fixes to ProhibitIf as ExcludeIf.
- Missing @throws declaration in docblock: #41729
- Enforces a boolean in the constructor: #41931 #41969

Also fixes the ExcludeIf @var docblock to match as a \Closure
taylorotwell pushed a commit to illuminate/validation that referenced this pull request Jun 27, 2022
This applies the same fixes to ProhibitIf as ExcludeIf.
- Missing @throws declaration in docblock: laravel/framework#41729
- Enforces a boolean in the constructor: laravel/framework#41931 laravel/framework#41969

Also fixes the ExcludeIf @var docblock to match as a \Closure
@seriquynh seriquynh deleted the fix-excludeIf branch June 14, 2024 01:10
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.

2 participants