mirror of
https://github.com/pestphp/pest.git
synced 2026-12-03 22:45:06 +01:00
fa6e96486ee63aa5c58588b1ae4b3cd7a727badd
--list-tests sub-process (#2076)
* fix(sharding): strip every paratest-only option from the `--list-tests` sub-process
`--update-shards` (and `--shard` without a shards.json) discovers the test classes by
re-running Pest with `--list-tests`. That sub-process is a plain PHPUnit run, but only
`--parallel`, `-p`, `--processes` and `--runner` were removed from its arguments, so any
other ParaTest option killed the run before a single test:
pest --parallel --update-shards --max-batch-size=100
Unknown option "--max-batch-size".
Strip every option ParaTest defines that PHPUnit does not (`--max-batch-size`/`-m`,
`--max-processes`, `--passthru-php`, `--tmp-dir`, `--functional`, `--no-test-tokens`,
plus the existing `--processes` and `--runner`), in both `--option=value` and
`--option value` form.
* fix(sharding): strip ParaTest's `-m` with its value attached (`-m100`)
ParaTest reads `-m100` as `--max-batch-size=100`, but the option check split
arguments on `=` only, so the attached form reached PHPUnit's `--list-tests`
sub-process, which rejects `-m`. `-p` is left alone: Pest reads it as
`--parallel`.
---------
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
Pest v5 Now Available: Read the announcement ».
Pest is an elegant testing framework for PHP developers and AI agents.
- Explore our docs at pestphp.com »
- Follow the creator Nuno Maduro:
- YouTube: youtube.com/@nunomaduro — Videos every week
- Twitch: twitch.tv/nunomaduro — Live coding on Mondays, Wednesdays, and Fridays at 9PM UTC
- Twitter / X: x.com/enunomaduro
- LinkedIn: linkedin.com/in/nunomaduro
- Instagram: instagram.com/enunomaduro
- Tiktok: tiktok.com/@enunomaduro
Sponsors
We cannot thank our sponsors enough for their incredible support in funding Pest's development. Their contributions have been instrumental in making Pest the best it can be. For those who are interested in becoming a sponsor, please visit Nuno Maduro's Sponsor page at github.com/sponsors/nunomaduro.
- PhpStorm
- CodeRabbit
- SerpApi
- Redberry
- Typesense
- Pixel
- NativePHP
- TestMu AI
- Zapiet
- Route4Me
- Pushery
- LFCarry
Pest is an open-sourced software licensed under the MIT license.
Languages
PHP
99.3%
HTML
0.6%
