PHPackages                             jetbrains/phpstorm-stubs - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jetbrains/phpstorm-stubs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jetbrains/phpstorm-stubs
========================

PHP runtime &amp; extensions header files for PhpStorm

v2026.1(4mo ago)1.4k32.7M↓12.5%823[6 PRs](https://github.com/JetBrains/phpstorm-stubs/pulls)20Apache-2.0PHPCI failing

Since Apr 25Pushed 1w ago242 watchersCompare

[ Source](https://github.com/JetBrains/phpstorm-stubs)[ Packagist](https://packagist.org/packages/jetbrains/phpstorm-stubs)[ Docs](https://www.jetbrains.com/phpstorm)[ RSS](/packages/jetbrains-phpstorm-stubs/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (8)Versions (43)Used By (20)

phpstorm-stubs
==============

[](#phpstorm-stubs)

[![official JetBrains project](https://camo.githubusercontent.com/0655d1f26f19660716b2371ee218ddbdb5931ea909921e9cadb24ed00c796609/687474703a2f2f6a622e67672f6261646765732f6f6666696369616c2e737667)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)[![License](https://camo.githubusercontent.com/a549a7a30bacba7bfceebdc207a8e86c3f2c02995a2527640dca30048fd2b64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e737667)](https://www.apache.org/licenses/LICENSE-2.0.html)[![Total Downloads](https://camo.githubusercontent.com/57486c35b887f0e3662f9decead06fd51f4d09990a6323a76df3d7e9e8166164/68747470733a2f2f706f7365722e707567782e6f72672f6a6574627261696e732f70687073746f726d2d73747562732f646f776e6c6f616473)](https://packagist.org/packages/jetbrains/phpstorm-stubs)

[![PhpStorm Stubs Tests](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/main.yml/badge.svg)](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/main.yml)[![PhpStorm Stubs Check Links](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/testLinks.yml/badge.svg)](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/testLinks.yml)

STUBS are normal, syntactically correct PHP files that contain function &amp; class signatures, constant definitions, etc. for all built-in PHP stuff and most standard extensions. Stubs need to include complete [PHPDOC](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md), especially proper @return annotations.

An IDE needs them for completion, code inspection, type inference, doc popups, etc. Quality of most of these services depend on the quality of the stubs (basically their PHPDOC @annotations).

Note that the stubs for “non-standard” extensions are provided as is. (Non-Standard extensions are the ones that are not part of PHP Core or are not Bundled/External - see the complete list [here](http://php.net/manual/en/extensions.membership.php).)

The support for such “non-standard” stubs is community-driven, and we only validate their PHPDoc. We do not check whether a stub matches the actual extension or whether the provided descriptions are correct.

Please note that currently there are no tests for the thrown exceptions so @throws tags should be checked manually according to official docs or PHP source code

[Relevant open issues](https://youtrack.jetbrains.com/issues/WI?q=%23Unresolved+Subsystem%3A+%7BPHP+lib+stubs%7D+order+by%3A+votes+)

### Contribution process

[](#contribution-process)

[Contribution process](CONTRIBUTING.md)

### Updating the IDE

[](#updating-the-ide)

Have a full copy of the .git repo within an IDE and provide its path in `Settings | Languages & Frameworks | PHP | PHP Runtime | Advanced settings | Default stubs path`. It should then be easily updatable both ways via normal git methods.

### Extensions enabled by default

[](#extensions-enabled-by-default)

The set of extensions enabled by default in PhpStorm can change anytime without prior notice. To learn how to view the enabled extensions, look [here](https://blog.jetbrains.com/phpstorm/2017/03/per-project-php-extension-settings-in-phpstorm-2017-1/).

### How to run tests

[](#how-to-run-tests)

The validators run on a single PHP version (the `test_runner` image) and check every supported PHP version using the committed per-version reflection caches in `tests/cache/Reflection.json`.

#### The easy way

[](#the-easy-way)

Run the bundled script — it installs dependencies, regenerates the stubs cache from your stub edits, and runs every test suite (`Unit`, `Structure`, `PhpDoc`, `General`) in order:

- macOS / Linux: `./runTests.sh`
- Windows: `runTests.bat`

By default the script validates against the **committed** reflection caches (`tests/cache/Reflection.json`) — exactly what CI does — so a normal run never rewrites them. Pass `--refresh-reflection` (e.g. `./runTests.sh --refresh-reflection`) to regenerate them locally; this is slow and rarely needed, and the result should not be committed (see below).

Both scripts require Docker (they use the `test_runner` image defined in `docker-compose.yml`).

#### Running suites manually

[](#running-suites-manually)

If you prefer to run individual steps:

1. Install dependencies: `docker compose -f docker-compose.yml run --rm test_runner composer install --no-progress`
2. If you changed stub files, regenerate the stubs cache so the tests validate your changes: `docker compose -f docker-compose.yml run --rm test_runner php tests/run-stubs-parser.php`
3. Run a test suite — one of `General`, `PhpDoc`, `Structure` or `Unit`: `docker compose -f docker-compose.yml run --rm test_runner vendor/bin/phpunit --testsuite General`

The reflection caches are generated offline from the per-version Docker images; see [tests/REFLECTION\_PARSER\_README.md](tests/REFLECTION_PARSER_README.md) for the regeneration pipeline.

### How to update stub map

[](#how-to-update-stub-map)

Execute `docker compose -f docker-compose.yml run --rm test_runner php tests/Framework/Tools/generate-stubs-map.php` and commit the resulting `PhpStormStubsMap.php`

### License

[](#license)

[Apache 2](https://www.apache.org/licenses/LICENSE-2.0)

contains material by the PHP Documentation Group, licensed with [CC-BY 3.0](https://www.php.net/manual/en/cc.license.php)

###  Health Score

77

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity78

Solid adoption and visibility

Community58

Growing community involvement

Maturity75

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Every ~150 days

Recently: every ~178 days

Total

20

Last Release

133d ago

Major Versions

v2021.3 → v2022.12022-03-08

v2022.3 → v2023.12023-02-11

v2023.3 → v2024.12024-03-07

v2024.3 → v2025.32025-09-18

v2025.3 → v2026.12026-02-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa54ef3f5a094dc9ef7ec7fcf389b96d21418e4d68fc1a12f3f3b89a8601c2b4?d=identicon)[maxim.kolmakov](/maintainers/maxim.kolmakov)

![](https://www.gravatar.com/avatar/4e4e6c5cdba23ea68c8719243c790469c4f29cd53cf0ff5610148bfddf4261a6?d=identicon)[neuro159](/maintainers/neuro159)

![](https://www.gravatar.com/avatar/4bd0d2156cc7d5b57f59481686305f06b78e1cd94a540c1d4237449b5ea660d7?d=identicon)[wbars](/maintainers/wbars)

---

Top Contributors

[![isfedorov](https://avatars.githubusercontent.com/u/37301285?v=4)](https://github.com/isfedorov "isfedorov (873 commits)")[![andrey-sokolov](https://avatars.githubusercontent.com/u/12999170?v=4)](https://github.com/andrey-sokolov "andrey-sokolov (527 commits)")[![neuro159](https://avatars.githubusercontent.com/u/87308?v=4)](https://github.com/neuro159 "neuro159 (346 commits)")[![MaXal](https://avatars.githubusercontent.com/u/266747?v=4)](https://github.com/MaXal "MaXal (311 commits)")[![wbars](https://avatars.githubusercontent.com/u/5152749?v=4)](https://github.com/wbars "wbars (214 commits)")[![DmitryTronin](https://avatars.githubusercontent.com/u/33625946?v=4)](https://github.com/DmitryTronin "DmitryTronin (72 commits)")[![b1rdex](https://avatars.githubusercontent.com/u/312855?v=4)](https://github.com/b1rdex "b1rdex (60 commits)")[![LolGleb](https://avatars.githubusercontent.com/u/8499972?v=4)](https://github.com/LolGleb "LolGleb (56 commits)")[![voku](https://avatars.githubusercontent.com/u/264695?v=4)](https://github.com/voku "voku (56 commits)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (52 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (51 commits)")[![pestretsov](https://avatars.githubusercontent.com/u/3885667?v=4)](https://github.com/pestretsov "pestretsov (51 commits)")[![tillkruss](https://avatars.githubusercontent.com/u/665029?v=4)](https://github.com/tillkruss "tillkruss (50 commits)")[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (36 commits)")[![bzixilu](https://avatars.githubusercontent.com/u/1190092?v=4)](https://github.com/bzixilu "bzixilu (33 commits)")[![King2500](https://avatars.githubusercontent.com/u/4896363?v=4)](https://github.com/King2500 "King2500 (33 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (27 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (25 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (24 commits)")[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (23 commits)")

---

Tags

typeautocompletephpstormcodeinferencestubsinspectionjetbrains

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jetbrains-phpstorm-stubs/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k132.8M887](/packages/barryvdh-laravel-ide-helper)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1703.3M132](/packages/phalcon-ide-stubs)[jetbrains/phpstorm-attributes

PhpStorm specific attributes

41517.6M820](/packages/jetbrains-phpstorm-attributes)[bazilio/yii2-stubs-generator

Yii2 component stubs generator for Yii::$app

146766.2k1](/packages/bazilio-yii2-stubs-generator)[thomas-schulz/symfony-meta

PhpStorm meta data for expected arguments completion in symfony projects.

9059.6k](/packages/thomas-schulz-symfony-meta)[mis/yii2-ide-helper

Yii2 IDE Helper, generates correct PHPDocs for all components, to improve auto-completion.

1666.7k3](/packages/mis-yii2-ide-helper)

PHPackages © 2026

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