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 */
|
||||
$watchPatterns = Container::getInstance()->get(Tia\WatchPatterns::class);
|
||||
$cliEnabled = $this->hasArgument(self::OPTION, $arguments);
|
||||
$alwaysEnabled = $watchPatterns->isAlways()
|
||||
$alwaysEnabled = $watchPatterns->isEnabled()
|
||||
&& (! $watchPatterns->isLocally() || Environment::name() === Environment::LOCAL);
|
||||
$enabled = $cliEnabled || $alwaysEnabled;
|
||||
$this->filteredMode = $this->hasArgument(self::FILTERED_OPTION, $arguments) || $watchPatterns->isFiltered();
|
||||
@ -576,6 +576,7 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
||||
&& ! $forceRebuild
|
||||
&& ! $this->baselineFetchAttemptedForDrift
|
||||
&& $this->baselineSync->fetchIfAvailable($projectRoot, $this->forceRefetch)) {
|
||||
$this->baselineFetchAttemptedForDrift = true;
|
||||
$graph = $this->loadGraph($projectRoot);
|
||||
if ($graph instanceof Graph) {
|
||||
$graph = $this->reconcileFingerprint($graph, $fingerprint);
|
||||
|
||||
@ -33,7 +33,7 @@ final class Configuration
|
||||
{
|
||||
/** @var WatchPatterns $watchPatterns */
|
||||
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
||||
$watchPatterns->markAlways();
|
||||
$watchPatterns->markEnabled();
|
||||
|
||||
return $this;
|
||||
}
|
||||
@ -49,6 +49,7 @@ final class Configuration
|
||||
{
|
||||
/** @var WatchPatterns $watchPatterns */
|
||||
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
||||
$watchPatterns->markEnabled();
|
||||
$watchPatterns->markLocally();
|
||||
|
||||
return $this;
|
||||
|
||||
@ -43,7 +43,7 @@ final class WatchPatterns
|
||||
*/
|
||||
private array $patterns = [];
|
||||
|
||||
private bool $always = false;
|
||||
private bool $enabled = false;
|
||||
|
||||
private bool $locally = false;
|
||||
|
||||
@ -155,14 +155,14 @@ final class WatchPatterns
|
||||
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
|
||||
@ -188,7 +188,7 @@ final class WatchPatterns
|
||||
public function reset(): void
|
||||
{
|
||||
$this->patterns = [];
|
||||
$this->always = false;
|
||||
$this->enabled = false;
|
||||
$this->locally = false;
|
||||
$this->filtered = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user