Replace removed ContainerInterface alias with "service_container" service id in service() call
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
-return service(ContainerInterface::class);
+return service('service_container');
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony60\Rector\FuncCall\ContainerInterfaceServiceToServiceContainerRector;
return RectorConfig::configure()
->withRules([
ContainerInterfaceServiceToServiceContainerRector::class,
]);