I use PhpStorm to work on a Symfony project.
In the File > Settings > Project … > Directories configuration, I defined the vendor/
directory as a Resource root in order to have auto-completion and as an Excluded folder because I want to ignore vendors when performing a search in my project's code.
But my problem is that vendors are still shown in search results.
Here is my current configuration:
Here is what I'm trying to avoid: results from vendor/
are shown:
Here is the PHP configuration:
I can restrict search by selecting Scope = Custom but sometimes I forget to change this. I'm looking for some settings that I can use in my different Symfony2/3 projects.
How should I mark the vendor/
directory in order to allow PhpStorm to use it as a resource root and ignore it when performing a search?
And what is the correct configuration for the default directories structure of a Symfony2 project? Here are the default directories after a Symfony 2.8 installation with composer create-project symfony/framework-standard-edition symfony-2.8 "~2.8"
:
app/
├ config
├ cache
├ logs
└ Resources
src/
└ AppBundle/
vendor/
web/
Here is how I marked the directories at this moment:
.idea [excluded]
app/
├ config
├ cache [excluded]
├ logs [excluded]
└ Resources
src/ [source]
└ AppBundle/
└ Tests/ [test source folders]
vendor/ [excluded]
web/
Note: I installed the Symfony plugin for PhpStorm, I don't know if this change the IDE behaviour.