A scope is a set of files and/or directories in which you can inspect, search and analyze source code, apply
file coloring
.
A scope can include one or more files,
folders,
or a whole project.
Scopes can be shared or local:
-
Shared scopes
are accessible for the team members and are stored at the project level
in the misc.xml file.
-
Local scopes
are intended for personal use only and are stored in
your workspace
workspace.xml
PhpStorm provides a special language that enables you to flexibly define the sets of entities
included in a scope. See Scope Language Syntax Reference
for details.
To create and edit the scopes, the Scopes dialog is used.
You can explore the scopes in the Project tool window.
Predefined scopes
PhpStorm provides a number of predefined scopes, for example:
-
Problems.
This scope is available only as a view in the Project tool window.
It includes the files within the project content roots in which syntactic errors are found.
-
Project and Libraries.
In the Project tool window, this scope corresponds to
the scope view All.
-
Project Production Files.
This scope is similar to the Project Files scope.
The difference is that the test source roots are not included.
In the Project tool window, this scope corresponds to
the scope view Production.
-
Project Test Files.
This scope is limited to the project test source roots.
In the Project tool window, this scope corresponds to
the scope view Tests.
-
Non-Project Files.
This scope is available only as a view in the Project tool window.
It is limited to module dependencies (libraries and SDKs).
-
Changed Files.
This scope corresponds to all changed files, that is, ones associated with
all existing changelists.
-
Default.
This scope corresponds to the files associated with
the changelist Default.
-
Favorite '<name>'.
This scope corresponds to a list of favorite items with the specified name.
See Managing Your Project Favorites.
-
Selected files.
This scope corresponds to the files currently selected in PhpStorm
(e.g. in the Project tool window).
Predefined scopes cannot be edited.