From 4b4e28b602488921c831e40be581dfb7722f4c55 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 25 Nov 2026 10:20:43 +0100 Subject: [PATCH 1/2] [Set] Remove internal SetList::PHP_POLYFILLS constant --- src/Configuration/RectorConfigBuilder.php | 4 +++- src/Set/ValueObject/SetList.php | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index 473a1215bac..b36b106ca12 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -44,6 +44,8 @@ final class RectorConfigBuilder { private const int MAX_LEVEL_GAP = 10; + private const string PHP_POLYFILLS_SET = __DIR__ . '/../../config/set/php-polyfills.php'; + /** * Matches the deprecated per-version PHP set files, e.g. .../config/set/php82.php or .../config/set/level/up-to-php82.php */ @@ -199,7 +201,7 @@ public function __invoke(RectorConfig $rectorConfig): void { // not to miss it by accident if ($this->isWithPhpSetsUsed === true) { - $this->sets[] = SetList::PHP_POLYFILLS; + $this->sets[] = self::PHP_POLYFILLS_SET; } if ($this->isPhpSetsVersionPicked && $this->pickedPhpSetsVersion !== null) { diff --git a/src/Set/ValueObject/SetList.php b/src/Set/ValueObject/SetList.php index 03a20d9e7ad..fb84378a815 100644 --- a/src/Set/ValueObject/SetList.php +++ b/src/Set/ValueObject/SetList.php @@ -6,11 +6,6 @@ final class SetList { - /** - * @internal - */ - public const string PHP_POLYFILLS = __DIR__ . '/../../../config/set/php-polyfills.php'; - public const string CODE_QUALITY = __DIR__ . '/../../../config/set/code-quality.php'; public const string CODING_STYLE = __DIR__ . '/../../../config/set/coding-style.php'; From 2d21ee825c693ad3fcfa8339628366cd7a821d8b Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 25 Nov 2026 10:22:48 +0100 Subject: [PATCH 2/2] Inline polyfill set path --- src/Configuration/RectorConfigBuilder.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index b36b106ca12..0cc9153467d 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -44,8 +44,6 @@ final class RectorConfigBuilder { private const int MAX_LEVEL_GAP = 10; - private const string PHP_POLYFILLS_SET = __DIR__ . '/../../config/set/php-polyfills.php'; - /** * Matches the deprecated per-version PHP set files, e.g. .../config/set/php82.php or .../config/set/level/up-to-php82.php */ @@ -201,7 +199,7 @@ public function __invoke(RectorConfig $rectorConfig): void { // not to miss it by accident if ($this->isWithPhpSetsUsed === true) { - $this->sets[] = self::PHP_POLYFILLS_SET; + $this->sets[] = __DIR__ . '/../../config/set/php-polyfills.php'; } if ($this->isPhpSetsVersionPicked && $this->pickedPhpSetsVersion !== null) {