You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(metadata): emit Operation::$filters deprecation in metadata
Per review, OpenApiFactory must not emit the Operation::$filters
deprecation. Revert the factory to its prior state (no F6 trigger, no
per-(filter,shortName) dedup) and emit the deprecation once while
building metadata in FiltersResourceMetadataCollectionFactory, worded to
point at the "parameters" argument. Drop the two now-obsolete
OpenApiFactory deprecation tests.
ValueCaster no longer casts the literal "null" string, which is not a
supported filter input; only empty values cast to the type default
(false/0/0.0). Update the ValueCaster, boolean and numeric tests.
Rebuild the deprecation baseline for the relocated trigger.
trigger_deprecation('api-platform/core', '4.4', \sprintf('Declaring filters on the "%s" operation through "Operation::$filters" is deprecated, use the "parameters" argument instead. It will be removed in 6.0.', $operation->getShortName()));
trigger_deprecation('api-platform/core', '4.4', \sprintf('Declaring filters on the "%s" operation through "Operation::$filters" is deprecated, use the "%s" attribute instead. It will be removed in 6.0.', $operation->getShortName(), QueryParameter::class));
708
-
}
709
-
710
-
// Collapse identical filter deprecations to one warning per (filter, shortName) per
711
-
// generation: a filter exposing N parameters must not emit the same message N times.
if (isset($description['swagger']) && !isset($warned[$warnKey]['swagger'])) {
723
+
if (isset($description['swagger'])) {
735
724
trigger_deprecation('api-platform/core', '4.0', \sprintf('Using the "swagger" field of the %s::getDescription() (%s) is deprecated.', $filter, $shortName));
736
-
$warned[$warnKey]['swagger'] = true;
737
725
}
738
726
739
727
if (!isset($description['openapi']) || $description['openapi'] instanceof Parameter) {
trigger_deprecation('api-platform/core', '4.0', \sprintf('Not using "%s" on the "openapi" field of the %s::getDescription() (%s) is deprecated.', Parameter::class, $filter, $shortName));
787
-
$warned[$warnKey]['openapi'] = true;
788
-
}
773
+
trigger_deprecation('api-platform/core', '4.0', \sprintf('Not using "%s" on the "openapi" field of the %s::getDescription() (%s) is deprecated.', Parameter::class, $filter, $shortName));
0 commit comments