Skip to content

Conversation

@AlexandreMeledandri
Copy link
Contributor

This PR fixes #54717

Problem
The current code in ValidationRuleParser explodeExplicitRule function does not handles the explode for multiple chained non-nested Date or Numeric Rule objects. It falls into the condtion that checks if the rule is an object and wraps the rule in an array as a string cast without exploding it at the pipe symbol.

Fix Implementation

My fix simply add an early exit condition for Date or Numeric rules in the logic if block for objects.
I added some test coverage for the problematic conditions.

I thought of checking against the Stringable interface but it may not be safe enough.

Please let me know if you need any changes to the fix.

Thanks !

@AlexandreMeledandri
Copy link
Contributor Author

AlexandreMeledandri commented Feb 19, 2025

Test for php 8.3 is failing due to a file permission error in an unrelated test. Any idea why ?

1) Illuminate\Tests\Integration\Console\CommandSchedulingTest::testExecutionOrder with data set "Background" (true, ['foreground:before', 'handled', 'background:after']) ErrorException: file_put_contents(D:\a\framework\framework\vendor\orchestra\testbench-core\laravel\artisan): Failed to open stream: Permission denied 
@taylorotwell taylorotwell merged commit 1f5e383 into laravel:11.x Feb 19, 2025
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants