Excluding folder from PHPstorm index and looking for errors

I am new to PHPstorm and am running Laravel as my main framework. In my vendors folder, I have a model that I also imported into my applications / models folder and now it complains about two models and functions with the same name, can I exclude one folder in vendor /?

+3


source to share


2 answers


  • 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.

+11


source


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.



0


source







All Articles