From d7080e5b059b44ccd532cdb2fc43bc818ba7982e Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 11 Jan 2024 09:41:13 +0100 Subject: [PATCH] Fix conflict resolution in github actions for dev. --- .github/workflows/functional_test__rector_examples.yml | 2 +- composer.json | 2 +- phpstan-baseline.neon | 5 +++++ src/Drupal8/Rector/Deprecation/EntityLoadRector.php | 4 +--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/functional_test__rector_examples.yml b/.github/workflows/functional_test__rector_examples.yml index 18f97385..e1346624 100644 --- a/.github/workflows/functional_test__rector_examples.yml +++ b/.github/workflows/functional_test__rector_examples.yml @@ -46,7 +46,7 @@ jobs: - name: Install Drupal Rector run: | cd ~/drupal - composer require palantirnet/drupal-rector:@dev --no-progress + composer require palantirnet/drupal-rector:@dev --no-progress --update-with-dependencies - name: Install Drupal Rector Config run: | cd ~/drupal diff --git a/composer.json b/composer.json index 9a011085..73eb3a07 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "webflo/drupal-finder": "^1.2" }, "conflict": { - "phpstan/phpstan": ">1.10.54", + "phpstan/phpstan": ">=1.10.55", "rector/rector": ">=0.19" }, "license": "MIT", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e7a5893b..0588b326 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -50,6 +50,11 @@ parameters: count: 1 path: src/Drupal8/Rector/Deprecation/EntityLoadRector.php + - + message: "#^Parameter \\#1 \\$items of class PhpParser\\\\Node\\\\Expr\\\\Array_ constructor expects array\\, array\\ given\\.$#" + count: 1 + path: src/Drupal8/Rector/Deprecation/EntityLoadRector.php + - message: "#^Access to an undefined property PhpParser\\\\Node\\\\Expr\\:\\:\\$expr\\.$#" count: 2 diff --git a/src/Drupal8/Rector/Deprecation/EntityLoadRector.php b/src/Drupal8/Rector/Deprecation/EntityLoadRector.php index 37033e75..5de75256 100644 --- a/src/Drupal8/Rector/Deprecation/EntityLoadRector.php +++ b/src/Drupal8/Rector/Deprecation/EntityLoadRector.php @@ -171,9 +171,7 @@ public function refactor(Node $node): ?Node $reset_args = [ // This creates a new argument that wraps the entity ID in an array. - new Node\Arg( - new Node\Expr\Array_([new \PhpParser\Node\ArrayItem($entity_id->value)]) - ), + new Node\Arg(new Node\Expr\Array_([new Node\Expr\ArrayItem($entity_id->value)])), ]; $entity_load_reset_node = new Node\Expr\MethodCall($getStorage_node,