From 8cb186674ad261729b602c039c4b60e9bf6be9f9 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 4 Feb 2024 21:53:39 +0000 Subject: [PATCH] Updated Rector to commit 037153ba50e85666dc8bdc90f832ea4c0ff3677e https://github.com/rectorphp/rector-src/commit/037153ba50e85666dc8bdc90f832ea4c0ff3677e [DX] Fix missing Rector\RectorGenerator\Exception\ConfigurationException (#5558) --- rules/Php80/Rector/Class_/AnnotationToAttributeRector.php | 4 ++-- src/Application/VersionResolver.php | 4 ++-- src/Util/MemoryLimiter.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php index 4415cdea832..3b96d4bb70d 100644 --- a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php +++ b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php @@ -32,7 +32,7 @@ use Rector\Php80\ValueObject\DoctrineTagAndAnnotationToAttribute; 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; @@ -143,7 +143,7 @@ CODE_SAMPLE 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); if (!$phpDocInfo instanceof PhpDocInfo) { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 7adc4ba7c35..02bd8a5dd2b 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'ba1cad35898880f6de97c9743aab96d2ac90ba73'; + public const PACKAGE_VERSION = '037153ba50e85666dc8bdc90f832ea4c0ff3677e'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-02-05 04:08:15'; + public const RELEASE_DATE = '2024-02-05 04:51:31'; /** * @var int */ diff --git a/src/Util/MemoryLimiter.php b/src/Util/MemoryLimiter.php index 2ab810ff1eb..77ad7980e4f 100644 --- a/src/Util/MemoryLimiter.php +++ b/src/Util/MemoryLimiter.php @@ -4,7 +4,7 @@ declare (strict_types=1); namespace Rector\Util; use RectorPrefix202402\Nette\Utils\Strings; -use Rector\RectorGenerator\Exception\ConfigurationException; +use Rector\Exception\Configuration\InvalidConfigurationException; use Rector\ValueObject\Configuration; /** * @inspiration https://github.com/phpstan/phpstan-src/commit/ccc046ca473dcdb5ce9225cc05d7808f2e327f40 @@ -26,7 +26,7 @@ final class MemoryLimiter $memorySetResult = \ini_set('memory_limit', $memoryLimit); if ($memorySetResult === \false) { $errorMessage = \sprintf('Memory limit "%s" cannot be set.', $memoryLimit); - throw new ConfigurationException($errorMessage); + throw new InvalidConfigurationException($errorMessage); } } private function validateMemoryLimitFormat(string $memoryLimit) : void @@ -36,6 +36,6 @@ final class MemoryLimiter return; } $errorMessage = \sprintf('Invalid memory limit format "%s".', $memoryLimit); - throw new ConfigurationException($errorMessage); + throw new InvalidConfigurationException($errorMessage); } }