As title states, I'm only interested in issues that can affect PHP compatibility, but it keeps changing array() into [] etc. Any tips?
My rector.php config so far:
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([]);
$rectorConfig->sets([LevelSetList::UP_TO_PHP_82]);
$rectorConfig->paths([
// my paths
]);
};
Looks like the only way is to walk through the rules one by one and add them in the skip list? For example
->withSkip([
LongArrayToShortArrayRector::class,
// ... more rules that don't break compatibility actually
])
Sadly, lots of rules are related to best practice and using latest features, rather than what breaks PHP, polluting the needed changes with the recommended changes.
This did it for me
->withSkip([
Rector\Php54\Rector\Array_\LongArrayToShortArrayRector::class,
])
This helped me find rules
vendor/bin/rector list-rules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With