A library is a collection of code used in your projects as is. This collection is presented in a set of files stored in an archive or directory (or in a number of archives and directories).
Libraries may optionally include API documentation which enables you to use inline documentation extracted from the source code and to view the API documentation right from PhpStorm.
Libraries are protected against any kind of modification, such as direct intentional editing or update result from refactoring. Libraries are also excluded from error checks. All this allows to save resource and improve performance and productivity.
In PHP development, you can use a third-party tool or framework as a library in several modes:
- Store the tool under the project content root.
- Store the tool under the PHP home directory and specify relative paths to it.
- Store the tool elsewhere and configure it as a custom command line tool.
In either case, you can use exploded and archived tool sources. PhpStorm recognizes most popular
as well as the PHP native PHAR format.
PHAR files from the current project and the specified include path are shown
in the project tool window under the Project View/Libraries/PHAR node and available for browsing right there.
PHAR files are involved in indexing and therefore are used in autocompletion, search, reference resolution, etc.