Skip to content

[9.x] Fix ExcludeIf constructor#41931

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
oliverquynh:fix-excludeIf
Apr 12, 2022
Merged

[9.x] Fix ExcludeIf constructor#41931
taylorotwell merged 2 commits into
laravel:9.xfrom
oliverquynh:fix-excludeIf

Conversation

@oliverquynh

Copy link
Copy Markdown
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
@oliverquynh oliverquynh 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