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] Expose process checkTimeout method #54912

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

mattmcdev
Copy link
Contributor

This PR targets the same issue as this #54903 but without any breaking changes.

It just exposes the checkTimeout method and throws the same exception as wait would if the process has timed out.

This would update ensure the example use of Process::timeout() actually does something.

$process = Process::timeout(120)->start('bash import.sh');
 
while ($process->running()) {
    $process->checkTimeout()

    // ... 
}
 
$result = $process->wait();

As of right now, setting Process::timeout(x) and using $process->running as documented is pointless as the timeout will never happen.

@taylorotwell taylorotwell merged commit fd8cf8b into laravel:12.x Mar 5, 2025
39 checks passed
@mattmcdev mattmcdev deleted the expose-process-check-timeout branch March 6, 2025 14:09
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