From f6e17b3be0ceb8ff7718ad821a3f3865f219b855 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 28 Jun 2022 18:42:50 +0200 Subject: [PATCH] [TASK] Add the PHPStan strict rules (#471) We want PHPStan to be as strict as possible. (The new warning requires a change in Extbase to get solved properly.) --- CHANGELOG.md | 1 + composer.json | 1 + phpstan-baseline.neon | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98560a4..0dccff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Add the PHPStan strict rules (#471) - Add a Dependabot action for updating GitHub actions (#452) - Use Coveralls for the code coverage (#425) diff --git a/composer.json b/composer.json index 36e1f52..46ee68e 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,7 @@ "phpstan/extension-installer": "^1.1.0", "phpstan/phpstan": "^1.7.15", "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.3.0", "phpunit/phpunit": "^8.5.26", "saschaegerer/phpstan-typo3": "^1.1.2", "seld/jsonlint": "^1.9.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 364905f..6fee966 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,2 +1,6 @@ parameters: ignoreErrors: + - + message: "#^PHPDoc type array\\ of property TTN\\\\Tea\\\\Domain\\\\Repository\\\\Product\\\\TeaRepository\\:\\:\\$defaultOrderings is not the same as PHPDoc type array of overridden property TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Repository\\\\:\\:\\$defaultOrderings\\.$#" + count: 1 + path: Classes/Domain/Repository/Product/TeaRepository.php