From 9e39a06b514377d85432b2073ea3f2ff9be069fe Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 6 Oct 2021 09:13:20 +0200 Subject: [PATCH] fix new errors --- .gitattributes | 2 - .github/workflows/phpstan.yml | 3 + .phpstan/baseline.neon | 2 +- .phpstan/stubs/AdapterInterface.stub | 118 ++++++++++ .phpstan/stubs/FilesystemInterface.stub | 284 ++++++++++++++++++++++++ .phpstan/stubs/ReadInterface.stub | 88 ++++++++ phpstan.neon.dist | 3 + 7 files changed, 497 insertions(+), 3 deletions(-) create mode 100644 .phpstan/stubs/AdapterInterface.stub create mode 100644 .phpstan/stubs/FilesystemInterface.stub create mode 100644 .phpstan/stubs/ReadInterface.stub diff --git a/.gitattributes b/.gitattributes index 26a33c44a..ab3adfc3c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,7 +6,5 @@ /.github_changelog_generator export-ignore /.php_cs.dist export-ignore /.scrutinizer.yml export-ignore -/.styleci.yml export-ignore -/.travis.yml export-ignore /.phpstan.neon.dist export-ignore /.phpunit.xml.dist export-ignore diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 704ec8c92..67cd3500f 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -3,6 +3,9 @@ name: PHPStan on: pull_request: push: + branches: + - 1.x + - 2.x jobs: phpstan: diff --git a/.phpstan/baseline.neon b/.phpstan/baseline.neon index 876a6c3e1..c1ba43ad2 100644 --- a/.phpstan/baseline.neon +++ b/.phpstan/baseline.neon @@ -1,6 +1,6 @@ parameters: ignoreErrors: - - message: '#^Access to undefined constant Liip\\ImagineBundle\\Config\\Filter\\Type\\FilterAbstract::NAME\.$#' + - message: '#^Access to undefined constant static\(Liip\\ImagineBundle\\Config\\Filter\\Type\\FilterAbstract\)::NAME\.$#' paths: - ../Config/Filter/Type/FilterAbstract.php - message: '#^Unsafe usage of new static\(\)\.$#' diff --git a/.phpstan/stubs/AdapterInterface.stub b/.phpstan/stubs/AdapterInterface.stub new file mode 100644 index 000000000..567fc5a29 --- /dev/null +++ b/.phpstan/stubs/AdapterInterface.stub @@ -0,0 +1,118 @@ +