Loading .github/workflows/testing.yml +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ jobs: # Pin the exact Coder version to upgrade manually when we want to. run: | composer --no-interaction --no-progress require \ phpstan/phpstan:^1.10.32 \ phpstan/phpstan:^1.10.38 \ mglaman/phpstan-drupal:^1.1.2 \ phpstan/phpstan-deprecation-rules:^1.0.0 \ jangregor/phpstan-prophecy:^1.0.0 \ Loading phpstan.neon +0 −10 Original line number Diff line number Diff line Loading @@ -12,9 +12,6 @@ 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. Loading Loading @@ -54,10 +51,3 @@ parameters: message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removePersistedQueryInstance\\(\\) has no return type specified\\.$#" count: 1 path: src/Entity/ServerInterface.php # We already use the ProphecyTrait, so not sure why PHPStan complains about # this? - """ #^Call to deprecated method prophesize\\(\\) of class Drupal\\\\Tests\\\\graphql\\\\Kernel\\\\GraphQLTestBase\\: https\\://github\\.com/sebastianbergmann/phpunit/issues/4141$# """ src/Plugin/GraphQL/DataProducer/Entity/Fields/Image/ImageDerivative.php +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class ImageDerivative extends DataProducerPluginBase implements ContainerFactory * @return array|null */ public function resolve(FileInterface $entity = NULL, $style, RefinableCacheableDependencyInterface $metadata) { // Return if we dont have an entity. // Return if we don't have an entity. if (!$entity) { return NULL; } Loading tests/src/Kernel/DataProducer/Entity/Fields/Image/ImageDerivativeTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -62,7 +62,10 @@ class ImageDerivativeTest extends GraphQLTestBase { $this->file->method('getFileUri')->willReturn($this->fileUri); $this->file->method('access')->willReturn((new AccessResultAllowed())->addCacheTags(['test_tag'])); // @todo Remove hard-coded properties and only rely on image factory. // @phpstan-ignore-next-line @$this->file->width = 600; // @phpstan-ignore-next-line @$this->file->height = 400; $this->style = ImageStyle::create(['name' => 'test_style']); Loading Loading
.github/workflows/testing.yml +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ jobs: # Pin the exact Coder version to upgrade manually when we want to. run: | composer --no-interaction --no-progress require \ phpstan/phpstan:^1.10.32 \ phpstan/phpstan:^1.10.38 \ mglaman/phpstan-drupal:^1.1.2 \ phpstan/phpstan-deprecation-rules:^1.0.0 \ jangregor/phpstan-prophecy:^1.0.0 \ Loading
phpstan.neon +0 −10 Original line number Diff line number Diff line Loading @@ -12,9 +12,6 @@ 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. Loading Loading @@ -54,10 +51,3 @@ parameters: message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removePersistedQueryInstance\\(\\) has no return type specified\\.$#" count: 1 path: src/Entity/ServerInterface.php # We already use the ProphecyTrait, so not sure why PHPStan complains about # this? - """ #^Call to deprecated method prophesize\\(\\) of class Drupal\\\\Tests\\\\graphql\\\\Kernel\\\\GraphQLTestBase\\: https\\://github\\.com/sebastianbergmann/phpunit/issues/4141$# """
src/Plugin/GraphQL/DataProducer/Entity/Fields/Image/ImageDerivative.php +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class ImageDerivative extends DataProducerPluginBase implements ContainerFactory * @return array|null */ public function resolve(FileInterface $entity = NULL, $style, RefinableCacheableDependencyInterface $metadata) { // Return if we dont have an entity. // Return if we don't have an entity. if (!$entity) { return NULL; } Loading
tests/src/Kernel/DataProducer/Entity/Fields/Image/ImageDerivativeTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -62,7 +62,10 @@ class ImageDerivativeTest extends GraphQLTestBase { $this->file->method('getFileUri')->willReturn($this->fileUri); $this->file->method('access')->willReturn((new AccessResultAllowed())->addCacheTags(['test_tag'])); // @todo Remove hard-coded properties and only rely on image factory. // @phpstan-ignore-next-line @$this->file->width = 600; // @phpstan-ignore-next-line @$this->file->height = 400; $this->style = ImageStyle::create(['name' => 'test_style']); Loading