Skip to content

Conversation

@vkarchevskyi
Copy link
Contributor

Add int to allowed types of $value argument for whereNot method in DatabaseRule.

Right now it allows only string, which is incorrect. PHPStan reports this as error, but the validation works as expected.

Code snippet with example:

fn (Unique $rule): Unique => $rule
    ->whereNot('morph_id', $record->id)
    ->whereNot('morph_type', $record->getMorphClass())

@taylorotwell taylorotwell merged commit 92463ff into laravel:12.x Jul 2, 2025
62 checks passed
mohammad-fouladgar pushed a commit to mohammad-fouladgar/framework that referenced this pull request Jul 22, 2025
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