You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHPStan crashing when I use static type in relation, for example: recursive category with same parent type:
class` Category extends ActiveRecord
{
public function getParent(): ActiveQuery
{
return $this->hasOne(static::class, ['id' => 'parent_id']);
}
}
And I got error:
Line common/components/category/models/Category.php
------ --------------------------------------------------------------
Internal error: Invalid argument provided to method hasOne
Hint: You should use ::class instead of ::className()
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
-- -------------------------------------------------------------------------------------------------
Error
-- -------------------------------------------------------------------------------------------------
Error message "Internal error: Invalid argument provided to method hasOne
Hint: You should use ::class instead of ::className()
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new" cannot be ignored, use excludes_analyse instead.
-- -------------------------------------------------------------------------------------------------
[ERROR] Found 1 errors
I use last version of proget-hq/phpstan-yii2 on current date.
The text was updated successfully, but these errors were encountered:
PHPStan crashing when I use static type in relation, for example: recursive category with same parent type:
And I got error:
I use last version of proget-hq/phpstan-yii2 on current date.
The text was updated successfully, but these errors were encountered: