phpstan phpspec
0.3.0
PhpSpec本身的原始规格兼容getMatchers方法Collaborator提供了正确的返回类型will*方法Propehcy作为Collaborator参数Argument::cetera() , Argument::any()Collaborator提供了正确的属性ObjectBehavior提供了正确的方法:should*方法during*beConstructedWith , beConstructedThrough , beAnInstanceOfObjectBehavior提供了正确的属性:$this->CONSTANT_NAME )getWrappedObject方法提供正确的类ObjectState Matcher ,并检查是否存在适当的方法| phpstan版本 | phpspec版本 | phpspec扩展版本 |
|---|---|---|
| ^0.11.6 | ^6.0 | 0.3.x |
| ^0.11.6 | ^5.1 | 0.2.x |
| ^0.10.7 | ^5.1 | 0.1.x |
composer require --dev proget-hq/phpstan-phpspec将其放入您的phpstan.neon配置:
includes :
- vendor/proget-hq/phpstan-phpspec/extension.neon
parameters :
specDir : ' spec/ '