Skip to content

Remove deprecated feed types; make unknown-feed-type handling consistent#472

Merged
turegjorup merged 2 commits into
release/3.0.0from
feature/remove-deprecated-feed-types-300
Jun 2, 2026
Merged

Remove deprecated feed types; make unknown-feed-type handling consistent#472
turegjorup merged 2 commits into
release/3.0.0from
feature/remove-deprecated-feed-types-300

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Why

SparkleIOFeedType, EventDatabaseApiFeedType and KobaFeedType were @deprecated in 2.x and are removed in 3.0.0.

feed_source.feed_type stores the FQCN as a plain VARCHAR(255) (not an FK), so removing a class leaves orphaned rows that FeedService::getFeedType() can no longer resolve — it throws UnknownFeedTypeException. Today the codebase reacts to that inconsistently: the screen-facing data endpoint returns 200 [], getAdminFormOptions/getConfigOptions return []/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:

  • Reads degradeFeedSourceProvider::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 keeps returning an empty result.
  • Writes reject — creating/updating a feed source with an unknown feed type maps UnknownFeedTypeExceptionHTTP 422 (was an opaque 500) via exception_to_status.

Cleanup tooling

  • App\Service\DeprecatedFeedSourceFinder + app:feed:remove-deprecated-feed-sources — dry-run report by default; --force removes the feed sources, their feeds and the bound slides (cascading to PlaylistSlide), across all tenants.
  • app:update prints a notice when deprecated feed sources remain.

Also

  • Deleted the three feed type classes; removed backend refs and the admin feed-type selector option, the v1 event-database config component + its template + translation.
  • Switched test fixtures to EventDatabaseApiV2FeedType; regenerated the PHPStan baseline.
  • Documented the upgrade step in UPGRADE.md and CHANGELOG.md.

Verification

  • FeedSourceTest (incl. unknown-type read → 200, feed read → 200, write → 422), FeedServiceTest, and RemoveDeprecatedFeedSourcesCommandTest all green.
  • PHPStan: no errors; php-cs-fixer: clean; prettier (css/js/jsx/yaml): clean.
  • API spec unchanged — the 422 mapping is runtime-only, so the oasdiff BC gate stays green.

🤖 Generated with Claude Code

…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>
@turegjorup turegjorup self-assigned this Jun 2, 2026
@turegjorup
turegjorup requested a review from tuj June 2, 2026 08:22
@tuj tuj added the version 3 Issues related to the release of version 3 label Jun 2, 2026
…ve-deprecated-feed-types-300

# Conflicts:
#	CHANGELOG.md
@turegjorup
turegjorup merged commit 19541b4 into release/3.0.0 Jun 2, 2026
22 checks passed
@turegjorup
turegjorup deleted the feature/remove-deprecated-feed-types-300 branch June 2, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version 3 Issues related to the release of version 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants