Repository navigation
RC blockers: nullable getters, getMembers() null, review scores - #658
Merged
Merged
Conversation
- 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>
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.
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
nullwhen MyAnimeList leaves the field out. Each one was aTypeErrorwaiting for the right page:They're
?Tnow, 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
nullinstead of raisingParserException, which failed the whole page. This is the owner's decision. Covered inThousandsSeparatorTest.3. Review scores (Fixed)
getAnimeScores()/getMangaScores()always failed:AnimeReviewScoresParser, which was deleted in 2022 (4bc6fd9);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 returnnull.MangaReviewScoresParserand the models'fromParser(), which couldn't work, are removed.ReviewScoresTestchecks 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