mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
Init command feature (#4329)
* add init command * update as per CI review * update as per CI review 2 * update as per CI review 3 * update as per testing command * update as per CI review
This commit is contained in:
parent
4578e6d849
commit
f67369735a
@ -2,13 +2,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Architecture\Rector\Class_\MoveRepositoryFromParentToConstructorRector;
|
||||
use Rector\Architecture\Rector\MethodCall\ReplaceParentRepositoryCallsByRepositoryPropertyRector;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Doctrine\Rector\Class_\RemoveRepositoryFromEntityAnnotationRector;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
use Rector\SOLID\Rector\Class_\FinalizeClassesWithoutChildrenRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
|
@ -45,7 +45,7 @@ final class InitCommand extends AbstractCommand
|
||||
$rectorConfigFiles = $this->smartFileSystem->exists(getcwd() . '/rector.php');
|
||||
|
||||
if (! $rectorConfigFiles) {
|
||||
$this->smartFileSystem->copy('rector.php.dist', getcwd() . '/rector.php');
|
||||
$this->smartFileSystem->copy(__DIR__ . '/../../../rector.php.dist', getcwd() . '/rector.php');
|
||||
$this->symfonyStyle->success('rector.php config file has been generated successfully');
|
||||
} else {
|
||||
$this->symfonyStyle->error('Config file not generated. A rector.php configuration file already exists');
|
||||
|
Loading…
x
Reference in New Issue
Block a user