Skip to content

fix(tia): fingerprint the generated configuration like the restarter does - #2065

Open
jfatr wants to merge 1 commit into
pestphp:5.xfrom
jfatr:claude/fix-tia-generated-config-fingerprint-0e6374
Open

jfatr wants to merge 1 commit into
pestphp:5.xfrom
jfatr:claude/fix-tia-generated-config-fingerprint-0e6374

Conversation

@jfatr

@jfatr jfatr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

In a project without phpunit.xml, Pest\Plugins\Configuration adds --configuration <generated .pest.xml>. TIA fingerprinted that generated file, but XdebugRestarter fingerprinted the original arguments, which point to no file. The two fingerprints never matched, so a replay never dropped Xdebug. The fallback names .pest-fallback.xml and .pest-<random>.xml also changed the fingerprint between runs.

Tia::handleArguments now fingerprints the arguments that PHPUnit receives. Configuration::generatedConfigurationPath() gives the path of the generated file, and ConfigurationFile::fromArguments() treats that file as the project default, which is the value XdebugRestarter computes. When the user passes a configuration file, the last --configuration that PHPUnit reads decides the fingerprint.

tests/Unit/Plugins/Tia/ConfigurationFile.php runs the real Configuration plugin for the first, fallback and random names, and checks that the last configuration wins. tests/Features/Tia/ActiveConfiguration.php removes phpunit.xml from a project and checks that --tia replays the graph, also with a leftover .pest.xml, in sequential and parallel runs.

@MrPunyapal

Copy link
Copy Markdown
Member

Can you make the configuration test pass just one --configuration per invocation? PHPUnit warns when the option appears twice, which makes the unit suite exit 1. A single explicit config still tests that it gets a different fingerprint from Pest’s generated config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants