proget-hq/phpstan-phpspec
Composer 安装命令:
composer require proget-hq/phpstan-phpspec
包简介
PhpSpec extension for PHPStan
README 文档
README
What does it do?
- Currently compatible with original specs from
PhpSpecitself - Check if custom matcher exist in given spec class
- support fot
getMatchersmethod
- support fot
- Provides correct return type for
Collaboratorin spec methodswill*methods- support for array return type (check if array item has correct type)
- Allow to user
PropehcyasCollaboratorargumentsArgument::cetera(),Argument::any()
- Provides correct attributes for
Collaborator - Provides correct methods for
ObjectBehavior:should*methodsduring*methodsbeConstructedWith,beConstructedThrough,beAnInstanceOf- search original spec class (subject) and check if methods exists
- Provides correct attributes for
ObjectBehavior:- public attributes
- static properties (with
$this->CONSTANT_NAME)
- Provides correct class for
getWrappedObjectmethod - Support
ObjectState Matcherand check if appropriate methods exists
Compatibility
| PHPStan version | PhpSpec version | PhpSpec extension version |
|---|---|---|
| ^0.11.6 | ^6.0 | 0.3.x |
| ^0.11.6 | ^5.1 | 0.2.x |
| ^0.10.7 | ^5.1 | 0.1.x |
Installation
composer require --dev proget-hq/phpstan-phpspec
Configuration
Put this into your phpstan.neon config:
includes: - vendor/proget-hq/phpstan-phpspec/extension.neon parameters: specDir: 'spec/'
proget-hq/phpstan-phpspec 适用场景与选型建议
proget-hq/phpstan-phpspec 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 30.59k 次下载、GitHub Stars 达 20, 最近一次更新时间为 2018 年 12 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 proget-hq/phpstan-phpspec 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 proget-hq/phpstan-phpspec 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 30.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 6
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-19