Skip to content

fix(metadata): downgrade inline unwired-filter warmup log from alert to debug#8408

Open
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:fix/7361-inline-filter-alert-log-spam
Open

fix(metadata): downgrade inline unwired-filter warmup log from alert to debug#8408
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:fix/7361-inline-filter-alert-log-spam

Conversation

@alexisLefebvre

Copy link
Copy Markdown
Contributor
Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #7361
License MIT
Doc PR n/a

What

Downgrades the ManagerRegistry must be initialized before accessing it. log — emitted while reading a filter's legacy description during cache warmup — from alert to debug, but only for the expected case: an inline filter instance that is manager-registry-aware and has no registry wired. Genuinely unexpected registry failures still log at alert.

Why

An inline filter instance passed to a QueryParameter (the canonical filter: new NumericFilter() form shown in the docs) is never wired with a ManagerRegistry, unlike a filter resolved through the filter locator as a service. Reading its description then throws — a recoverable, expected-during-warmup condition that was nonetheless logged at alert. In practice this spams one identical ALERT line per such parameter on every cache:clear, and (as reported in #7361) surfaces in tooling that treats alerts as actionable, misleading unrelated diagnostics.

This addresses the log-spam symptom without a BC break or new configuration. The deeper concern — inline instances losing their description-derived OpenAPI/schema enrichment, and FilterInterface::getDescription() being deprecated for removal in the next major — is left for a separate, larger change.

🤖 Generated with Claude Code

…to debug

An inline filter instance passed to a query parameter is never wired
with a manager registry, unlike a filter resolved as a service. Reading
its legacy description during cache warmup then fails on the Doctrine
metadata lookup. This is expected and recoverable, yet it was logged at
alert level, spamming one line per such parameter on every cache clear
and misleading unrelated diagnostics.

Log this known warmup case at debug level, keeping alert for genuinely
unexpected registry failures.

Closes api-platform#7361

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant