Skip to content

Commit

Permalink
remove deprecated RectorConfig::disableImportNames(), use importNames…
Browse files Browse the repository at this point in the history
…(false) instead
  • Loading branch information
TomasVotruba committed Dec 3, 2022
1 parent 7507589 commit 2f0fca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 3 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
$rectorConfig->bootstrapFiles([]);
$rectorConfig->parallel(seconds: 120, maxNumberOfProcess: 16, jobSize: 20);

$rectorConfig->disableImportNames();
// to avoid autoimporting out of the box
$rectorConfig->importNames(false);

This comment has been minimized.

Copy link
@samsonasik

samsonasik Dec 3, 2022

Member

@TomasVotruba The AUTO_IMPORT_DOC_BLOCK_NAMES will be enabled by default for this, use (false, false) instead to ensure all false.

This comment has been minimized.

Copy link
@TomasVotruba

TomasVotruba Dec 3, 2022

Author Member

Good point. Done 👍


$rectorConfig->importShortClasses();
$rectorConfig->indent(' ', 4);

Expand Down
9 changes: 0 additions & 9 deletions packages/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@ public function importShortClasses(bool $importShortClasses = true): void
$parameters->set(Option::IMPORT_SHORT_CLASSES, $importShortClasses);
}

/**
* @deprecated Use @see \Rector\Config\RectorConfig::importNames(false) instead
*/
public function disableImportNames(): void
{
$parameters = $this->parameters();
$parameters->set(Option::AUTO_IMPORT_NAMES, false);
}

/**
* Set PHPStan custom config to load extensions and custom configuration to Rector.
* By default, the "phpstan.neon" path is used.
Expand Down

0 comments on commit 2f0fca8

Please sign in to comment.