From 5ccbe85ffa18cd438e8f8008b2f736e41693fb7a Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Fri, 8 Sep 2017 16:28:02 +0200 Subject: [PATCH] improve upgrade instruction for AR::instance() issue #14767 --- framework/UPGRADE.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/UPGRADE.md b/framework/UPGRADE.md index a9edba85e3..8f72abc7a2 100644 --- a/framework/UPGRADE.md +++ b/framework/UPGRADE.md @@ -109,8 +109,12 @@ Upgrade from Yii 2.0.12 instead. It is not possible to allow Yii versions `<2.0.13` and be compatible with PHP 7.2 or higher. * A new method `public static function instance($refresh = false);` has been added to the `yii\db\ActiveRecordInterface`. - This method is implemented in the `yii\base\Model`, so the change only affects your code if you implement `ActiveRecordInterface` - in a class that does not extend `Model`. + This change may affect your application in the following ways: + + - If you have an `instance()` method defined in an `ActiveRecord` or `Model` class, you need to check whether the behavior is + compatible with the method added by Yii. + - Otherwise this method is implemented in the `yii\base\Model`, so the change only affects your code if you implement `ActiveRecordInterface` + in a class that does not extend `Model`. Upgrade from Yii 2.0.11 -----------------------