From 91d9e5d72bae8e907a618aaf3e8580a3fa0f1e99 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 22 Oct 2025 21:04:31 +0700 Subject: [PATCH 1/2] Remove AttributeGroupNewLiner usage as removed in dev-main --- .../MakeModelAttributesAndScopesProtectedRector.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php b/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php index 07db13c7..0005999e 100644 --- a/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php +++ b/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php @@ -10,7 +10,6 @@ use PHPStan\Reflection\ClassReflection; use PHPStan\Type\ObjectType; use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer; -use Rector\Php81\NodeManipulator\AttributeGroupNewLiner; use Rector\PHPStan\ScopeFetcher; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use RectorLaravel\AbstractRector; @@ -24,8 +23,7 @@ class MakeModelAttributesAndScopesProtectedRector extends AbstractRector { public function __construct( private readonly VisibilityManipulator $visibilityManipulator, - private readonly PhpAttributeAnalyzer $phpAttributeAnalyzer, - private readonly AttributeGroupNewLiner $attributeGroupNewLiner, + private readonly PhpAttributeAnalyzer $phpAttributeAnalyzer ) {} public function getRuleDefinition(): RuleDefinition @@ -90,10 +88,6 @@ public function refactor(Node $node): ?Node $this->visibilityManipulator->makeProtected($node); - if ($node->attrGroups !== []) { - $this->attributeGroupNewLiner->newLine($this->file, $node); - } - return $node; } From 56e9a481f2cc203a27194f8c816cd2608d278bbb Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 22 Oct 2025 21:07:27 +0700 Subject: [PATCH 2/2] re-run rector --- src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php index faad85ef..8823fdbc 100644 --- a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php +++ b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php @@ -113,7 +113,7 @@ private function handleBinaryOp(BinaryOp $binaryOp): array $methodCall = array_values( array_filter( [$binaryOp->left, $binaryOp->right], - fn ($node) => $this->validMethodCall($node), + $this->validMethodCall(...), ) )[0] ?? null;