Commit Graph

3114 Commits

Author SHA1 Message Date
wadakatu a7566152fd fix: bump PHPUnit to 13.4.5 for GHSA-9vw2-f4vp-x7gf (#1995) 2026-10-27 10:34:19 +00:00
Tiago Santos 7abf68e706 fix: allow --init without a tests directory (#1939)
* 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>
2026-10-26 16:21:56 +05:30
Paul Sochiera f730a186ce test(shard): cover module test classes outside the tests directory (#1689)
* 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>
2026-10-26 00:01:09 +05:30
Owen Voke d534cb2c40 fix: avoid passing an object when invoking static methods via reflection (#1988)
* 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
2026-10-23 22:05:56 +05:30
Gustavo Meireles 1b3ca5ba41 feat: restore coversNothing() (#1981) 2026-10-18 21:53:51 +01:00
nuno maduro c947def97e release: 5.3.3 v5.3.3 2026-10-18 12:51:10 +01:00
nuno maduro 3e5a2410b7 fix: phpunit classes not being inlcuded on sharding 2026-10-18 12:28:03 +01:00
Pushpak Chhajed e9fa0f50c5 perf: O(1) test method lookup 2026-10-16 22:20:38 +05:30
Pushpak Chhajed b6dddcc821 perf: stop spawning stty for every test when output is not a TTY 2026-10-16 22:20:30 +05:30
Muhammed Alkhudiry 3a5a14b6a6 fix: reduce parallel worker polling interval to 1 ms (#1967)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:19:33 +05:30
nuno maduro 73fe04f8c3 fix: support with paratest v5.3.2 2026-10-12 21:28:57 +04:00
Punyapal Shah 5b98dc7df2 fix(sharding): prevent shard filters from matching classes outside their partition (#1884)
* fix(sharding): prevent shard filters from matching classes outside their partition

* lint

* test: update snapshots for the shard filter boundary cases
2026-10-12 00:09:04 +05:30
Punyapal Shah 68b4c9176d ci: bump shivammathur/setup-php to 2.40.0 for PHP 8.5 on macos-latest (#1961)
* fix: support brianium/paratest 7.26.1 worker tmp dir

paratest 7.26.1 added a required $tmpDir argument to WrapperWorker and
keeps worker files in a private per-run directory. Create that 0700
directory per run, pass it to each worker and remove it on completion.
Require paratest ^7.26.1.

* ci: bump shivammathur/setup-php to 2.40.0 for PHP 8.5 on macos-latest

---------

Co-authored-by: ExeQue <mmh@harders-it.dk>
2026-10-11 22:43:11 +05:30
Morten Harders 5f3d0f2124 fix: support brianium/paratest 7.26.1 worker tmp dir (#1959)
paratest 7.26.1 added a required $tmpDir argument to WrapperWorker and
keeps worker files in a private per-run directory. Create that 0700
directory per run, pass it to each worker and remove it on completion.
Require paratest ^7.26.1.
2026-10-11 22:42:40 +05:30
nuno maduro 83baa5de2f chore: bumps v5.3.1 2026-10-08 00:11:43 +04:00
nuno maduro 0a2a6e9f0f chore: bumps 2026-10-08 00:02:48 +04:00
nuno maduro 9714c8553f release: 5.3.1 2026-10-07 23:02:36 +04:00
nuno maduro 14a3efd918 release: 5.3.0 v5.3.0 2026-10-01 17:58:48 +01:00
Daniel Polito 8b6607e344 fix(tia): reuse baselines across replacement CI merge commits (#1923)
* perf(tia): reuse baselines across replacement CI merge commits

* style: apply Rector rules to merge baseline validation
2026-09-18 14:30:59 +05:30
nunomaduro 94f4f1ff48 release: 5.2.1 v5.2.1 2026-09-17 12:41:10 +01:00
nunomaduro f0dd0d4d85 fix: link warning 2026-09-17 12:37:05 +01:00
Sergio Peris 4b4474dd77 Regression: Command gh not found on Windows - #1895 (#1922)
* fixes regression

* Update BaseRemote.php

Signed-off-by: Sergio Peris <22801379+sertxudev@users.noreply.github.com>

---------

Signed-off-by: Sergio Peris <22801379+sertxudev@users.noreply.github.com>
2026-09-17 11:49:34 +01:00
nuno maduro 942d6aead1 chore: ci fixes v5.2.0 2026-09-14 15:41:18 +01:00
Caleb White 7cdebc6a95 fix(tia): persist state on detached HEAD- #1844 (#1891)
* refactor: extract shared CI detection utility

Consolidate duplicated CI environment detection logic from
Snapshot and BaselineSync into a shared Pest\Support\Ci class.

This reduces duplication and provides a single source of truth
for CI detection, including comprehensive environment variable
checks for all major CI providers.

* fix(tia): persist state on detached HEAD

Allow detached checkouts to write, delete, and rebuild TIA state so
baseline publishers and local detached workflows produce a usable graph.

Resolve the writable baseline from the Git branch, CI branch metadata, or
a stable workspace key. Keep the default branch as the read fallback so
local workspaces can use a published baseline without changing it.
2026-09-14 19:26:59 +05:30
nuno maduro c9c3a8c34a release: 5.2.0 2026-09-14 14:39:20 +01:00
Caleb White 06400e721e feat(tia): add GitLab CI baseline support (#1841)
Extract BaselineSync into a provider architecture with an abstract
BaseRemote class and concrete GitHubRemote/GitLabRemote implementations.

GitLab support uses the glab CLI to fetch TIA baselines from CI
pipelines. The GitLabRemote queries the GitLab API for the latest
successful job matching the configured name on the default branch,
then downloads artifacts via `glab job artifact`.

Self-hosted GitLab instances are supported automatically: any
non-GitHub remote is detected as GitLab when the glab CLI is
installed, with authentication validated at fetch time.

Key changes:
- BaseRemote abstract class holds shared logic: CLI existence/auth
  checks, error classification, git remote URL parsing, and default
  branch resolution
- GitHubRemote extracts existing gh CLI logic unchanged
- GitLabRemote adds glab CLI support with default job name
  `tia-baseline`, configurable via `->baselined(job: "name")`
- BaselineSync becomes a provider-agnostic orchestrator that iterates
  registered remotes to detect the matching CI provider
- Configuration::baselined() accepts optional `job` parameter for
  GitLab job name customization
- GitLab job query filters by both job name and default branch ref
  to ensure cache key matches downloaded artifact
2026-09-14 10:59:56 +01:00
Sergio Peris c42a2719e4 Command gh not found on Windows (#1895)
* wip

* Update BaselineSync.php

Signed-off-by: Sergio Peris <22801379+sertxudev@users.noreply.github.com>

---------

Signed-off-by: Sergio Peris <22801379+sertxudev@users.noreply.github.com>
2026-09-09 15:56:23 +05:30
Lazizbek Ergashev 2440001cfc fix: datasets with a single named argument (#1894) 2026-09-08 21:12:15 +05:30
nuno maduro e68976ea9d release: 5.1.4 v5.1.4 2026-09-07 12:01:12 +01:00
Caleb White 17d709e32b chore: rector fixes (#1898) 2026-09-04 18:33:34 +05:30
Lazizbek Ergashev 46df02dc28 fix: key Tia worker partials per process to survive batch recycling (#1782)
* 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>
2026-08-26 14:06:49 +05:30
Caleb White fc17365bd1 fix(tia): suppress PHPUnit XML coverage during recording (#1845)
When phpunit.xml has <coverage> and <source> sections, PHPUnit
auto-initializes its code coverage driver which takes over
xdebug's coverage APIs. TIA's recorder then gets empty data
from xdebug_get_code_coverage(), resulting in zero recorded
edges and no graph being saved.

Inject --no-coverage into the arguments when TIA enters its
own recording mode (not piggybacking on an explicit coverage
report). This tells PHPUnit to ignore XML-configured coverage
reports, leaving xdebug free for TIA's per-test recording.

Having <coverage> and <source> in phpunit.xml is standard for
any project that generates coverage reports. Without this fix,
users must manually pass --no-coverage alongside --tia, which
is an unnecessary footgun.
2026-08-26 01:25:57 +05:30
Lazizbek Ergashev 20a5aacaca fix(tia): re-anchor after a full suite run without a coverage driver (#1866)
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
v5.1.3
2026-08-25 23:45:02 +05:30
nuno maduro eac05bcee9 release: 5.1.3 2026-08-25 18:10:42 +01:00
Pushpak Chhajed b5b2ba7d7f chore: drop boost pest-testing skill (#1889)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 16:42:49 +01:00
nuno maduro 627092ecfc chore: bumps deps v5.1.2 2026-08-24 14:06:57 +01:00
nuno maduro 2692613f09 chore: ignore hod 2026-08-24 10:58:51 +01:00
nuno maduro e763a87b42 chore: updates snapshots 2026-08-24 10:51:08 +01:00
nuno maduro 4a65054f83 chore: style 2026-08-24 09:39:08 +01:00
nuno maduro b8c2265d66 fix: snapshot key on retry / repeat 2026-08-24 09:31:34 +01:00
Daniel Polito 39cbdcd52b Prevent memory exhaustion when generating TIA graphs with PCOV (#1875)
* fix(tia): preserve memory limit during pcov restart

* chore: update test expectations

* fix: stabilize tia replay test in ci
2026-08-24 08:41:59 +01:00
Lazizbek Ergashev aba2b79609 fix: exit code with --shard and --parallel (#1883)
* fix: exit code with --shard and --parallel

* fix: match existing argument-handling style in Shard
2026-08-24 08:41:01 +01:00
nuno maduro 1af74a215c chore: new sponsor 2026-08-18 19:42:16 +01:00
Andrew Matia cfe89d20ac Fix repeat with named dataset arguments (#1769) 2026-08-16 15:08:46 +01:00
nuno maduro 2c7cc1dc87 fix: static callable datasets 2026-08-13 18:38:27 +01:00
Lazizbek Ergashev 9b36f44b3e fix(tia): include the PHP minor version in the fingerprint (#1860) 2026-08-13 16:16:15 +01:00
Lazizbek Ergashev 2e58918201 fix(tia): treat a test skipped from a hook as finished (#1863) 2026-08-13 16:15:45 +01:00
nuno maduro a8d4770c0b chore: fix version 2026-08-12 15:37:18 +01:00
nuno maduro 208f447a10 chore: style v5.1.1 2026-08-12 15:29:21 +01:00
Daniel Polito 6b7ca13660 feat: allow configuring the TIA directory (#1787)
* 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
2026-08-12 14:53:45 +01:00