each() function is deprecated, use key() and current() instead
-list($key, $callback) = each($callbacks);
+$key = key($callbacks);
+$callback = current($callbacks);
+next($callbacks);
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php72\Rector\Assign\ListEachRector;
return RectorConfig::configure()
->withRules([
ListEachRector::class,
]);