diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 910b2ff28..e90e3ce6a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -86,7 +86,7 @@ jobs: webonyx/graphql-php:^14.8 \ drupal/typed_data:^1.0 \ drupal/redirect:^1.0 \ - phpstan/phpstan:^1.7.14 \ + phpstan/phpstan:^1.10.32 \ mglaman/phpstan-drupal:^1.1.2 \ phpstan/phpstan-deprecation-rules:^1.0.0 \ jangregor/phpstan-prophecy:^1.0.0 \ diff --git a/phpstan.neon b/phpstan.neon index 68be96082..ed80ea50f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,6 +12,9 @@ parameters: # Not sure we can specify generic types properly with Drupal coding standards # yet, disable for now. checkGenericClassInNonGenericObjectType: false + # Sometimes we have a mismatch between local execution and CI, we don't care + # about ignored errors that are not triggered. + reportUnmatchedIgnoredErrors: false excludePaths: # Exclude the RouteLoad producer because the redirect module is not D10 # compatible so we are not downloading it. diff --git a/tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php b/tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php index 6e1a07bbc..fb91fc0d9 100644 --- a/tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php +++ b/tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php @@ -52,11 +52,11 @@ public function setUp(): void { $this->unpublished_node->save(); $this->translation_fr_unpublished = $this->unpublished_node->addTranslation('fr', ['title' => 'Test Unpublished Event FR']); - $this->translation_fr_unpublished->status = NodeInterface::NOT_PUBLISHED; + $this->translation_fr_unpublished->setUnpublished(); $this->translation_fr_unpublished->save(); $this->translation_de_unpublished = $this->unpublished_node->addTranslation('de', ['title' => 'Test Unpublished Event DE']); - $this->translation_de_unpublished->status = NodeInterface::NOT_PUBLISHED; + $this->translation_de_unpublished->setUnpublished(); $this->translation_de_unpublished->save(); // Unpublished node to published translations. @@ -68,11 +68,11 @@ public function setUp(): void { $this->unpublished_to_published_node->save(); $this->translation_fr_unpublished_to_published = $this->unpublished_to_published_node->addTranslation('fr', ['title' => 'Test Unpublished to Published Event FR']); - $this->translation_fr_unpublished_to_published->status = NodeInterface::PUBLISHED; + $this->translation_fr_unpublished_to_published->setPublished(); $this->translation_fr_unpublished_to_published->save(); $this->translation_de_unpublished_to_published = $this->unpublished_to_published_node->addTranslation('de', ['title' => 'Test Unpublished to Published Event DE']); - $this->translation_de_unpublished_to_published->status = NodeInterface::PUBLISHED; + $this->translation_de_unpublished_to_published->setPublished(); $this->translation_de_unpublished_to_published->save(); // Published node to unpublished translations. @@ -84,11 +84,11 @@ public function setUp(): void { $this->published_to_unpublished_node->save(); $this->translation_fr_published_to_unpublished = $this->published_to_unpublished_node->addTranslation('fr', ['title' => 'Test Published to Unpublished Event FR']); - $this->translation_fr_published_to_unpublished->status = NodeInterface::NOT_PUBLISHED; + $this->translation_fr_published_to_unpublished->setUnpublished(); $this->translation_fr_published_to_unpublished->save(); $this->translation_de_published_to_unpublished = $this->published_to_unpublished_node->addTranslation('de', ['title' => 'Test Published to Unpublished Event DE']); - $this->translation_de_published_to_unpublished->status = NodeInterface::NOT_PUBLISHED; + $this->translation_de_published_to_unpublished->setUnpublished(); $this->translation_de_published_to_unpublished->save(); \Drupal::service('content_translation.manager')->setEnabled('node', 'event', TRUE);