mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
wip
This commit is contained in:
@ -212,7 +212,7 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
/** @var Tia\WatchPatterns $watchPatterns */
|
/** @var Tia\WatchPatterns $watchPatterns */
|
||||||
$watchPatterns = Container::getInstance()->get(Tia\WatchPatterns::class);
|
$watchPatterns = Container::getInstance()->get(Tia\WatchPatterns::class);
|
||||||
$cliEnabled = $this->hasArgument(self::OPTION, $arguments);
|
$cliEnabled = $this->hasArgument(self::OPTION, $arguments);
|
||||||
$alwaysEnabled = $watchPatterns->isAlways()
|
$alwaysEnabled = $watchPatterns->isEnabled()
|
||||||
&& (! $watchPatterns->isLocally() || Environment::name() === Environment::LOCAL);
|
&& (! $watchPatterns->isLocally() || Environment::name() === Environment::LOCAL);
|
||||||
$enabled = $cliEnabled || $alwaysEnabled;
|
$enabled = $cliEnabled || $alwaysEnabled;
|
||||||
$this->filteredMode = $this->hasArgument(self::FILTERED_OPTION, $arguments) || $watchPatterns->isFiltered();
|
$this->filteredMode = $this->hasArgument(self::FILTERED_OPTION, $arguments) || $watchPatterns->isFiltered();
|
||||||
@ -576,6 +576,7 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
&& ! $forceRebuild
|
&& ! $forceRebuild
|
||||||
&& ! $this->baselineFetchAttemptedForDrift
|
&& ! $this->baselineFetchAttemptedForDrift
|
||||||
&& $this->baselineSync->fetchIfAvailable($projectRoot, $this->forceRefetch)) {
|
&& $this->baselineSync->fetchIfAvailable($projectRoot, $this->forceRefetch)) {
|
||||||
|
$this->baselineFetchAttemptedForDrift = true;
|
||||||
$graph = $this->loadGraph($projectRoot);
|
$graph = $this->loadGraph($projectRoot);
|
||||||
if ($graph instanceof Graph) {
|
if ($graph instanceof Graph) {
|
||||||
$graph = $this->reconcileFingerprint($graph, $fingerprint);
|
$graph = $this->reconcileFingerprint($graph, $fingerprint);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ final class Configuration
|
|||||||
{
|
{
|
||||||
/** @var WatchPatterns $watchPatterns */
|
/** @var WatchPatterns $watchPatterns */
|
||||||
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
||||||
$watchPatterns->markAlways();
|
$watchPatterns->markEnabled();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -49,6 +49,7 @@ final class Configuration
|
|||||||
{
|
{
|
||||||
/** @var WatchPatterns $watchPatterns */
|
/** @var WatchPatterns $watchPatterns */
|
||||||
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
||||||
|
$watchPatterns->markEnabled();
|
||||||
$watchPatterns->markLocally();
|
$watchPatterns->markLocally();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ final class WatchPatterns
|
|||||||
*/
|
*/
|
||||||
private array $patterns = [];
|
private array $patterns = [];
|
||||||
|
|
||||||
private bool $always = false;
|
private bool $enabled = false;
|
||||||
|
|
||||||
private bool $locally = false;
|
private bool $locally = false;
|
||||||
|
|
||||||
@ -155,14 +155,14 @@ final class WatchPatterns
|
|||||||
return $affected;
|
return $affected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markAlways(): void
|
public function markEnabled(): void
|
||||||
{
|
{
|
||||||
$this->always = true;
|
$this->enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAlways(): bool
|
public function isEnabled(): bool
|
||||||
{
|
{
|
||||||
return $this->always;
|
return $this->enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markLocally(): void
|
public function markLocally(): void
|
||||||
@ -188,7 +188,7 @@ final class WatchPatterns
|
|||||||
public function reset(): void
|
public function reset(): void
|
||||||
{
|
{
|
||||||
$this->patterns = [];
|
$this->patterns = [];
|
||||||
$this->always = false;
|
$this->enabled = false;
|
||||||
$this->locally = false;
|
$this->locally = false;
|
||||||
$this->filtered = false;
|
$this->filtered = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user