for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Anton Tuyakhov <[email protected]>
*/
namespace tuyakhov\jsonapi;
use yii\filters\ContentNegotiator;
use yii\helpers\ArrayHelper;
use yii\web\Response;
class Controller extends \yii\rest\Controller
{
public $serializer = 'tuyakhov\jsonapi\Serializer';
* @inheritdoc
public function behaviors()
return ArrayHelper::merge(parent::behaviors(), [
'contentNegotiator' => [
'class' => ContentNegotiator::className(),
yii\base\BaseObject::className()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
'class' => /** @scrutinizer ignore-deprecated */ ContentNegotiator::className(),
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
'formats' => [
'application/vnd.api+json' => Response::FORMAT_JSON,
],
]
]);
}
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.