Pest v4 does not terminate when executed inside a Deployer `runLocally` task
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.7k
- Forks
- 538
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
Pest v4 does not terminate when executed inside a Deployer runLocally task
Description
When running Pest v4 inside a Deployer runLocally task, the command never terminates and the task hangs indefinitely.
With Pest v3, the same setup works as expected.
Steps to Reproduce
-
Create a Deployer task:
// Runs architecture tests task( 'test:architecture', function () { $output = runLocally('composer test-architecture'); writeln('<info>'.$output.'</info>'); } )->desc('Run architectural tests'); -
Add the following script to your
composer.json:"scripts": { "test-architecture": "XDEBUG_MODE=off ./vendor/bin/pest --parallel --bail --group=architectural --colors=always" } -
Run the task via Deployer:
dep test:architecture -vvv
Expected Behavior (Pest v3)
The task completes successfully:
Actual Behavior (Pest v4)
The task does not terminate.
The test results are printed, but runLocally never finishes, so the deployment process hangs:
Environment
- Laravel: 12.x
- Pest version: 4.0.4
- Deployer version: 7.x
- PHP version: 8.4.x
- OS: macOS Sonoma
Notes
- Works correctly with Pest v3.
- The issue only occurs when running via Deployer’s
runLocally; runningcomposer test-architecturemanually in the shell works fine. - Appears related to process handling / termination in Pest v4.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hang with the Deployer runLocally task and the composer test-architecture script, then compare execution under Pest v3 and v4. Focus on Pest v4's parallel process handling and termination behavior; done means the Deployer task exits after printing results, while manual composer execution remains functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100