Skip to content

override AclProviderInterface::findAcl in MutableAclProviderInterface#60

Closed
vv12131415 wants to merge 1 commit intosymfony:masterfrom
vv12131415:patch-2
Closed

override AclProviderInterface::findAcl in MutableAclProviderInterface#60
vv12131415 wants to merge 1 commit intosymfony:masterfrom
vv12131415:patch-2

Conversation

@vv12131415
Copy link
Copy Markdown
Contributor

AclProviderInterface::findAcl() returns AclInterface
but
MutableAclProviderInterface::findAcl() returns MutableAclInterface

that's I'm changing this.

Context for this you can see here - sonata-project/SonataAdminBundle#6277 (comment)

@VincentLanglet
Copy link
Copy Markdown
Contributor

Hi @vladyslavstartsev

I recently discover that @method annotation has a default for static analysis: the @throws tag is lost (see phpstan/phpstan#3732 (comment)).

The right way to do this would be to define AclProviderInterface with a template

@template T extends AclInterface

Then MutableAclInterface will extends AclInterface<MutableAclInterface>.

I'm not sure that symfony want to start defining @template in his base-code.
So maybe it's a PR for https://github.com/phpstan/phpstan-symfony instead.

@vv12131415
Copy link
Copy Markdown
Contributor Author

vv12131415 commented Aug 13, 2020

@VincentLanglet can you please create PR to phpstan/phpstan-symfony?

@VincentLanglet
Copy link
Copy Markdown
Contributor

VincentLanglet commented Aug 13, 2020

Sure, made phpstan/phpstan-symfony#92.

So this PR is not needed. (And should not be merged, since it would lost the @throws tag)

@vv12131415 vv12131415 closed this Aug 13, 2020
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