Skip to content

Commit

Permalink
Update deprecation messages with suggestions from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicLuidold committed Jun 16, 2024
1 parent e9fe658 commit b950e05
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 24 deletions.
6 changes: 4 additions & 2 deletions src/PropertyDescriber/ArrayPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/BooleanPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/CompoundPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/DateTimePropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/DictionaryPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/FloatPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/IntegerPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/NullablePropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/ObjectPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/PropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/RequiredPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/PropertyDescriber/StringPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ public function describe(array $types, OA\Schema $property, ?array $groups = nul
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.15.0',
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable',
'"%s()" will have a new "OA\Schema $schema" argument in a future version. Not defining it or passing null is deprecated',
__METHOD__
);
}

if (null !== $groups) {
trigger_deprecation(
'nelmio/api-doc-bundle',
'4.17.0',
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
'Using the $groups parameter of "%s()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']',
__METHOD__
);
}

Expand Down

0 comments on commit b950e05

Please sign in to comment.