inline annotations for the interfaces - what is the correct way? #1369
Labels
DX & Refactoring
Requests for DX improvements and refactorings
Help wanted
We need your help or opinion how to resolve this
Stale
This issue have not been touched for some time and if it doesn't change, it will be closed soon.
What is happening
In tests, we often access services using DI container directly - e.g.
However, when grabbing an interface this way, we are not consistent with the annotations, you can see that often there is no @var annotation at all, or we annotate it with a particular framework implementation, like that:
Is there any reason why not to annotate it with
directly?
The inconsistency might cause problems to annotations fixer implemented in #1344 as it has no information that it should replace
in the annotation with
Actually, the fixer looks for
as this is the "parent" for project class that is registered in DIC.
Expected result
We know how to use inline annotations for interfaces and it is implemented or documented.
The text was updated successfully, but these errors were encountered: