Skip to content

[TASK] Backport of #726#729

Merged
sbuerk merged 2 commits into
8from
8-backport-726
Jul 22, 2026
Merged

[TASK] Backport of #726#729
sbuerk merged 2 commits into
8from
8-backport-726

Conversation

@sbuerk

@sbuerk sbuerk commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

In order to prepare for guzzlehttp/guzzle v8 in
TYPO3 core, we allow the installation of the
guzzlehttp/psr7 helper package.

composer req guzzlehttp/psr7:"^2.5.0 || ^3.0"

Releases: main, 9, 8

bnf and others added 2 commits July 22, 2026 14:50
In order to prepare for guzzlehttp/guzzle v8 in
TYPO3 core, we allow the installation of the
`guzzlehttp/psr7` helper package.

composer req guzzlehttp/psr7:"^2.5.0 || ^3.0"

Releases: main, 9, 8
ComposerPackageManager::getPackageComposerJson() passed the
JSON_THROW_ON_ERROR constant as the third argument of json_decode(),
which is $depth, leaving $flags at its default value 0. The flag
therefore never took effect: malformed composer.json content did
not raise a JsonException, which turned the surrounding try/catch
block into dead code, while $depth was set to the constant value
4194304.

The call now uses the default depth of 512 and passes the flag in
the $flags argument, so decoding errors are handled as originally
intended. Observable behaviour does not change, since json_decode()
returns null for invalid input, which already matched the intended
null fallback of the method.

PHPStan 2.2 reports the previous call as argument.invalidConstant.
As composer.lock is not part of the repository, CI resolves the
latest PHPStan release, which turned this into a failing quality
gate on the PHP 8.2 and 8.3 jobs.

Releases: main, 9, 8
@sbuerk
sbuerk merged commit a2254c2 into 8 Jul 22, 2026
10 checks passed
@sbuerk
sbuerk deleted the 8-backport-726 branch July 22, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants