Skip to content

chore: fix phpstan errors - #8908

Merged
soyuka merged 1 commit into
api-platform:5.0from
Maxcastel:chore/fix-phpstan-errors
Dec 1, 2026
Merged

soyuka merged 1 commit into
api-platform:5.0from
Maxcastel:chore/fix-phpstan-errors

Conversation

@Maxcastel

@Maxcastel Maxcastel commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
License MIT

PHPStan fails on 5.0:

  • Type::object() expects class-string|null, string given in the GraphQL tests: symfony/type-info 8.2 now expects a class-string, and these tests used fake class names. They now use fixture classes.
  • No error to ignore is reported on line 238 (and 251) in ApiPlatformExtension: symfony/dependency-injection 8.2 fixed the configurator type, so these ignores are stale.
  • Call to an undefined method ObjectMapper::withObjectMapper() in the test added by fix(state): keep ObjectMapper decorated clone #8881: ObjectMapper is declared conditionally and PHPStan only reads the first declaration, so the one with withObjectMapper() now comes first.
  • resolveDefaultType() return type with generic class Type does not specify its types (Laravel): Type is generic since symfony/type-info 8.2.

@Maxcastel
Maxcastel force-pushed the chore/fix-phpstan-errors branch from 379d12c to c31f7c2 Compare December 1, 2026 09:09
@soyuka
soyuka merged commit 5cec9d5 into api-platform:5.0 Dec 1, 2026
108 of 117 checks passed
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