Index dependencies based on composer.lock file
Hello,
does anybody know a way to create an index of the composer dependencies based on the composer.lock file? I run composer inside a docker container and I do not want to bind the vendor folder to the host.
Thanks
Markus
Please sign in to leave a comment.
There's no such way - PhpStorm has to have access to sources in order to index them.
The use case feels a bit unclear - could you please elaborate on why you don't want to map the vendor directory into the project?
Thanks for the quick response.
We use a setup in which the composer dependencies are installed inside the container by the Dockerfile script. Mounting a volume afterwards would overwrite the content of the vendor folder with the host's content. Not having to care about the packages being actually present on the host makes much sense to me, when the code only runs inside the container - in terms of collaboration and consistency. There are other use cases where the code is not runnig on the same system it is developed on. Of course, there are always workarounds for this, but since there is alread the "Shared Index" feature it felt natural to have a commonly shared index for packages publicly available.
TL;DR: Keep up the good work!
Yes, but we only build shared indexes for a fraction of most popular packages - if we only use this mechanism to index your dependencies, the index won't be complete and code analysis with navigation won't work as expected.
Do you think that despite this (quite significant) limitation it would still be a useful feature for you?
I understand, providing an index for every package from Packagist is probably too much to ask. I think this feature would only be useful to us, if there was a way to have all the used packages (even some smaller ones) indexed. Maybe some time in the future there will be a feature having missing packages "cloud-indexed" on demand.
Thanks for the explanation.