[Heads Up] Errors After Last Update (Load, Find, ...)

If you’re getting errors like

unknown property: yii\db\ActiveQuery::id


unknown method yii\db\ActiveQuery::load() 

after last update, here’s the fix.

For those who uses Gii-generated stuff:

Basically this happens because shortcut MyModel()::find($id) was replaced by MyModel()::findOne($id).

In fact, this is good, because there’s no confusing

find() returninig ActiveQuery

find($id) returning ActiveRecord


So inspect your code and change it accordingly.

For those who uses named scopes:

Replace createQuery() with find(), use docs as a reference.