8000 Deprecate getExplicitGenres; record why the user-list fields can never fill by irfan-dahir · Pull Request #680 · jikan-me/jikan · GitHub
[go: up one dir, main page]

Skip to content

Deprecate getExplicitGenres; record why the user-list fields can never fill - #680

Merged
irfan-dahir merged 3 commits into
masterfrom
v5/deprecate-explicit-genres
Nov 12, 2026
Merged

irfan-dahir merged 3 commits into
masterfrom
v5/deprecate-explicit-genres

Conversation

@irfan-dahir
Copy link
Copy Markdown
Collaborator

Stacked on #677 (which is stacked on #676) so the changelog does not collide; retarget to master after those land.

Closing out the field-witness triage with two different answers, because the two situations are different.

Deprecated: getExplicitGenres()

MyAnimeList removed the separate "Explicit Genres" sidebar row — zero occurrences across 40 recorded detail pages, including an R+ title — so Anime::getExplicitGenres() and Manga::getExplicitGenres() can only return []. Explicit genres now appear among the genres (Ecchi is in Genres on the page), so there is a real replacement:

  • @deprecated Use {@link Anime::getGenres()} instead.
  • two DEPRECATIONS.md rows with Use instead, removal not scheduled
  • ### Deprecated changelog entry

This is the one case where deprecation is the right instrument: DEPRECATIONS.md §4 requires a real replacement before one is announced, and this has one.

Not deprecated: the user-list fields

AnimeListItem::getStudios(), getLicensors(), getSeasonName(), getSeasonYear(), isAddedToList() and MangaListItem::getMagazines(), isAddedToList() are never filled by any recording. They stay exactly as they are.

Why not deprecate: there is no replacement (so §4's rule applies — a deprecation without one is a removal with a waiting period), and §3 says deprecations are never reversed. Announcing one here would commit to a breaking removal with no migration path, for fields that are simply unreachable.

Evidence recorded in a new DECISIONS.md entry: MAL's public load.json returns null/false for all of them across four public lists, ~1,000 items (Xinil, Sandshark, DatRandomDude, zombie_pegasus — two checked live today). And jikan never authenticates, so if those values are only populated for the list's owner, they are unreachable for this library by design.

Verification

  • grep -rn "@deprecated" src/Model → 11, and DEPRECATIONS.md §1 has 11 rows — the ledger reconciles in both directions, as §5 requires.
  • composer quality green: 1063 tests / 12476 assertions, PHPStan, php-cs-fixer, endpoint manifest.
  • No behaviour change; nothing removed; no fixtures.

MAL removed the separate "Explicit Genres" row (no occurrence in 40
recorded detail pages, including an R+ title), so Anime/Manga
getExplicitGenres() can only return []. They are deprecated in favour of
getGenres(), where explicit genres now appear.

The user-list fields no public recording fills (studios, licensors,
season, magazines, addedToList) are NOT deprecated: there is no
replacement, and DEPRECATIONS.md section 4 says a deprecation with no
replacement is a removal with a waiting period. DECISIONS.md records the
evidence (four public lists, ~1,000 items, all null/false) and why they
stay as they are.
irfan-dahir added a commit that referenced this pull request Nov 11, 2026
The witness count drops to 18 once the recordings in #681 land, the
Source-selector check covered both seasonal pages (92/92 and 420/421, not
420/421 overall), and the deprecate-or-derive question was settled in
#680. The stale 38-field line in the audit questions now points at the
triage instead of asking again.
Two rows (getExplicitGenres) are an upstream removal, not the title
accessor migration, so "Most current rows" is the accurate opening.
…s in Genres

The deprecation says MAL removed the row and moved explicit genres among
the genres. That claim was only evidence in a PR body and a DECISIONS
entry; on anime/11617 (rated R+, lists Ecchi) it is now asserted, and the
manga getter is pinned empty as well.
@irfan-dahir
Copy link
Copy Markdown
Collaborator Author

The deprecation's premise is now executable, not just prose (commit f891611). New ExplicitGenresTest:

  • anime/11617 (rated R+, lists Ecchi): getExplicitGenres() is [] and getGenres() contains Ecchi — the exact case the old row used to separate.
  • manga/1: the manga getter is empty as well.

So if MyAnimeList ever brings the row back, a test fails instead of the deprecation quietly becoming wrong. Full quality green: 1065 tests / 12479 assertions; ledger still reconciles 11 @deprecated tags ↔ 11 rows.

@irfan-dahir
irfan-dahir changed the base branch from v5/parser-correctness-sweep-source to master November 12, 2026 13:16
@irfan-dahir
irfan-dahir merged commit 0c5422c into master Nov 12, 2026
2 of 7 checks passed
irfan-dahir added a commit that referenced this pull request Nov 12, 2026
The witness count drops to 18 once the recordings in #681 land, the
Source-selector check covered both seasonal pages (92/92 and 420/421, not
420/421 overall), and the deprecate-or-derive question was settled in
#680. The stale 38-field line in the audit questions now points at the
triage instead of asking again.
irfan-dahir added a commit that referenced this pull request Nov 12, 2026
fixtures#21/#22/#23 and jikan#676/#677/#680/#681 merged today, so the
section no longer describes work in flight and the witness count is 18
rather than 19.
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

0