How to configure "Directories" when using a Symfony project in PhpStorm
<p>I use PhpStorm to work on a Symfony project.</p>

<p>In the <em>File > Settings > Project … > Directories</em> configuration, I defined the <code>vendor/</code> directory as a <em>Resource root</em> in order to have auto-completion and as an <em>Excluded folder</em> because I want to ignore vendors when performing a search in my project's code.</p>

<p>But my problem is that vendors are still shown in search results.</p>

<p>Here is my current configuration:</p>

<p><a href="https://i.stack.imgur.com/zi4SB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zi4SBm.png" alt="enter image description here"></a></p>

<p>Here is what I'm trying to avoid: results from <code>vendor/</code> are shown:</p>

<p><a href="https://i.stack.imgur.com/w7t5E.png" rel="noreferrer"><img src="https://i.stack.imgur.com/w7t5Em.png" alt="enter image description here"></a></p>

<p>Here is the PHP configuration:</p>

<p><a href="https://i.stack.imgur.com/YjsUD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YjsUDm.png" alt="enter image description here"></a></p>

<p>I can restrict search by selecting <em>Scope = Custom</em> but sometimes I forget to change this. I'm looking for some settings that I can use in my different Symfony2/3 projects.</p>

<p>How should I mark the <code>vendor/</code> directory in order to allow PhpStorm to use  it as a resource root and ignore it when performing a search?</p>

<p>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 <code>composer create-project symfony/framework-standard-edition symfony-2.8 "~2.8"</code>:</p>

<pre><code>app/
  ├ config
  ├ cache
  ├ logs
  └ Resources
src/
  └ AppBundle/
vendor/
web/
</code></pre>

<p>Here is how I marked the directories at this moment:</p>

<pre><code>.idea               [excluded]
app/
  ├ config
  ├ cache           [excluded]
  ├ logs            [excluded]
  └ Resources
src/                [source]
  └ AppBundle/
    └ Tests/        [test source folders]
vendor/             [excluded]
web/
</code></pre>

<p>Note: I installed the Symfony plugin for PhpStorm, I don't know if this change the IDE behaviour.</p>