Browse Source

Fixes #14298: The default response formatter configs defined by `yii\web\Response::defaultFormatters()` now use the array syntax

tags/2.0.13
Brandon Kelly 7 years ago committed by Alexander Makarov
parent
commit
6f03e8b692
  1. 1
      framework/CHANGELOG.md
  2. 12
      framework/web/Response.php

1
framework/CHANGELOG.md

@ -15,6 +15,7 @@ Yii Framework 2 Change Log
- Bug #14192: Fixed wrong default null value for TIMESTAMP when using PostgreSQL (Tigrov)
- Enh #14081: Added `yii\caching\CacheInterface` to make custom cache extensions adoption easier (silverfire)
- Chg #14286: Used primary inputmask package name instead of an alias (samdark)
- Enh #14298: The default response formatter configs defined by `yii\web\Response::defaultFormatters()` now use the array syntax (brandonkelly)
2.0.12 June 05, 2017
--------------------

12
framework/web/Response.php

@ -998,9 +998,15 @@ class Response extends \yii\base\Response
protected function defaultFormatters()
{
return [
self::FORMAT_HTML => 'yii\web\HtmlResponseFormatter',
self::FORMAT_XML => 'yii\web\XmlResponseFormatter',
self::FORMAT_JSON => 'yii\web\JsonResponseFormatter',
self::FORMAT_HTML => [
'class' => 'yii\web\HtmlResponseFormatter',
],
self::FORMAT_XML => [
'class' => 'yii\web\XmlResponseFormatter',
],
self::FORMAT_JSON => [
'class' => 'yii\web\JsonResponseFormatter',
],
self::FORMAT_JSONP => [
'class' => 'yii\web\JsonResponseFormatter',
'useJsonp' => true,

Loading…
Cancel
Save