mirror of
https://github.com/pestphp/pest.git
synced 2026-12-05 15:22:17 +01:00
fix(tia): fingerprint the generated configuration like the restarter does (#2065)
* fix(tia): fingerprint the generated configuration like the restarter does * test(tia): pass one configuration option per call --------- Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ final readonly class ConfigurationFile
|
||||
/**
|
||||
* @param array<int, string> $arguments
|
||||
*/
|
||||
public static function fromArguments(array $arguments): self
|
||||
public static function fromArguments(array $arguments, ?string $generatedPath = null): self
|
||||
{
|
||||
try {
|
||||
$configuration = new Builder(EventFacade::emitter())->fromParameters(self::configurationParameters($arguments));
|
||||
@@ -41,6 +41,10 @@ final readonly class ConfigurationFile
|
||||
$file = new XmlConfigurationFileFinder()->find($configuration);
|
||||
$path = $file === false ? false : realpath($file);
|
||||
|
||||
if ($path !== false && $generatedPath !== null && $path === realpath($generatedPath)) {
|
||||
return self::projectDefault();
|
||||
}
|
||||
|
||||
return new self($path === false ? null : $path, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user