Commit cb20ab59 by JoniDS

Merge remote-tracking branch 'upstream/master'

parents 15559b93 237f94e9
......@@ -43,7 +43,7 @@ class PhpDocController extends Controller
{
$except = [];
if ($root === null) {
$root = dirname(dirname(YII_PATH));
$root = dirname(YII_PATH);
$extensionPath = "$root/extensions";
foreach (scandir($extensionPath) as $extension) {
if (ctype_alpha($extension) && is_dir($extensionPath . '/' . $extension)) {
......
......@@ -32,7 +32,7 @@ class Markdown extends \yii\helpers\Markdown
* @param TypeDoc $context
* @return string
*/
public static function process($content, $context)
public static function process($content, $context = null)
{
$content = trim(parent::process($content, []));
if (!strncmp($content, '<p>', 3) && substr($content, -4, 4) == '</p>') {
......@@ -77,4 +77,4 @@ class Markdown extends \yii\helpers\Markdown
return $content;
}
}
\ No newline at end of file
}
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment