mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -81,6 +81,8 @@ Yii Framework 2 Change Log
|
||||
- Chg: Changed the signature of `urlCreator` and button creators for `yii\gridview\ActionColumn` (qiangxue)
|
||||
- Chg: Updated HTMLPurified dependency to `4.6.*`.
|
||||
- Chg: Changed Yii autoloader to support loading PSR-4 classes only (i.e. PEAR-styled classes not supported anymore) (qiangxue)
|
||||
- Chg: Changed the directory structure of the framework repository according to PSR-4.
|
||||
You have to update your applications index.php and yii console file to point to the right location for Yii.php
|
||||
- Chg: Advanced app template: moved database connection DSN, login and password to `-local` config not to expose it to VCS (samdark)
|
||||
- New #66: [Auth client library](https://github.com/yiisoft/yii2-authclient) OpenId, OAuth1, OAuth2 clients (klimov-paul)
|
||||
- New #1393: [Codeception testing framework integration](https://github.com/yiisoft/yii2-codeception) (Ragazzo)
|
||||
|
||||
@ -30,6 +30,7 @@ return [
|
||||
'yii\base\InvalidConfigException' => YII_PATH . '/base/InvalidConfigException.php',
|
||||
'yii\base\InvalidParamException' => YII_PATH . '/base/InvalidParamException.php',
|
||||
'yii\base\InvalidRouteException' => YII_PATH . '/base/InvalidRouteException.php',
|
||||
'yii\base\MailEvent' => YII_PATH . '/base/MailEvent.php',
|
||||
'yii\base\Model' => YII_PATH . '/base/Model.php',
|
||||
'yii\base\ModelEvent' => YII_PATH . '/base/ModelEvent.php',
|
||||
'yii\base\Module' => YII_PATH . '/base/Module.php',
|
||||
@ -108,6 +109,8 @@ return [
|
||||
'yii\db\mssql\TableSchema' => YII_PATH . '/db/mssql/TableSchema.php',
|
||||
'yii\db\mysql\QueryBuilder' => YII_PATH . '/db/mysql/QueryBuilder.php',
|
||||
'yii\db\mysql\Schema' => YII_PATH . '/db/mysql/Schema.php',
|
||||
'yii\db\oci\QueryBuilder' => YII_PATH . '/db/oci/QueryBuilder.php',
|
||||
'yii\db\oci\Schema' => YII_PATH . '/db/oci/Schema.php',
|
||||
'yii\db\pgsql\QueryBuilder' => YII_PATH . '/db/pgsql/QueryBuilder.php',
|
||||
'yii\db\pgsql\Schema' => YII_PATH . '/db/pgsql/Schema.php',
|
||||
'yii\db\sqlite\QueryBuilder' => YII_PATH . '/db/sqlite/QueryBuilder.php',
|
||||
@ -220,7 +223,6 @@ return [
|
||||
'yii\web\PageCache' => YII_PATH . '/web/PageCache.php',
|
||||
'yii\web\Request' => YII_PATH . '/web/Request.php',
|
||||
'yii\web\Response' => YII_PATH . '/web/Response.php',
|
||||
'yii\web\ResponseEvent' => YII_PATH . '/web/ResponseEvent.php',
|
||||
'yii\web\ResponseFormatterInterface' => YII_PATH . '/web/ResponseFormatterInterface.php',
|
||||
'yii\web\Session' => YII_PATH . '/web/Session.php',
|
||||
'yii\web\SessionIterator' => YII_PATH . '/web/SessionIterator.php',
|
||||
|
||||
@ -81,18 +81,20 @@ class BaseJson
|
||||
*/
|
||||
protected static function processData($data, &$expressions, $expPrefix)
|
||||
{
|
||||
if ($data instanceof \JsonSerializable) {
|
||||
$data = $data->jsonSerialize();
|
||||
}
|
||||
|
||||
if (is_object($data)) {
|
||||
if ($data instanceof JsExpression) {
|
||||
$token = "!{[$expPrefix=" . count($expressions) . ']}!';
|
||||
$expressions['"' . $token . '"'] = $data->expression;
|
||||
return $token;
|
||||
} elseif ($data instanceof \JsonSerializable) {
|
||||
$data = $data->jsonSerialize();
|
||||
} elseif ($data instanceof Arrayable) {
|
||||
$data = $data->toArray();
|
||||
} else {
|
||||
$data = get_object_vars($data);
|
||||
}
|
||||
$data = $data instanceof Arrayable ? $data->toArray() : get_object_vars($data);
|
||||
if ($data === [] && !$data instanceof Arrayable) {
|
||||
|
||||
if ($data === []) {
|
||||
return new \stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user