mirror of
https://github.com/pestphp/pest.git
synced 2026-12-05 23:32:17 +01:00
fix(tia): fingerprint the configuration file the run uses (#1924)
* fix(tia): fingerprint the configuration file the run uses * fix(tia): tell --no-configuration and identical copies of the configuration apart * test(tia): cover the gitignore check with composer.lock, as the active configuration is fingerprinted tracked or not
This commit is contained in:
@@ -7,6 +7,7 @@ namespace Pest\Restarters;
|
||||
use Composer\XdebugHandler\XdebugHandler;
|
||||
use Pest\Contracts\Restarter;
|
||||
use Pest\Plugins\Tia;
|
||||
use Pest\Plugins\Tia\ConfigurationFile;
|
||||
use Pest\Plugins\Tia\Fingerprint;
|
||||
use Pest\Plugins\Tia\Graph;
|
||||
use Pest\Plugins\Tia\Storage;
|
||||
@@ -86,10 +87,13 @@ final class XdebugRestarter implements Restarter
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->tiaWillReplay($projectRoot);
|
||||
return $this->tiaWillReplay($projectRoot, $arguments);
|
||||
}
|
||||
|
||||
private function tiaWillReplay(string $projectRoot): bool
|
||||
/**
|
||||
* @param array<int, string> $arguments
|
||||
*/
|
||||
private function tiaWillReplay(string $projectRoot, array $arguments): bool
|
||||
{
|
||||
$path = Storage::tempDir($projectRoot).DIRECTORY_SEPARATOR.Tia::KEY_GRAPH;
|
||||
|
||||
@@ -111,7 +115,7 @@ final class XdebugRestarter implements Restarter
|
||||
|
||||
return Fingerprint::structuralMatches(
|
||||
$graph->fingerprint(),
|
||||
Fingerprint::compute($projectRoot),
|
||||
Fingerprint::compute($projectRoot, ConfigurationFile::fromArguments($arguments)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user