KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 286 forks source link

Upgrade 1 to 2 issue #734

Open kemoc opened 11 months ago

kemoc commented 11 months ago

I have updated rector.php file:

` declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Symfony\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector;
use Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
use Rector\Core\Configuration\Option;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Rector\Doctrine\Set\DoctrineSetList;

return static function (ContainerConfigurator $containerConfigurator): void {
    $containerConfigurator->import(DoctrineSetList::DOCTRINE_BEHAVIORS_20);
};
return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->paths([
        __DIR__ . '/src',
    ]);

    $rectorConfig->rule(RemoveServiceFromSensioRouteRector::class);
    $rectorConfig->rule(ReplaceSensioRouteAnnotationWithSymfonyRector::class);
    $rectorConfig->rule(MergeMethodAnnotationToRouteAnnotationRector::class);
};

`

then run command:

vendor/bin/rector process src

error:

[ERROR] Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::__construct(): Argument #1 ($container) must be of type Symfony\Component\DependencyInjection\ContainerBuilder, RectorPrefix202304\Symfony\Component\DependencyInjection\ContainerBuilder given

Do i have rector.php file configured correctly?