Commit Graph

23 Commits

Author SHA1 Message Date
DariusIII 60c85e2e63 Add tests 2026-07-11 10:04:38 +02:00
joemeyer76 b0fd5491a0 Fix NNTPService::getXOVER() TypeError on NNTP error responses
getXOVER() declared its return type as `array|string|NNTPService`, which
does not include DariusIII\NetNntp\Error. The underlying NNTP client
legitimately returns an Error object whenever the server responds with
an error to an XOVER command (e.g. a group with no matching articles,
or a range past the group's high-water mark) -- both call sites in
BinariesService already guard for exactly this case via
NNTPService::isError($result). Because the declared return type
excluded Error, PHP raised a TypeError before either caller ever got a
chance to run that check:

    App\Services\NNTP\NNTPService::getXOVER(): Return value must be of
    type App\Services\NNTP\NNTPService|array|string, DariusIII\NetNntp\Error
    returned

In practice this crashed the first XOVER call that hit any error
response, which made historical backfill (`update:backfill` /
`multiprocessing:backfill`) unusable beyond the very first successful
chunk for a group -- backfill by its nature keeps requesting older and
older ranges until it walks off the group's actual history, at which
point the server error becomes inevitable.

Every sibling method on this class that the NNTP client can answer with
an Error object (doConnect, doQuit, getOverview, getGroups, getMessages,
getMessagesByMessageID) already declares `mixed` for this same reason.
This change brings getXOVER() in line with that existing convention
rather than introducing a new pattern.

Added a regression test that uses reflection to assert getXOVER()'s
return type permits DariusIII\NetNntp\Error (or is unrestricted via
`mixed`), plus a sanity check that NNTPService::isError() correctly
identifies Error instances. Verified the test fails against the old
`array|string|NNTPService` signature and passes against `mixed`.

Manually verified against a live NNTP server: `update:backfill` on a
real group ran 15+ chunks past the point where it previously crashed on
the very first error response, with no exceptions.
2026-07-03 20:21:36 -04:00
DariusIII 8d1d238f5f Update Trakt support 2026-06-19 23:22:16 +02:00
DariusIII 2f96d921df Fix RSS health check 2026-06-17 13:34:13 +02:00
DariusIII b20e01a009 Update book processing further 2026-04-23 17:01:28 +02:00
DariusIII 891d5f6865 Update books handling 2026-04-23 14:51:59 +02:00
DariusIII 4bffb7d626 Update book processing 2026-04-14 16:39:18 +02:00
DariusIII 99fb50adde Improve book matching 2026-04-14 16:35:33 +02:00
DariusIII 49ca479083 Update book processing and matching 2026-04-14 15:14:27 +02:00
DariusIII 43773a0cda Add support for ISBNDB API queries 2026-04-14 14:51:20 +02:00
DariusIII 12daa96d14 Fix bad predb match logic 2026-04-14 11:31:49 +02:00
DariusIII e89d719534 Track more statuses and add redis fallback 2026-04-13 12:37:32 +02:00
DariusIII 72a6140151 Fix query error when imdbid is empty 2026-04-11 22:22:25 +02:00
DariusIII c6d3070d95 Delete TmuxTest 2026-04-10 13:26:46 +02:00
DariusIII d214625ac1 Fix movie postprocessing 2026-04-10 11:17:53 +02:00
DariusIII 1e8e607148 Make imdbid string everywhere 2026-04-09 17:16:17 +02:00
DariusIII b22a6babfb Fix imdbid checks for trailers 2026-04-04 15:05:42 +02:00
DariusIII 58cd100fa9 Fix similar_text string issue 2026-04-02 12:26:27 +02:00
DariusIII 0ea9125286 Fix deprecations 2026-03-26 11:43:32 +01:00
DariusIII fe844e652c Fix inactive account removal logic and checks 2026-03-11 17:06:11 +01:00
DariusIII 7ba6f6d4c5 Improve predb usage in namefixing service 2026-03-11 15:30:54 +01:00
DariusIII a7e1d684bc Add anilist test 2026-03-09 09:48:30 +01:00
DariusIII 911e97fc87 Add trakt test 2026-03-09 09:44:00 +01:00