Merged
Conversation
Collaborator
|
Vincent, thanks for testing this project and quickly improving it in this way 🙏 I like this a lot, so let's merge it ASAP. Yes, ideally we'd like to keep increasing PHPStan level. I know it's a lot of work, but if you could submit some PRs to fix some of the pending issues, that'd be amazing 🙇 Thanks! |
Contributor
Author
Sure, if something like #6979 is ok for you, I can do more. |
javiereguiluz
added a commit
that referenced
this pull request
Jun 11, 2025
… (glaubinix) This PR was merged into the 4.x branch. Discussion ---------- CrudControllerInterface: add missing EntityDto generics Following #6969 this adds missing generic PHPDoc to `CrudControllerInterface` methods that have `EntityDto` as an argument. Currently this results in PHPStan errors like ``` 38 Method MyEntityCrudController::createIndexQueryBuilder() has parameter $entityDto with generic class EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto but does not specify its types: TEntity 🪪 missingType.generics ``` Commits ------- 98b3c31 CrudControllerInterface: add missing EntityDto generics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @javiereguiluz
I recently tried easy admin and it works fine but I'm getting some PHPStan error because methods like
CrudControllerInterface::updateEntityhas no param type. Since this interface has a methodgetEntityFqcnwe could make it a generic. Same for some others classes.This would be really useful for PHPStan users like me.
Also, I tried the phpstan level 6 on this codebase and there is
Would you be interested if I improve the type-coverage of this projet to bump phpstan to level 6 ?