Phpinspectionsea: How to resolve transitive dependencies with Laravel

Created on 2 Apr 2018  路  11Comments  路  Source: kalessil/phpinspectionsea

I am receiving a lot of warnings about transitive dependencies because of the usage of Laravel Illuminate classes. I am not understanding the reason of this warnings, once that I am requiring the laravel/framework (that implements this classes).

bug / false-positive fixed

All 11 comments

For some reason too, some classes are not being affected:

image

That is my composer.json:

image

The marked classes are not coming from laravel/framework, but e.g. from illuminate/auth, illuminate/cache and etc.

Adding them implicitly would be the way to go - the implicit declaration of dependencies.
Might be redundant, but why not.

I'll check if I can fix this

Hmm... Maybe it should consider the replace key from composer? Because the Laravel replace have a lot of instructions about that. I believe that it works like an "alias" to the package. So illuminate/auth refers to the own laravel/framework that I have set on my composer.json. If I am right, I guess that this warning is a false-positive.

@rentalhost : all correct - that's a false-positive and we need to lookup the replace section in some cases.

Solved in #890. I'll be possible to add 'laravel/*' into ignored packages.

Do you not prefer make this option configurable via options list?

Oh, you did it. :D

Yep =)

Hello,
it still doesn't work with laravel/*
I'm using illuminate/* as a workaround.

image

Hey @aand18: probably ignoring 'illuminate/*' was intended. But Laravel case has been addressed and will be in the next release (ETA next week).

Was this page helpful?
0 / 5 - 0 ratings