Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Twig 3 classes into tagged service interface requirements inspection #1548

Closed
FlyingDR opened this issue Oct 17, 2020 · 0 comments
Assignees
Labels

Comments

@FlyingDR
Copy link

PHPStorm 2020.2.3, Symfony plugin 0.21.203

There is an inspection in plugin that checks required interface implementation for Symfony services with certain tags.

However in a case if Twig 3.x is used in the project and Symfony service is tagged with either twig.extension or twig.loader - Symfony plugin reports warning like Class needs to implement '\Twig_ExtensionInterface' for tag 'twig.extension'

This is only correct for Twig 1.x and 2.x, but for 3.x only namespaced classes (Twig\Extension\ExtensionInterface and Twig\Loader\LoaderInterface) are available so this inspection is not correct for this case.

It looks like these entries need to be corrected with additional test for Twig version, used by the project. Hope it can be determined, e.g. from Composer integration that is available in PHPStorm.

@Haehnchen Haehnchen added the todo label May 4, 2022
@Haehnchen Haehnchen self-assigned this May 4, 2022
Haehnchen added a commit that referenced this issue May 6, 2022
…instances: support multiple tag classes, allow service id be a classes
Haehnchen added a commit that referenced this issue May 6, 2022
#1548 optimize inspection for notify missing extends/implements tags …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants