mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +08:00
Fix merge conflict
This commit is contained in:
@@ -57,11 +57,13 @@ Yii Framework 2 Change Log
|
|||||||
- Enh #10056: Allowed any callable to be passed to `ActionColumn::$urlCreator` (freezy-sk)
|
- Enh #10056: Allowed any callable to be passed to `ActionColumn::$urlCreator` (freezy-sk)
|
||||||
- Enh #10061: `yii\helpers\BaseInflector::transliterate()` is now public. Introduced different levels of transliteration strictness (silverfire)
|
- Enh #10061: `yii\helpers\BaseInflector::transliterate()` is now public. Introduced different levels of transliteration strictness (silverfire)
|
||||||
- Enh #10118: Allow easy extension of slug generation in `yii\behaviors\SluggableBehavior` (cebe, hesna)
|
- Enh #10118: Allow easy extension of slug generation in `yii\behaviors\SluggableBehavior` (cebe, hesna)
|
||||||
|
- Enh #10149: Made `yii\db\Connection` serializable (Sam Mousa)
|
||||||
- Enh: Added last resort measure for `FileHelper::removeDirectory()` fail to unlink symlinks under Windows (samdark)
|
- Enh: Added last resort measure for `FileHelper::removeDirectory()` fail to unlink symlinks under Windows (samdark)
|
||||||
- Chg #9369: `Yii::$app->user->can()` now returns `false` instead of erroring in case `authManager` component is not configured (creocoder)
|
- Chg #9369: `Yii::$app->user->can()` now returns `false` instead of erroring in case `authManager` component is not configured (creocoder)
|
||||||
- Chg #9411: `DetailView` now automatically sets container tag ID in case it's not specified (samdark)
|
- Chg #9411: `DetailView` now automatically sets container tag ID in case it's not specified (samdark)
|
||||||
- Chg #9953: `TimestampBehavior::getValue()` changed to make value processing consistent with `AttributeBehavior::getValue()` (silverfire)
|
- Chg #9953: `TimestampBehavior::getValue()` changed to make value processing consistent with `AttributeBehavior::getValue()` (silverfire)
|
||||||
- New #10083: Added wrapper for PHP webserver (samdark)
|
- New #10083: Added wrapper for PHP webserver (samdark)
|
||||||
|
- Enh #10098: Changed `yii.confirm` context bind to triggered dom element. (lichunqiang)
|
||||||
- Enh #10158: Added the possibility to specify CSS and Javascript options per file in `\yii\web\AssetBundle` (machour)
|
- Enh #10158: Added the possibility to specify CSS and Javascript options per file in `\yii\web\AssetBundle` (machour)
|
||||||
|
|
||||||
2.0.6 August 05, 2015
|
2.0.6 August 05, 2015
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ initialization to support wider range of allowed characters. Because of this cha
|
|||||||
See the [Cache Flushing Guide](http://www.yiiframework.com/doc-2.0/guide-caching-data.html#cache-flushing)
|
See the [Cache Flushing Guide](http://www.yiiframework.com/doc-2.0/guide-caching-data.html#cache-flushing)
|
||||||
- If you implement `parseRequest()` or `createUrl()` and rely on parameter names, call `substitutePlaceholderNames()`
|
- If you implement `parseRequest()` or `createUrl()` and rely on parameter names, call `substitutePlaceholderNames()`
|
||||||
in order to replace temporary IDs with parameter names after doing matching.
|
in order to replace temporary IDs with parameter names after doing matching.
|
||||||
|
* The context of `yii.confirm` function in `yii.js` was changed to the triggered dom element.
|
||||||
|
- If you rewrited the `yii.confirm` function, you can get the triggered dom element as: `this` or `$(this)` to get jquery object.
|
||||||
|
|
||||||
Upgrade from Yii 2.0.5
|
Upgrade from Yii 2.0.5
|
||||||
----------------------
|
----------------------
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ yii = (function ($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (message !== undefined) {
|
if (message !== undefined) {
|
||||||
pub.confirm(message, function () {
|
$.proxy(pub.confirm, this)(message, function () {
|
||||||
pub.handleAction($this, event);
|
pub.handleAction($this, event);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -945,4 +945,14 @@ class Connection extends Component
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close the connection before serializing.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function __sleep()
|
||||||
|
{
|
||||||
|
$this->close();
|
||||||
|
return array_keys((array) $this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use yii\db\Transaction;
|
|||||||
*/
|
*/
|
||||||
class ConnectionTest extends DatabaseTestCase
|
class ConnectionTest extends DatabaseTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
$connection = $this->getConnection(false);
|
$connection = $this->getConnection(false);
|
||||||
@@ -42,6 +43,17 @@ class ConnectionTest extends DatabaseTestCase
|
|||||||
$connection->open();
|
$connection->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSerialize()
|
||||||
|
{
|
||||||
|
$connection = $this->getConnection(false, false);
|
||||||
|
$connection->open();
|
||||||
|
$serialized = serialize($connection);
|
||||||
|
$unserialized = unserialize($serialized);
|
||||||
|
$this->assertInstanceOf('yii\db\Connection', $unserialized);
|
||||||
|
|
||||||
|
$this->assertEquals(123, $connection->createCommand("SELECT 123")->queryScalar());
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetDriverName()
|
public function testGetDriverName()
|
||||||
{
|
{
|
||||||
$connection = $this->getConnection(false, false);
|
$connection = $this->getConnection(false, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user