* fix(tia): skip locally() when the process is on CI
locally() only looked at --ci, so a CI job that followed the docs and
ran plain pest replayed cached results.
Fixes#1970
* test(tia): clear CI variables so the local assertion passes on CI
* test: update snapshots for TIA CI detection
---------
Co-authored-by: Tiago Santos <tsantos@lynixt.pt>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
* fix(tia): drop coverage lines the current file no longer has
An edited file left the previous line numbers in the cache as uncovered,
and a revert did not remove them.
Fixes#1954
* test: update snapshots for skipped stale coverage regression
---------
Co-authored-by: Tiago Santos <tsantos@lynixt.pt>
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
* fix: allow --init without a tests directory
Boot aborted before TIA state was registered, and shutdown then
tried to construct the plugin. That hid the real error behind
"State cannot be resolved" on a fresh install.
Closes#1934
* fix: detect --init anywhere in the arguments
Flags before --init were still treated as a normal run and failed when tests/ did not exist.
* fix: drop duplicate Kernel::$booted and share --init check
5.3.1 already gates plugin termination on boot, so the rebase must
not declare $booted again. --init and --init=value now share
HandleArguments::hasArgument, and the success snapshot includes
the new init tests.
* test: fix init suite expectations
Parallel total omitted the four --init tests, which
failed the success snapshot. Rector requires toBeFile().
---------
Co-authored-by: Tiago Santos <tsantos@lynixt.pt>
* test(shard): cover module test classes outside the tests directory
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore: refresh the snapshot counts
---------
Co-authored-by: Paul Sochiera <paul.sochiera@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
* fix: avoid passing an object when invoking static methods via reflection
PHP 8.6 deprecates passing an object to `ReflectionMethod::invoke()` for
static methods, which breaks higher-order assertions such as
`it('...')->assertTrue(true)` since `Assert::assertTrue()` is static.
* test: update visual snapshots for new reflection tests
* fix: key Tia worker partials per process to survive batch recycling
* test(tia): refresh visual snapshots for the worker token test
---------
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
* feat: allow configuring the TIA directory
* refactor: simplify TIA directory resolution
* fix: bootstrap TIA state after configuration
* chore: apply Rector to TIA storage test
* fix: stabilize checks on pull requests
* fix: align TIA fixture branch resolution
* fix: preserve success snapshot formatting
* fix: order TIA storage snapshot
* chore: keep TIA directory changes scoped
The Tia plugin scans the raw argv with str_starts_with() in
argumentPresent() and hasExplicitPathArgument(). In the parallel worker
path (bin/worker.php) the unserialized argv can contain an integer
--random-order-seed value as a separate element, which made
str_starts_with() throw:
TypeError: str_starts_with(): Argument #1 ($haystack) must be of
type string, int given
This is the same class of bug as #1206, which was only fixed in
HandleArguments; it resurfaced in the newer Tia plugin. Cast each argv
element to string before scanning, mirroring the #1206 fix.
Adds a regression test, and updates the parallel count assertion and the
success snapshot to account for it.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>