Skip to content

Commit

Permalink
[DX] Fix missing Rector\RectorGenerator\Exception\ConfigurationExcept…
Browse files Browse the repository at this point in the history
…ion (#5558)
  • Loading branch information
samsonasik committed Feb 4, 2024
1 parent ba1cad3 commit 037153b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rules/Php80/Rector/Class_/AnnotationToAttributeRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Rector\PhpAttribute\NodeFactory\PhpAttributeGroupFactory;
use Rector\PhpDocParser\PhpDocParser\PhpDocNodeTraverser;
use Rector\Rector\AbstractRector;
use Rector\RectorGenerator\Exception\ConfigurationException;
use Rector\Exception\Configuration\InvalidConfigurationException;
use Rector\ValueObject\PhpVersionFeature;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
Expand Down Expand Up @@ -124,7 +124,7 @@ public function getNodeTypes(): array
public function refactor(Node $node): ?Node
{
if ($this->annotationsToAttributes === []) {
throw new ConfigurationException(sprintf('The "%s" rule requires configuration.', self::class));
throw new InvalidConfigurationException(sprintf('The "%s" rule requires configuration.', self::class));
}

$phpDocInfo = $this->phpDocInfoFactory->createFromNode($node);
Expand Down
6 changes: 3 additions & 3 deletions src/Util/MemoryLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Rector\Util;

use Nette\Utils\Strings;
use Rector\RectorGenerator\Exception\ConfigurationException;
use Rector\Exception\Configuration\InvalidConfigurationException;
use Rector\ValueObject\Configuration;

/**
Expand All @@ -32,7 +32,7 @@ public function adjust(Configuration $configuration): void

if ($memorySetResult === false) {
$errorMessage = sprintf('Memory limit "%s" cannot be set.', $memoryLimit);
throw new ConfigurationException($errorMessage);
throw new InvalidConfigurationException($errorMessage);
}
}

Expand All @@ -44,6 +44,6 @@ private function validateMemoryLimitFormat(string $memoryLimit): void
}

$errorMessage = sprintf('Invalid memory limit format "%s".', $memoryLimit);
throw new ConfigurationException($errorMessage);
throw new InvalidConfigurationException($errorMessage);
}
}

0 comments on commit 037153b

Please sign in to comment.