JetBrains

JetBrains/phpstorm-stubs

PHP Apache-2.0 Dev Tools

PHP runtime & extensions header files for PhpStorm

1.4k stars
823 forks
active
GitHub +2 / week

1.4k

Stars

823

Forks

3

Open issues

30

Contributors

v2026.1 28 Apr 2026

AI Analysis

phpstorm-stubs provides PHP runtime and standard extension header files (stubs) used by PhpStorm for code completion, type inference, and inspection. This is a specialized tool for IDE developers and PHP developers using PhpStorm; it is not useful outside that ecosystem. The project maintains PHP built-in function signatures and PHPDoc annotations across multiple PHP versions, with community-driven support for non-standard extensions.

Dev Tools Developer Tool Discovery value: 3/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

php ide stubs type-hints phpstorm
Actively maintained Well documented Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
2w ago

JetBrains-maintained PHP stubs for IDE type inference and completion

phpstorm-stubs provides PHP function, class, and constant signatures (stub files) for PhpStorm and other IDEs to enable accurate code completion, type inference, and documentation popups. Maintained by JetBrains since 2015, it covers PHP core and standard extensions. Real-world adoption is verified through Packagist downloads and IDE integration, but remains primarily valuable to PhpStorm users and developers using PHP-aware static analysis tools.

Origin

Created by JetBrains in March 2015 as the PHP runtime stubs for PhpStorm IDE. Over the past decade, it has evolved to include signatures for built-in PHP functions, classes, and most standard extensions. It became a foundational resource for the broader PHP tooling ecosystem.

Growth

Growth has been steady and incremental rather than explosive. Stars have accumulated modestly (~1,387 over 11 years), reflecting its niche utility: it is essential to PhpStorm users but not widely discussed outside IDE and static analysis communities. Recent activity (2 stars in 7 days as of June 2026) shows continued low but stable interest; the project itself remains actively maintained with regular commits and testing.

In production

Adoption appears verified through multiple channels: (1) Published on Packagist as jetbrains/phpstorm-stubs with documented total downloads; (2) Integrated into PhpStorm by default; (3) Used by IDEs and static analysis tools (e.g., via vscode-intelephense and laravel-ide-helper integration); (4) Community contributions indicate external usage. However, quantitative adoption metrics (Packagist monthly downloads, IDE telemetry) are not provided in README, so scale of usage remains opaque.

Code analysis
Architecture

Based on README: stubs are syntactically correct PHP files containing function/class signatures and PHPDoc annotations (@return, @param, @throws). The project uses Docker-based testing to validate stubs against multiple PHP versions via reflection caches (tests/cache/Reflection<version>.json). Likely organized as a collection of stub files per extension with a build/validation pipeline.

Tests

README documents multiple test suites: Unit, Structure, PhpDoc, and General. Tests are run via PHPUnit against committed reflection caches for multiple PHP versions. Regeneration pipeline uses Docker images per PHP version. Test infrastructure appears mature and comprehensive, though README notes that @throws tags are checked manually rather than automated.

Maintenance

Last push 2026-06-24 (5 days before evaluation date). Commits appear frequent and ongoing. Automated CI/CD workflows (GitHub Actions) for stubs tests and link validation are active. Maintenance appears active and sustained, though commit frequency is not documented. Issue tracker exists on JetBrains YourTrack. Signals indicate the project is actively maintained, not stagnant.

Honest verdict

ADOPT IF: You use PhpStorm, VS Code with Intelephense, or static analysis tools that rely on PHP stubs for type inference and completion. Also adopt if you maintain PHP tooling that needs accurate function/class signatures. AVOID IF: You do not use any IDE or static analysis tooling — stubs are purely for tooling support, not runtime. MONITOR IF: You contribute to PHP open-source tools; upstream changes to phpstorm-stubs may affect your project's accuracy.

Independent dimensions

Mainstream potential

3/10

Technical importance

7/10

Adoption evidence

6/10

Risks
  • Non-standard extension support is community-driven and not guaranteed to be accurate or complete; README explicitly states only PHPDoc validation, not correctness verification.
  • Exception signatures (@throws) are checked manually, not automated; risk of incomplete or outdated exception documentation.
  • Adoption metrics (download counts, IDE telemetry) are not published; scale of real-world usage is opaque.
  • Dependency on JetBrains for maintenance; if JetBrains deprioritizes the project, community contributions may not be sufficient for PHP 8+ features.
  • Stub format may diverge from other stub systems (e.g., Psalm, Intelephense); tooling compatibility is not guaranteed.
Prediction

Project will remain actively maintained as a foundational resource for PHP IDE tooling but is unlikely to grow significantly in star count. Adoption will likely expand slowly as PHP static analysis adoption increases, but growth will remain tied to PhpStorm and IDE market share rather than organic viral adoption.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

PHP
99.7%
Dockerfile
0.1%
Shell
0.1%
Batchfile
0.1%
Kotlin
0%

Information

Language
PHP
License
Apache-2.0
Last updated
3d ago
Created
137mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

phpstan

phpstan/phpstan

PHPStan is a static analysis tool for PHP that identifies bugs and type errors...

14k PHP Dev Tools
php-debugbar

php-debugbar/php-debugbar

PHP Debug Bar is a browser-based debugging toolbar that displays runtime...

4.4k PHP Dev Tools
JetBrains

JetBrains/intellij-plugins

This repository contains open-source plugins distributed with IntelliJ IDEA...

2.3k JavaScript Dev Tools
bmewburn

bmewburn/vscode-intelephense

Intelephense is a PHP language server extension for Visual Studio Code that...

1.9k TypeScript
kalessil

kalessil/phpinspectionsea

PHP Inspections (EA Extended) is a static code analyzer plugin for PhpStorm and...

1.5k Java Dev Tools
vs. alternatives
barryvdh/laravel-ide-helper

14,934 stars vs. 1,387. laravel-ide-helper generates IDE stubs specifically for Laravel projects. Narrower scope, but more stars due to Laravel popularity. phpstorm-stubs is broader (all PHP core + extensions) but less Laravel-specific.

phpstan/phpstan

14,010 stars. Static type checker that also uses stub files for type inference. phpstan-stubs is a dependency of phpstan but distinct; phpstan is the analysis engine, phpstorm-stubs is data. Different use cases (offline analysis vs. IDE real-time completion).

bmewburn/vscode-intelephense

1,856 stars. VS Code PHP language server that likely consumes stub data. Directly competes for IDE completion in VS Code; phpstorm-stubs is IDE-agnostic data that intelephense can use.

php/php-src

40,207 stars. Official PHP source. phpstorm-stubs mirrors PHP signatures but adds PHPDoc annotations for IDE consumption; complementary, not competitive.

JetBrains/intellij-plugins

2,259 stars. JetBrains plugin ecosystem. phpstorm-stubs is maintained by JetBrains as a plugin resource, not a competing project.