phpstan (next major) is red on 1.x with five errors, all one shape: "Offset 'query' ... on left side of ?? always exists and is not nullable" (nullCoalesce.offset).
Nothing in orchestra changed. The same five lines passed the same job on 2026-08-30 and failed on 2026-09-01, because core moved: Database::getLog() is documented as returning a plain array on 11.x, and on main it returns a list of DatabaseLogEntry, a shape naming all six keys an entry carries. Once the entry has a shape, PHPStan knows query and args always exist, and the defensive coalesce beside them is dead code.
The keys do always exist: Log::log() builds every entry with all six. So the fix is to read them directly, in the five query-budget tests that count or inspect logged statements: ConditionalFlowsTest, TokenCancellationTest, InstanceTimeoutAnchorTest, MyTasksViewTest and PendingActionsFinderTest.
Safe on both lanes: on 11.x the return type is a plain array, so reading a key without a coalesce raises nothing at level 5, and on main it is exactly what the shape says is there.
Worth fixing before 1.0.0-alpha15 is tagged, because the job is allow_failure: the pipeline for the merge commit reports success with this job red, which is how it would otherwise reach the release unnoticed.
AI-Generated: Yes (Claude Code diagnosed the failure against the CI job trace and core's own docblocks on both branches, and wrote the fix. The five sites were confirmed unchanged since the run that passed.)
Issue fork orchestra-3620237
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #5
mably commented