PHPackages                             brianhenryie/composer-phpstorm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. brianhenryie/composer-phpstorm

ActiveComposer-plugin[Testing &amp; Quality](/categories/testing)

brianhenryie/composer-phpstorm
==============================

Composer script to exclude folders from PhpStorm code navigation.

0.4(2y ago)13.1k↑33.3%[2 issues](https://github.com/BrianHenryIE/composer-phpstorm/issues)[1 PRs](https://github.com/BrianHenryIE/composer-phpstorm/pulls)1MITPHP

Since Feb 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BrianHenryIE/composer-phpstorm)[ Packagist](https://packagist.org/packages/brianhenryie/composer-phpstorm)[ Docs](https://github.com/BrianHenryIE/composer-phpstorm)[ RSS](/packages/brianhenryie-composer-phpstorm/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (1)

[![PHPCS PSR12](https://camo.githubusercontent.com/db69b426085ab8bb628e9b603f3fb7430089e69207752199ac83b19e19ce9a97/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50485043532d50535225323031322d6630396634372e737667)](https://www.php-fig.org/psr/psr-12/)

Composer-PhpStorm
=================

[](#composer-phpstorm)

Auto-creates PhpStorm Run Configurations for PHP Unit, marks folders as excluded, and configures WordPress integration.

*Tested from PhpStorm 2019.3 to 2024.1.2*

Overview
--------

[](#overview)

- **ExcludeFolders** marks specified folders, symlinked folders and [Mozart](https://github.com/coenjacobs/mozart) managed packages as excluded from PhpStorm code navigation and completion, by adding entries to the project's `.iml` configuration file
- **PHPUnitRunConfigurations** creates a [Run Configuration](https://www.jetbrains.com/help/phpstorm/creating-run-debug-configuration-for-tests.html) for every `phpunit.xml` found in the project (ignoring `/vendor` and `/wp-content`), by adding entries to `workspace.xml`
- **WordPress** searches for a WordPress install and enables WordPress support.

Installation
------------

[](#installation)

```
composer config allow-plugins.brianhenryie/composer-phpstorm true
composer require --dev brianhenryie/composer-phpstorm

```

Optionally:

```
"extra": {
 "phpstorm": {
  "exclude_folders": {
  	"folders": [
   		"path/to/folder_one/from/project/base",
  		"path/to/folder_two/from/project/base"
   ],
   "include_folders": [
  		"path/to/folder_one/from/project/base",
   ],
   "composer-symlinks": false
  }
 }
}

```

Operation
---------

[](#operation)

### ExcludeFolders

[](#excludefolders)

Folders to exclude can be specified under `extras/phpstorm/exclude_folders/folders`. These are assumed to be relative from the project root.

PhpStorm automatically adds project folders inside the vendor folder to its excluded folders list, so adding them to the `folders` list doesn't achieve the desired effect. Instead, the `vendor/vendor-name/project/src` folder should be added to the `exculde_folders/folders` list and, counter-intuitively, `vendor/vendor-name/project/src` should be added to the `exculde_folders/include_folders` list.

The Composer tool [coenjacobs/mozart](https://github.com/coenjacobs/mozart), for prefixing package namespaces, results in each class being copied, thus each classname::function having multiple implementations in PhpStorm's code completion. This tool reads the Mozart Composer configuration and excludes source folders of packages managed by Mozart.

The file source of symlinks created by [kporras07/composer-symlinks](https://github.com/kporras07/composer-symlinks) are excluded if in the project directory. This can be disabled by setting `extras/phpstorm/exclude_folders/folders` to `false` in your `composer.json`. The file souce of a symlink is not excluded if it is in the root of the project.

Inside `/.idea/project-name.iml`'s ` ` adds:

```

```

### PHPUnitRunConfigurations

[](#phpunitrunconfigurations)

The script searches the project directory for `phpunit.xml` and creates a PhpStorm Run Configuration for each one found (ignoring those under `/vendor/`), using the name `phpunit` when found in the project root folder and the folder name otherwise.

Inside `/.idea/workspace.xml`'s `` adds:

```

```

Why?
----

[](#why)

WordPress. [I write many small plugins](https://github.com/BrianHenryIE/WordPress-Plugin-Boilerplate), this will click a few buttons for me that I don't much care for.

TODO
----

[](#todo)

- Symlinks could be searched for, then checked if they were pointing inside the project directory, rather than reading from composer.json
- Set Default Interpreter (PHP Language Level/CLI Interpreter)
- Configuration to allow excluding autodiscovered `phpunit.xml`s
- Should find subpackages of those processed by Mozart
- Set PHP language level
- Set PHPCS, CBF, WordPress path
- Allow disabling Mozart integration
- Automatically handle `vendor-name/project` folders in exclusion list but including that folder and excluding their `src` folder.
- Should be one script and conditionally run parts based on config.
- Consider [geecu/phpstorm-configurator](https://github.com/geecu/phpstorm-configurator/)

See Also
--------

[](#see-also)

- [BrianHenryIE/composer-fallback-to-git](https://github.com/BrianHenryIE/composer-fallback-to-git)
- [BrianHenryIE/composer-prefer-local](https://github.com/BrianHenryIE/composer-prefer-local)

Acknowledgements
----------------

[](#acknowledgements)

I was waiting for MacOS Catalina to download and install. I learned how to write the Composer extension from reading [kporras07/composer-symlinks](https://github.com/kporras07/composer-symlinks).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

735d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4720401?v=4)[Brian Henry](/maintainers/BrianHenryIE)[@BrianHenryIE](https://github.com/BrianHenryIE)

---

Top Contributors

[![BrianHenryIE](https://avatars.githubusercontent.com/u/4720401?v=4)](https://github.com/BrianHenryIE "BrianHenryIE (17 commits)")

---

Tags

composerphpstormphpunitcomposerphpstormexcludefolder

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/brianhenryie-composer-phpstorm/health.svg)

```
[![Health](https://phpackages.com/badges/brianhenryie-composer-phpstorm/health.svg)](https://phpackages.com/packages/brianhenryie-composer-phpstorm)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.3M975](/packages/phpro-grumphp)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

598170.6M2.2k](/packages/dealerdirect-phpcodesniffer-composer-installer)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13186.2k8](/packages/youwe-testing-suite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
