contao/contao-rector

Error on process command after recent update

NodokaMurmevent opened this issue · 3 comments

composer.json :

    "require-dev": {
        "rector/rector": "^1.0",
        "contao/contao-rector": "dev-main",
        "phpstan/phpstan": "^1.12"
    },

rector.php

use Contao\Rector\Set\ContaoLevelSetList;
use Contao\Rector\Set\ContaoSetList;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;

return RectorConfig::configure()
    ->withPaths([
        __DIR__ . '/src',
    ])
    ->withSkip([
        CombineIfRector::class
    ])
    ->withSets([
        SetList::CODING_STYLE,
        SetList::CODE_QUALITY,
        SetList::DEAD_CODE,
        SetList::TYPE_DECLARATION,
        SetList::PHP_74,
        LevelSetList::UP_TO_PHP_82,
        SymfonySetList::SYMFONY_64,
        ContaoSetList::ANNOTATIONS_TO_ATTRIBUTES,
        ContaoSetList::CONTAO_413,
        ContaoLevelSetList::UP_TO_CONTAO_53,
    ]);

RESULT :

[ERROR] Class "Contao\Rector\Set\ContaoSetList" not found
[ERROR] Class "Contao\Rector\Set\ContaoLevelSetList" not found

that's strange, these classes sure do exist. Can you try to reinstall the vendor and see if the classes exist?

Btw. your rector config kinda makes no sense. ContaoLevelSetList::UP_TO_CONTAO_53 includes ContaoSetList::CONTAO_413 and ContaoSetList::ANNOTATIONS_TO_ATTRIBUTES and SymfonySetList::SYMFONY_64

Ok, i am sorry it was just composer doing some strange thing. I needed to delete the lock file and the vendor and re-install all the deps (just re-install contao-rector was not enough)

ho and for the config, I was simply tested different class for this "bug". I close the non issue.

thanks for you help !