[Bug]: Pest 4: Unknown option "--processes" when Using Sharding
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.7k
- Forks
- 538
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
What Happened
./vendor/bin/pest --processes=12 --shard=1/4 --parallel
Symfony\Component\Process\Exception\ProcessFailedException
The command "'php' './vendor/bin/pest' '--processes=12' '--cache-directory' '/Users/adam/Projects/app/vendor/pestphp/pest/.temp' '--no-output' '--list-tests'" failed.
Exit Code: 2(Misuse of shell builtins)
Working directory: /Users/adam/Projects/app
Output:
================
INFO Unknown option "--processes".
Error Output:
================
at vendor/symfony/process/Process.php:269
265▕ */
266▕ public function mustRun(?callable $callback = null, array $env = []): static
267▕ {
268▕ if (0 !== $this->run($callback, $env)) {
➜ 269▕ throw new ProcessFailedException($this);
270▕ }
271▕
272▕ return $this;
273▕ }
/vendor/bin/pest --processes=12 --parallel
works normally
How to Reproduce
run /vendor/bin/pest --processes=12 --shard=1/4 --parallel
Sample Repository
No response
Pest Version
4.0.0
PHP Version
8.3.16
Operation System
macOS
Notes
This is happening on my local and CI.
Our CI runs faster when we have 12 be the process but sucks that shards seem to break process
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
Reproduce the issue with ./vendor/bin/pest --processes=12 --shard=1/4 --parallel, then compare it with the working --processes=12 --parallel command. Start at the Pest CLI handling for sharding and process options, using the failure location in vendor/symfony/process/Process.php:269 as context. Done means sharded parallel runs accept --processes and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100