Browse Source

more details in upgrade notes

tags/2.0.13
Carsten Brandt 7 years ago
parent
commit
8861aab2ac
No known key found for this signature in database
GPG Key ID: BE4F41DE1DEEEED0
  1. 6
      framework/UPGRADE.md
  2. 3
      framework/base/StaticInstanceInterface.php

6
framework/UPGRADE.md

@ -108,13 +108,13 @@ Upgrade from Yii 2.0.12
require `"yiisoft/yii2": "~2.0.13"` in composer.json and change affected classes to extend from `yii\base\BaseObject`
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 change may affect your application in the following ways:
* A new method `public static function instance($refresh = false);` has been added to the `yii\db\ActiveRecordInterface` via a new
`yii\base\StaticInstanceInterface`. 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`.
in a class that does not extend `Model`. You may use `yii\base\StaticInstanceTrait` to implement it.
Upgrade from Yii 2.0.11
-----------------------

3
framework/base/StaticInstanceInterface.php

@ -13,8 +13,11 @@ namespace yii\base;
* For example: adjustments made by DI or behaviors reveal only at object level, but might be needed
* at class (static) level as well.
*
* To implement the [[instance()]] method you may use [[StaticInstanceTrait]].
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0.13
* @see StaticInstanceTrait
*/
interface StaticInstanceInterface
{

Loading…
Cancel
Save