Closed parth391 closed 7 months ago
That means you need to exclude __DIR__ . '/vendor
from the paths when possible in the rector config, eg, only src
paths:
<?php
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
])
->withRules([
TypedPropertyFromAssignsRector::class
]);
If you have vendor/
but not in the root directory, like what laravel vendor in templates part, you can try latest rector/rector:dev-main that already cover it at PR:
with
composer config minimum-stability dev
composer config prefer-stable true
composer require --dev rector/rector:dev-main
If you have vendor/
that needs code upgrade, I suggest to upgrade the version of dependency instead.
Could you create a reproducible repo?
@samsonasik, one of my sub-folder had a vendor folder in it. By adding bellow code fix the issue.
$rectorConfig->skip([
__DIR__.'/**/vendor/*',
]);
That already handled on latest dev-main 👍
Yes, i am looking forward for new release.
1.0.1 is tagged https://github.com/rectorphp/rector/releases/tag/1.0.1
Question
Getting bellow warning on,
vendor/bin/rector process