Skip to content

Commit

Permalink
[dx] polyfill sets is running out of the box in php sets (#6591)
Browse files Browse the repository at this point in the history
* [dx] polyfill sets is running out of the box in php sets

* [ci-review] Rector Rectify

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
TomasVotruba and actions-user authored Dec 14, 2024
1 parent e81670c commit fa88e97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ public function __invoke(RectorConfig $rectorConfig): void
SimpleParameterProvider::addParameter(Option::COMPOSER_BASED_SETS, $this->groupLoadedSets);
}

// not to miss it by accident
if ($this->isWithPhpSetsUsed === true) {
$this->sets[] = SetList::PHP_POLYFILLS;
}

// merge sets together
$this->sets = array_merge($this->sets, $this->groupLoadedSets);

Expand Down Expand Up @@ -493,6 +498,7 @@ public function withAttributesSets(
}

/**
* @deprecated Already included in withPhpSets(), no need to repeat
* make use of polyfill packages in composer.json
*/
public function withPhpPolyfill(): self
Expand Down Expand Up @@ -522,7 +528,6 @@ public function withPhpSets(
bool $php84 = false, // place on later as BC break when used in php 7.x without named arg
): self {
$this->isWithPhpSetsUsed = true;
$this->withPhpPolyfill();

$pickedArguments = array_filter(func_get_args());
if ($pickedArguments !== []) {
Expand Down

0 comments on commit fa88e97

Please sign in to comment.