Review 13.4 Merged

95317[TASK] Keep settled promise guard guzzle agnostic

Stefan Bürk CR +2 V +2 Easy +3 −0 updated 08/13/26, 15:33

Commit message

Mapping a settled promise list onto response body contents checks the
state of each entry and guards the value with an instanceof before
reading the body. Both guzzle major versions this branch accepts have to
work here, so the guard stays.

Since guzzle v8 is allowed, the job resolving the highest versions
installs it for the first time and the nightly turns red. Its
annotations already describe the settled value as a response, so static
analysis considers the guard redundant and reports an instanceof that
always evaluates to true.

The mapped value is therefore declared as a plain array of mixed values
inside the callback, which keeps the guard meaningful for both major
versions. The placement is not interchangeable: an annotation on the
closure parameter has no effect, because the parameter type is inferred
from the mapped array and that inference wins over it.

This is only needed on 13.4. main and 14.3 run into the very same
dependency versions in the same job, but disable
treatPhpDocTypesAsCertain globally, so the built-in check never treats
annotations of dependencies as certain and stays silent. On 13.4 that
option is passed as an argument to the custom UnneededInstanceOfRule
service only. Enabling it globally here would invalidate a large part of
the baseline and surface further findings, each needing its own
decision, which does not belong into a nightly fix.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 35

  1. Stefan Bürk uploaded patch set 1 08/13/26, 14:32

  2. core-ci voted on patch set 1 V +1 08/13/26, 14:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106656

  3. core-ci commented on patch set 1 08/13/26, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106657

  4. Benni Mack commented on patch set 1 CR +2 V +2 08/13/26, 15:33

    this doesn't change the logic, so I'll short-ciruit this change and merge right away.
  5. Benni Mack merged patch set 2 08/13/26, 15:33