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

[11.x] Fix for #52436 artisan schema:dump infinite recursion #52492

Merged
merged 5 commits into from
Aug 15, 2024

Conversation

rust17
Copy link
Contributor

@rust17 rust17 commented Aug 15, 2024

This PR fix the issue of potential infinite recursion when executing the schema:dump command in Laravel, as reported in #52436. This happens because the executeDumpProcess method can recursively call itself without a clear termination condition under certain error conditions, such as encountering column-statistics or set-gtid-purged exceptions (https://github.com/laravel/framework/issues/52436#issuecomment-2286679516https://github.com/laravel/framework/issues/52436#issuecomment-2286679516). Without a limit on the recursion depth, this can lead to an infinite loop, causing the process to hang or crash.

To improve this, a maximum recursion depth is to be introduced to ensure that the recursion terminates after a certain number of attempts, preventing the infinite loop and making the code more robust.

@taylorotwell taylorotwell merged commit 85165d7 into laravel:11.x Aug 15, 2024
29 checks passed
@driesvints
Copy link
Member

Thanks @rust17

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.

3 participants