nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
295 stars 54 forks source link

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

Open igor-netFantom opened 1 year ago

igor-netFantom commented 1 year ago

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