8000 RC blockers: nullable getters, getMembers() null, review scores by irfan-dahir · Pull Request #658 · jikan-me/jikan · GitHub
[go: up one dir, main page]

Skip to content

RC blockers: nullable getters, getMembers() null, review scores - #658

Merged
irfan-dahir merged 1 commit into
masterfrom
v5/rc-blockers
Oct 15, 2026
Merged

irfan-dahir merged 1 commit into
masterfrom
v5/rc-blockers

Conversation

@irfan-dahir
Copy link
Copy Markdown
Collaborator

These are the API changes that have to land before the 5.0 API freezes for a release candidate. There are three of them.

1. 31 getters can return null (Breaking)

An audit compared every model getter's return type with the parser method that feeds it. 31 getters were declared non-null while their parser already returns null when MyAnimeList leaves the field out. Each one was a TypeError waiting for the right page:

  • an episode nobody has voted on;
  • a profile without a location;
  • a person page without a favorites count;
  • news and articles without a date;
  • user stats sections that are missing.

They're ?T now, and so are the 6 typed properties behind them. A re-run of the audit finds 0. The full list is in the changelog.

2. AnimeCard::getMembers() returns ?int (Breaking)

A card with no member count now gives null instead of raising ParserException, which failed the whole page. This is the owner's decision. Covered in ThousandsSeparatorTest.

3. Review scores (Fixed)

getAnimeScores() / getMangaScores() always failed:

  • the anime version called AnimeReviewScoresParser, which was deleted in 2022 (4bc6fd9);
  • the manga version read a category score table that no longer exists.

Checked against the recorded review pages and one live review page: MyAnimeList shows only the overall "Reviewer's Rating", with no story, animation, sound, character or enjoyment scores.

So the methods now return the scores object with getOverall() set to that rating, and the category getters return null. MangaReviewScoresParser and the models' fromParser(), which couldn't work, are removed. ReviewScoresTest checks every recorded review.

PHPStan's baseline had 11 entries silencing the missing class; they're gone with the fix.

Not in this PR: #584

getAnimeEpisode() can't get a score from the single-episode page, because that page doesn't show one. Only the episode list does (getAnimeEpisodes()). The reply on #584 is pending.

All 1,003 tests pass, and PHPStan and the endpoint manifest are clean.

🤖 Generated with Claude Code

- 31 model getters were declared non-null while their parser returns null when
  MyAnimeList leaves the field out (an episode without votes, a profile without
  a location, news without a date...), a latent TypeError. They are ?T now.
- AnimeCard::getMembers() returns null instead of raising ParserException when a
  card has no member count (owner decision).
- getAnimeScores()/getMangaScores() always failed (deleted anime parser, stale
  manga score table). MyAnimeList's 2022 review redesign kept only the
  "Reviewer's Rating", so they return it as getOverall(); category getters are
  null. MangaReviewScoresParser and the scores models' fromParser() are removed.
  PHPStan's baseline had been hiding the missing class; those entries go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irfan-dahir
irfan-dahir merged commit e05b4ef into master Oct 15, 2026
7 checks passed
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