Skip to content

Commit

Permalink
note, down timeout to 60 seconds to spot bottle necks sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 31, 2023
1 parent 47b6389 commit 6700e1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ public function enableCollectors(): void
SimpleParameterProvider::setParameter(Option::COLLECTORS, true);
}

public function parallel(int $seconds = 120, int $maxNumberOfProcess = 32, int $jobSize = 20): void
/**
* Defaults in sync with https://phpstan.org/config-reference#parallel-processing
* as we run PHPStan as well
*/
public function parallel(int $processTimeout = 60, int $maxNumberOfProcess = 32, int $jobSize = 20): void
{
SimpleParameterProvider::setParameter(Option::PARALLEL, true);
SimpleParameterProvider::setParameter(Option::PARALLEL_JOB_TIMEOUT_IN_SECONDS, $seconds);
SimpleParameterProvider::setParameter(Option::PARALLEL_JOB_TIMEOUT_IN_SECONDS, $processTimeout);
SimpleParameterProvider::setParameter(Option::PARALLEL_MAX_NUMBER_OF_PROCESSES, $maxNumberOfProcess);
SimpleParameterProvider::setParameter(Option::PARALLEL_JOB_SIZE, $jobSize);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/Validation/RectorConfigValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ public static function ensureRectorRulesExist(array $skip): void
$nonExistingRules[] = $key;
continue;
}

if (! self::isRectorClassValue($value)) {
continue;
}

if (class_exists($value)) {
continue;
}

$nonExistingRules[] = $value;
}

Expand Down

0 comments on commit 6700e1c

Please sign in to comment.