ComposerRequireChecker
ComposerRequireChecker copied to clipboard
ComposerRequireChecker lists unresolved symbols from vendors
When the vendor directory is contained in the source directory, ComposerRequireChecker lists all unresolved vendors' symbols.
Full evidence here : https://gist.github.com/Adirelle/ce6a8045c93c86b98ff2b86cc504056f
I guess the same happens if the test directory is contained in the source directory.
Must say that this feels like an excessive edge case. Most tooling will simply not working with such a weird setup, and I wouldn't expect them to work.
On 16 Nov 2017 10:11, "Adirelle" [email protected] wrote:
When the vendor directory is contained in the source directory, ComposerRequireChecker lists all unresolved vendors' symbols.
Full evidence here : https://gist.github.com/Adirelle/ ce6a8045c93c86b98ff2b86cc504056f
I guess the same happens if the test directory is contained in the source directory.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maglnet/ComposerRequireChecker/issues/47, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJakLHR2nMEDTGOMBCNLfpYmSGt0Ptjks5s2-41gaJpZM4QgGo_ .
Surprisingly, it is the first time I really have an issue with this. Most tools have an --exclude option, which is bulky but sufficient. I do not like this kind of directory layout either but I have legacy projects...
Then this is tech debt that needs resolution before pushing the problem to tooling. I have at least another 3 libraries which will just panic with your edge case.
On 16 Nov 2017 10:48, "Adirelle" [email protected] wrote:
Surprisingly, it is the first time I really have an issue with this. Most tools have an --exclude option, which is bulky but sufficient. I do not like this kind of directory layout either but I have legacy projects...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maglnet/ComposerRequireChecker/issues/47#issuecomment-344854955, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJakGxn54TRS8jEqJQWIyF_t01EbheVks5s2_bygaJpZM4QgGo_ .
would this be solved by #46 ?
sorry, I got it wrong, probably this can hardly be fixed because the autoload directive says that your sources are within all directories (including vendor
) so it also checks the files within vendor
...
With #46 you can exclude vendor
from classmap, but that will fail miserably I think.
Definetely not an edge case. We have a mono-repo and every library / subproject has it's source folders directly within the root / same level as composer.json
. No problem with any other tool as they either ignore 3rd party folders like node_modules
/ vendor
or provide appropriate options.
See also:
@buffcode this tool only scans sources mapped in your autoload
and/or autoload-dev
@Adirelle is issue related to #110
@Adirelle is issue related to #110
It is: same cause with different outcomes.
I am also wondering what would happen with a test directory (with proper autoload-dev) under the src directory (autoload)...