From edf3b04c9860afb1b1f87ae27dbfbf74660fe1cd Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 14 Oct 2025 14:54:04 +0700 Subject: [PATCH] [Php81] Fix missing implements MinPhpVersionInterface on FunctionLikeToFirstClassCallableRector --- .../FunctionLikeToFirstClassCallableRector.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rules/CodingStyle/Rector/FunctionLike/FunctionLikeToFirstClassCallableRector.php b/rules/CodingStyle/Rector/FunctionLike/FunctionLikeToFirstClassCallableRector.php index c2c3925614d..e3bc2fd365c 100644 --- a/rules/CodingStyle/Rector/FunctionLike/FunctionLikeToFirstClassCallableRector.php +++ b/rules/CodingStyle/Rector/FunctionLike/FunctionLikeToFirstClassCallableRector.php @@ -20,13 +20,15 @@ use PHPStan\Analyser\Scope; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\ValueObject\PhpVersionFeature; +use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see \Rector\Tests\CodingStyle\Rector\FunctionLike\FunctionLikeToFirstClassCallableRector\FunctionLikeToFirstClassCallableRectorTest */ -final class FunctionLikeToFirstClassCallableRector extends AbstractRector +final class FunctionLikeToFirstClassCallableRector extends AbstractRector implements MinPhpVersionInterface { public function getRuleDefinition(): RuleDefinition { @@ -238,4 +240,9 @@ private function isChainedCall(FuncCall|MethodCall|StaticCall $callLike): bool return $callLike->var instanceof CallLike; } + + public function provideMinPhpVersion(): int + { + return PhpVersionFeature::FIRST_CLASS_CALLABLE_SYNTAX; + } }