mirror of
https://github.com/pestphp/pest.git
synced 2026-12-04 06:55:05 +01:00
fa6e96486e
* 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>