Skip to content

ci: add to the PHPStan baseline the four errors reported on 4.3.x whatever the change - #832

Merged
Spomky merged 1 commit into
4.3.xfrom
ci/phpstan-baseline-2-3-7-4-3-x
Nov 29, 2026
Merged

Spomky merged 1 commit into
4.3.xfrom
ci/phpstan-baseline-2-3-7-4-3-x

Conversation

@Spomky

@Spomky Spomky commented Nov 29, 2026

Copy link
Copy Markdown
Member

The Static Analysis job fails on 4.3.x whatever the change: #830, #831 and #827 hit it, and the tests job, which needs it, is skipped. The last green run on 4.3.x is the one of 024031b3 (2026-11-10).

The cause

Nothing in the code changed. Four errors come from the tooling:

  • PHPStan 2.3.7, which the phpqa image has shipped since its rebuild of 2026-11-20, reports a mixed value as a condition in three places, the same three as on 4.2.x (4029d7e, in fix(core): bound the RSA public exponent to 64 bits whatever the modulus #828):
    • the ternary of JSONFlattenedSerializer::processHeaders();
    • the ternary of JSONGeneralSerializer::processHeaders();
    • the if of MixedPublicAndPrivateKeys.
  • symfony/dependency-injection 8.2.0 now declares the $config argument of ContainerBuilder::prependExtensionConfig() as array<string, mixed>, and ConfigurationHelper::updateJoseConfiguration() passes an array<mixed>. 4.2.x does not install Symfony 8, so this one is specific to 4.3.x.

The fix

The baseline, generated by castor phpstan-baseline with the current image (phpqa:8.4 of 2026-11-28) after a clean composer install, gains those four entries and nothing else.

Verification

Once this is merged, #830 and #831 are rebased on 4.3.x.

…tever the change

The Static Analysis job fails on 4.3.x for reasons outside the code:

- PHPStan 2.3.7, shipped by the phpqa image since its rebuild of
  2026-11-20, reports a mixed value as the condition of the ternaries of
  the processHeaders() methods of JSONFlattenedSerializer and
  JSONGeneralSerializer and of the if of MixedPublicAndPrivateKeys, as on
  4.2.x (4029d7e);
- symfony/dependency-injection 8.2.0 declares the $config argument of
  ContainerBuilder::prependExtensionConfig() as array<string, mixed>,
  while ConfigurationHelper::updateJoseConfiguration() passes an
  array<mixed>.

The baseline, generated by castor phpstan-baseline with the current
image, gains those four entries and nothing else.
@Spomky Spomky added this to the 4.3.0 milestone Nov 29, 2026
@Spomky
Spomky merged commit 011e764 into 4.3.x Nov 29, 2026
18 checks passed
@Spomky
Spomky deleted the ci/phpstan-baseline-2-3-7-4-3-x branch November 29, 2026 09:46
Spomky added a commit that referenced this pull request Nov 29, 2026
…n 8.2 reports on 4.2.x

symfony/dependency-injection 8.2.0 declares the $config argument of
ContainerBuilder::prependExtensionConfig() as array<string, mixed>,
while ConfigurationHelper::updateJoseConfiguration() passes an
array<mixed>. The Static Analysis job therefore fails on 4.2.x whatever
the change, and the tests it gates are skipped. 4.3.x got the same entry
in #832.

The baseline, generated by castor phpstan-baseline with the current
image, gains that entry and nothing else.
wheakerd pushed a commit to wheakerd/jwt-framework that referenced this pull request Nov 29, 2026
…tever the change

The Static Analysis job fails on 5.0.x for the reasons fixed on 4.3.x by
web-token#832:

- PHPStan 2.3.7, shipped by the phpqa image since its rebuild of
  2026-11-20, reports a mixed value as the condition of the ternaries of
  the processHeaders() methods of JSONFlattenedSerializer and
  JSONGeneralSerializer and of the if of MixedPublicAndPrivateKeys;
- symfony/dependency-injection 8.2.0 declares the $config argument of
  ContainerBuilder::prependExtensionConfig() as array<string, mixed>,
  while ConfigurationHelper::updateJoseConfiguration() passes an
  array<mixed>.

The baseline, generated by castor phpstan-baseline with the current
image, gains those four entries and nothing else.
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.

1 participant