When running phpstan analyse api --level the following error is thrown. Seems like a relatively "simple" backwards incompatible type-change by the phpstan project.
2/41 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░] 4%PHP Fatal error: Declaration of Proget\PHPStan\Yii2\Type\ActiveRecordObjectType::setOffsetValueType(?PHPStan\Type\Type $offsetType, PHPStan\Type\Type $valueType): PHPStan\Type\Type must be compatible with PHPStan\Type\ObjectType::setOffsetValueType(?PHPStan\Type\Type $offsetType, PHPStan\Type\Type $valueType, bool $unionValues = true): PHPStan\Type\Type in /home/etiennebruines/workspaces/mossaino/mossaino/vendor/proget-hq/phpstan-yii2/src/Type/ActiveRecordObjectType.php on line 28
<pre>PHP Compile Error 'yii\base\ErrorException' with message 'Declaration of Proget\PHPStan\Yii2\Type\ActiveRecordObjectType::setOffsetValueType(?PHPStan\Type\Type $offsetType, PHPStan\Type\Type $valueType): PHPStan\Type\Type must be compatible with PHPStan\Type\ObjectType::setOffsetValueType(?PHPStan\Type\Type $offsetType, PHPStan\Type\Type $valueType, bool $unionValues = true): PHPStan\Type\Type'
in /home/etiennebruines/workspaces/mossaino/mossaino/vendor/proget-hq/phpstan-yii2/src/Type/ActiveRecordObjectType.php:28
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}</pre>Script ./vendor/bin/phpstan analyse api --level max --memory-limit=1G handling the test/phpstan event returned with error code 1
When running
phpstan analyse api --level
the following error is thrown. Seems like a relatively "simple" backwards incompatible type-change by the phpstan project.Versions
Workaround
Pinning phpstan to
0.12.90
seems to alleviate the issue.