Delete plugin invalidations that are ignored because a newer archive exists, otherwise invalidations get stuck there indefinitely.
Fixes #17752
The code looks good. A test for this could be added to QueueConsumerTest (or an existing test modified).
Most of those tests work the same way, they:
You could add some invalidations to an existing test (ie, add a plugin invalidation for date/period, then add a recent archive 'done' row so it thinks there's a usable archive (note Date::$now can be set to make it seem recent), and check that it is both not selected and deleted afterwards). You can also do this in a new test by copy-pasting test_invalidateConsumeOrder()
and changing $invalidations
and $expectedInvalidationsFound
, and adding the extra archive row insertion.
Sorry, github notifications said my review was requested, but i think that might have been the original request.