From 34d6b58c7ee2342a6a6c4b1a1e7678afc287b7a9 Mon Sep 17 00:00:00 2001 From: djordy Date: Tue, 12 Nov 2024 16:18:01 +0100 Subject: [PATCH] fix interface BC --- phpstan-baseline.neon | 72 ++++++++++++++++++- .../PropertyDescriberInterface.php | 2 +- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4754d1794..e6f2a0b4e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -25,34 +25,89 @@ parameters: count: 1 path: src/Describer/ExternalDocDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\ArrayPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/ArrayPropertyDescriber.php + - message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#" count: 1 path: src/PropertyDescriber/ArrayPropertyDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\BooleanPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/BooleanPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\CompoundPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/CompoundPropertyDescriber.php + - message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#" count: 1 path: src/PropertyDescriber/CompoundPropertyDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\DateTimePropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/DateTimePropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\DictionaryPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/DictionaryPropertyDescriber.php + - message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#" count: 1 path: src/PropertyDescriber/DictionaryPropertyDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\FloatPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/FloatPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\IntegerPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/IntegerPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\NullablePropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/NullablePropertyDescriber.php + - message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#" count: 1 path: src/PropertyDescriber/NullablePropertyDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\ObjectPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/ObjectPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/PropertyDescriber.php + - message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:describe\\(\\) invoked with 5 parameters, 2\\-3 required\\.$#" count: 1 path: src/PropertyDescriber/PropertyDescriber.php - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$context$#" + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\PropertyDescriberInterface\\:\\:supports\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 1 + path: src/PropertyDescriber/PropertyDescriber.php + + - + message: "#^PHPDoc tag @param references unknown parameter\\: \\$context$#" + count: 2 path: src/PropertyDescriber/PropertyDescriberInterface.php - @@ -65,6 +120,21 @@ parameters: count: 1 path: src/PropertyDescriber/RequiredPropertyDescriber.php + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\RequiredPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/RequiredPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\StringPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/StringPropertyDescriber.php + + - + message: "#^Method Nelmio\\\\ApiDocBundle\\\\PropertyDescriber\\\\UuidPropertyDescriber\\:\\:supports\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/PropertyDescriber/UuidPropertyDescriber.php + - message: "#^Call to method render\\(\\) on an unknown class Twig_Environment\\.$#" count: 2 diff --git a/src/PropertyDescriber/PropertyDescriberInterface.php b/src/PropertyDescriber/PropertyDescriberInterface.php index 1699ad34b..31562d22b 100644 --- a/src/PropertyDescriber/PropertyDescriberInterface.php +++ b/src/PropertyDescriber/PropertyDescriberInterface.php @@ -30,5 +30,5 @@ public function describe(array $types, Schema $property, ?array $groups = null / * @param Type[] $types * @param array $context Context options for describing the property */ - public function supports(array $types, array $context = []): bool; + public function supports(array $types /* , array $context = [] */): bool; }