Skip to content

Conversation

@VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Dec 4, 2025

Q A
Branch? current stable
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...

When using PHPStan, array are recommended to be typehinted.
When implementing interface from ApiPlatform, I get error because there are not described. It's kinda annoying having to add array<mixed> while the phpdoc could be improved on ApiPlatform side.

- src/State/Tests
- src/Symfony/Tests
- tests
- src # TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really want to add src here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is currently 1500 errors of missingType.iterableValue so I cannot fix all of them
I thought it could be interesting that one day all the existing array from /src folder are described by a PHPdoc no? So currently src is ignored (which is already the case) and one day it won't. WDYT ?

@VincentLanglet VincentLanglet requested a review from soyuka December 4, 2025 13:31
@VincentLanglet
Copy link
Contributor Author

Friendly ping @soyuka, I'd like to work on improving the phpdoc. Can we move on this PR ?

As shown by https://github.com/api-platform/core/actions/runs/20879513781/job/59993747689?pr=7583 there is ~1300 errors to solve, that's why I currently still ignore the src folder. (#7583 (comment))

But the plan would be for me to provide multiple PR fixing those errors and finally check src folder.

The other solution would be to generate a baseline with those 1300 errors, if you prefer.

@soyuka soyuka merged commit cb8a9a0 into api-platform:4.2 Jan 12, 2026
129 of 130 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