ServiceSetStringNameToClassNameRector

Change $service->set() string names to class-type-based names, to allow $container->get() by types in Symfony 2.8. Provide XML config via $rectorConfig->symfonyContainerXml(...);

 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

 return static function (ContainerConfigurator $containerConfigurator): void {
     $services = $containerConfigurator->services();

-    $services->set('some_name', App\SomeClass::class);
+    $services->set('app\\someclass', App\SomeClass::class);
 };

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Configs\Rector\Closure\ServiceSetStringNameToClassNameRector;

return RectorConfig::configure()
    ->withRules([
        ServiceSetStringNameToClassNameRector::class,
    ]);
SETS:  Configs