Files
pest/tests
Bartłomiej Gajda fa6e96486e fix(sharding): strip every paratest-only option from the --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>
2026-11-27 11:54:04 +05:30
..
2026-07-18 01:10:01 +01:00
2026-07-18 01:10:01 +01:00
2026-08-07 14:52:56 +01:00
2026-07-18 01:10:01 +01:00
2026-07-19 03:41:57 +01:00
2026-07-18 01:10:01 +01:00
2026-07-18 01:10:01 +01:00