[12.x] Add option to opt out of parallel safe cache prefix#58801
Merged
taylorotwell merged 8 commits intolaravel:12.xfrom Feb 13, 2026
Merged
Conversation
|
Thanks for submitting a PR! Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
|
Thanks for the quick response! Is it possible to support this in the test setup code as well? We’d love to avoid adding it to every command. |
Contributor
Author
|
@mgjgid You can add this to your phpunit.xml: or in your setup method (make sure you teardown) |
DarkGhostHunter
pushed a commit
to DarkGhostHunter/laravel-framework
that referenced
this pull request
Feb 22, 2026
…8801) * 12.x-option-to-opt-out-of-cache-prefix * adjust * adjust * Update TestCaches.php * Update TestCaches.php * inside setUpTestCase for easier opt out * add test * cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applications that intentionally share cache state across parallel test processes cant opt out. This was recently added in the last release.
With this PR it means you can currently control this via
LARAVEL_PARALLEL_TESTING_WITHOUT_CACHE.Open to renaming , but this follows the same as without_databases .
I've intentionally put the option check inside setUpTestCase so people can opt out within their testcases re feedback below..
I'll need to do a PR to collision to allow:
php artisan test --parallel --without_cache- will do that if this is merged..Thanks!
This closes #58800