Excluding folder from PHPstorm index and looking for errors
-
Mark such a duplicated folder as "Excluded" (either using the context menu in the Project View panel, or
Settings/Preferences | Directories
) -
Make sure no such excluded folder is listed in the section
Settings/Preferences | Languages & Frameworks | PHP --> Include paths
. If so, delete it there too.
Thing: if Add packages as libraries
the Composer options option in PhpStorm was enabled, the package will be added as an "external library", so it will not be considered a valid part of the project (not involved in error checking / TODOs / use reference / refactoring operations, etc.). but it is still included in character resolution (class names, etc.) even though it is marked Excluded.
source to share
Right click on folder-> Mark directory as-> Excluded. This will prevent it from being indexed and included in project searches. This is also useful if you are using multiple packages and your Search Project results are distracted from the heap of unrelated material from your Vendors or Cache folders.
source to share