Remove deprecated feed types; make unknown-feed-type handling consistent#472
Merged
turegjorup merged 2 commits intoJun 2, 2026
Merged
Conversation
…ng consistent Remove the feed types deprecated in 2.x — SparkleIOFeedType, EventDatabaseApiFeedType and KobaFeedType — for the 3.0.0 release. feed_source.feed_type stores the FQCN as a plain string (not an FK), so removing a class leaves orphaned rows that FeedService::getFeedType() can no longer resolve. Make that handling consistent across the API: - Reads degrade, never 500: FeedSourceProvider::toOutput() catches UnknownFeedTypeException and exposes no secrets, so feed sources (and feeds embedding them, item and collection) stay listable and removable. The feed data endpoint already returns an empty result. - Writes reject: creating/updating a feed source with an unknown feed type maps UnknownFeedTypeException to HTTP 422 (was an opaque 500) via exception_to_status. Tooling for cleaning up referencing rows: - DeprecatedFeedSourceFinder + app:feed:remove-deprecated-feed-sources (dry-run report; --force removes the feed sources, their feeds and the bound slides, cascading to PlaylistSlide), covering all tenants. - app:update prints a notice when deprecated feed sources remain. Also remove the backend/frontend references (admin feed-type selector, the v1 event-database config component and its translation), switch test fixtures to EventDatabaseApiV2FeedType, regenerate the PHPStan baseline, and document the upgrade step in UPGRADE.md / CHANGELOG.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tuj
approved these changes
Jun 2, 2026
…ve-deprecated-feed-types-300 # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
SparkleIOFeedType,EventDatabaseApiFeedTypeandKobaFeedTypewere@deprecatedin 2.x and are removed in 3.0.0.feed_source.feed_typestores the FQCN as a plainVARCHAR(255)(not an FK), so removing a class leaves orphaned rows thatFeedService::getFeedType()can no longer resolve — it throwsUnknownFeedTypeException. Today the codebase reacts to that inconsistently: the screen-facing data endpoint returns200 [],getAdminFormOptions/getConfigOptionsreturn[]/null, but the read providers and the write path threw → HTTP 500.Policy: degrade reads, reject writes
An unresolvable feed type never yields a 500:
FeedSourceProvider::toOutput()catchesUnknownFeedTypeExceptionand exposes no secrets, so feed sources (and feeds embedding them, item and collection) stay listable and removable. The feed data endpoint keeps returning an empty result.UnknownFeedTypeException→ HTTP 422 (was an opaque 500) viaexception_to_status.Cleanup tooling
App\Service\DeprecatedFeedSourceFinder+app:feed:remove-deprecated-feed-sources— dry-run report by default;--forceremoves the feed sources, their feeds and the bound slides (cascading toPlaylistSlide), across all tenants.app:updateprints a notice when deprecated feed sources remain.Also
EventDatabaseApiV2FeedType; regenerated the PHPStan baseline.UPGRADE.mdandCHANGELOG.md.Verification
FeedSourceTest(incl. unknown-type read → 200, feed read → 200, write → 422),FeedServiceTest, andRemoveDeprecatedFeedSourcesCommandTestall green.oasdiffBC gate stays green.🤖 Generated with Claude Code