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

Deptrac should ignore phpstan-type #849

Closed
alexander-schranz opened this issue Apr 6, 2022 · 3 comments
Closed

Deptrac should ignore phpstan-type #849

alexander-schranz opened this issue Apr 6, 2022 · 3 comments

Comments

@alexander-schranz
Copy link
Contributor

alexander-schranz commented Apr 6, 2022

Deptrac seems to convert phpstan type:

/**
 * @phpstan-type DeviceRepositoryFindByFilter array{
 *     ids?: int[]|string[],
 *     accountId?: int|string,
 *     activated?: boolean,
 * }
 */
interface DeviceRepositoryInterface

Into a class App\Device\Domain\Repository\DeviceRepositoryFindByFilter:

  Uncovered   App\Device\Domain\Repository\DeviceRepositoryInterface has uncovered dependency on App\Device\Domain\Repository\DeviceRepositoryFindByFilter
              src/Device/Domain/Repository/DeviceRepositoryInterface.php:30

And report them as uncovered.

dbrumann pushed a commit to dbrumann/deptrac that referenced this issue Apr 11, 2022
dbrumann pushed a commit to dbrumann/deptrac that referenced this issue Apr 11, 2022
dbrumann pushed a commit to dbrumann/deptrac that referenced this issue Apr 11, 2022
@dbrumann
Copy link
Collaborator

dbrumann commented Apr 11, 2022

Are you sure Deptrac reads the @phpstan-type? I tried reproducing the issue, but for me Deptrac ignores the annotation both in the corresponding test and in a minimal example. Maybe the class is referred to at another point in the interface again?

edit: for instance I made the mistake of having a use statement which triggered the uncovered warning.

See #856 for an attempted reproducer. Maybe I made a mistake there?

dbrumann pushed a commit to dbrumann/deptrac that referenced this issue Apr 11, 2022
@dbrumann
Copy link
Collaborator

dbrumann commented Sep 8, 2022

Since there hasn't been any feedback and I can't reproduce the initial issue, I will close this for now. Please reopen it (or open a new) when the problem occurs again

@dbrumann dbrumann closed this as completed Sep 8, 2022
@alexander-schranz
Copy link
Contributor Author

Didn't run into this issue again so maybe it was just with an older version.

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

No branches or pull requests

2 participants