Skip to content

[CodingStyle] Remove ConsistentImplodeRector from coding style level, as already in PHP 8.0 set - #8273

Merged
TomasVotruba merged 1 commit into
mainfrom
move-consistent-implode-to-php80
Aug 3, 2026
Merged

[CodingStyle] Remove ConsistentImplodeRector from coding style level, as already in PHP 8.0 set#8273
TomasVotruba merged 1 commit into
mainfrom
move-consistent-implode-to-php80

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

ConsistentImplodeRector is registered in both CodingStyleLevel and the PHP 8.0 set. The rule is not a style preference - implode($glue, $array) argument order became the only supported one in PHP 8.0, as the swapped implode($array, $glue) signature was removed. So it belongs to the PHP 8.0 set only.

The rule stays where it already is, in config/set/php80.php:

$rectorConfig->rules([
    // ...
    ConsistentImplodeRector::class,
]);

The change it makes:

-$itemsAsStrings = implode($items, '|');
+$itemsAsStrings = implode('|', $items);

Only the duplicate registration in src/Config/Level/CodingStyleLevel.php is dropped.

@TomasVotruba
TomasVotruba merged commit 2f5b100 into main Aug 3, 2026
64 checks passed
@TomasVotruba
TomasVotruba deleted the move-consistent-implode-to-php80 branch August 3, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant