Update PHPDoc, CHANGELOG, UPGRADE.md

This commit is contained in:
SilverFire - Dmitry Naumenko
2016-05-22 12:54:20 +03:00
parent 7249a6c99e
commit 38be74446e
3 changed files with 12 additions and 3 deletions

View File

@ -5,11 +5,12 @@ Yii Framework 2 Change Log
2.0.9 under development
-----------------------
- Enh #8795: Refactored `yii\web\User::loginByCookie()` in order to make it easier to override (maine-mike, silverfire)
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
- Enh #8795: Move Identity Cookie code into separate functions and cleanup invalid identity cookies
- Enh #8795: Move Identity Cookie code into separate functions and cleanup invalid identity cookies (maine-mike)
- Enh #8795 Move Identity Cookie code into separate functions and cleanup invalid identity cookies (maine-mike)
-•Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
- Enh #11490: Added `yii\data\ArrayDataProvider::$modelClass` property to specify a model used to provide column labels even when data array is empty (PowerGamer1)
- Enh #11591: Added support for wildcards for `only` and `except` at `yii\base\ActionFilter` (klimov-paul)

View File

@ -15,6 +15,12 @@ php composer.phar self-update
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
```
Upgrade from Yii 2.0.8
----------------------
* Part of code from `yii\web\User::loginByCookie()` method was moved to new `getIdentityAndDurationFromCookie()`
and `removeIdentityCookie()` methods. If you override `loginByCookie()` method, update it in order use new methods.
Upgrade from Yii 2.0.7
----------------------

View File

@ -549,12 +549,13 @@ class User extends Component
* This method attempts to authenticate a user using the information in the identity cookie.
* @return array|null Returns an array of 'identity' and 'duration' if valid, otherwise null.
* @see loginByCookie()
* @since 2.0.9
*/
protected function getIdentityAndDurationFromCookie()
{
$value = Yii::$app->getRequest()->getCookies()->getValue($this->identityCookie['name']);
if ($value === null) {
return;
return null;
}
$data = json_decode($value, true);
if (count($data) == 3) {
@ -573,12 +574,13 @@ class User extends Component
}
}
$this->removeIdentityCookie();
return;
return null;
}
/**
* Removes the identity cookie.
* This method is used when [[enableAutoLogin]] is true.
* @since 2.0.9
*/
protected function removeIdentityCookie()
{