Skip to content

MissedFieldInspection inspection error on orderBy method after upgrading Yii2 to 2.0.48.* #289

@igor-netFantom

Description

@igor-netFantom

What steps will reproduce the problem?

Upgrade Yii framework to 2.0.48.*
composer require yiisoft/yii2 2.0.48.*
Use orderBy() on ActiveQuery for searching ActiveRecord model.
\app\models\User::find()->orderBy(['id'=>SORT_DESC])->one();

What is the expected result?

Same as on yiisoft/yii2 2.0.47.*:
No inspection errors on orderBy() parameters.

What do you get instead?

MissedFieldInspection (PHP/Framework/Yii2/Object Factory/Missed field)
Field 'id' not exists in referenced class \yii\db\ExpressionInterface
MissedFieldInspection

Additional info

Q A
IDE Name PhpStorm
IDE Version 2022.3.3
Plugin version 0.10.58.37
Yii App Template basic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions