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
getFiltersParameters() looped every filter description entry and
re-emitted the same swagger/openapi deprecation per parameter, so a
filter exposing N params warned N times per doc generation. Guard the
two triggers with a per-invocation $warned set keyed by filter +
shortName so each fires at most once per generation.
Establishes the F7 dedup convention (natural boundaries + local guard,
no global static state) that the upcoming #[ApiFilter] (F5) and
Operation::$filters (F6) runtime deprecations reuse.
if (isset($description['swagger']) && !isset($warned[$warnKey]['swagger'])) {
725
730
trigger_deprecation('api-platform/core', '4.0', \sprintf('Using the "swagger" field of the %s::getDescription() (%s) is deprecated.', $filter, $shortName));
731
+
$warned[$warnKey]['swagger'] = true;
726
732
}
727
733
728
734
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));
780
+
if (!isset($warned[$warnKey]['openapi'])) {
781
+
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