jetbrains/phpstorm-stubs
Composer 安装命令:
composer require jetbrains/phpstorm-stubs
包简介
PHP runtime & extensions header files for PhpStorm
README 文档
README
STUBS are normal, syntactically correct PHP files that contain function & class signatures, constant definitions, etc. for all built-in PHP stuff and most standard extensions. Stubs need to include complete PHPDOC, 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.)
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
Contribution process
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
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.
How to run tests
- Execute
docker compose -f docker-compose.yml run test_runner composer install --ignore-platform-reqs - Execute
docker compose -f docker-compose.yml run -e PHP_VERSION=8.0 test_runner vendor/bin/phpunit --testsuite PHP_8.0
How to update stub map
Execute docker compose -f docker-compose.yml run test_runner /usr/local/bin/php tests/Tools/generate-stub-map and commit the resulting PhpStormStubsMap.php
License
contains material by the PHP Documentation Group, licensed with CC-BY 3.0
jetbrains/phpstorm-stubs 适用场景与选型建议
jetbrains/phpstorm-stubs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31.47M 次下载、GitHub Stars 达 1.36k, 最近一次更新时间为 2017 年 01 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「code」 「autocomplete」 「type」 「inference」 「stubs」 「inspection」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jetbrains/phpstorm-stubs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jetbrains/phpstorm-stubs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jetbrains/phpstorm-stubs 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
The Cassandra php driver library IDE stubs which enables autocompletion in modern IDEs.
A bundle providing fields for image upload with jquery upload and image cropping with jcrop for symfony2
A simple Symfony bundle that adds boolean form field type.
A PHP Abstract Enum Class
Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.
统计信息
- 总下载量: 31.47M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1373
- 点击次数: 29
- 依赖项目数: 67
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2017-01-29