Skip to content

Commit 4abeb42

Browse files
committed
Merge pull request #1374 from FriendsOfSymfony/FIX
Fix a warning and typos
2 parents ab6d26e + ef53b4a commit 4abeb42

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Controller/TwigExceptionController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace FOS\RestBundle\Controller;
1313

1414
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
15-
use Symfony\Component\Debug\Exception\FlattenException;
1615
use Symfony\Component\HttpFoundation\Request;
1716

1817
/**
@@ -24,9 +23,9 @@ class TwigExceptionController extends TemplatingExceptionController
2423
/**
2524
* {@inheritdoc}
2625
*/
27-
protected function createView($format, FlattenException $exception, $code, $parameters, Request $request, $showException)
26+
protected function createView(\Exception $exception, $code, array $templateData, Request $request, $showException)
2827
{
29-
$view = parent::createView($format, $exception, $code, $parameters, $request, $showException);
28+
$view = parent::createView($exception, $code, $templateData, $request, $showException);
3029
$view->setTemplate($this->findTemplate($request, $format, $code, $showException));
3130

3231
return $view;

Resources/doc/2-the-view-layer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ A response example of an invalid form:
203203
If you don't like the default exception structure, you can provide your own
204204
normalizers.
205205

206-
You can look `FOSRestBundle normalizers`_ for examples.
206+
You can look at `FOSRestBundle normalizers`_ for examples.
207207

208208
.. _`FOSRestBundle normalizers`: https://github.com/FriendsOfSymfony/FOSRestBundle/tree/master/Serializer/Normalizer
209209

Resources/doc/format_listener.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Setting ``priorities`` to a non-empty array enables Accept header negotiations.
3535
- { path: '^/image', priorities: ['jpeg', 'gif'], fallback_format: false, prefer_extension: true }
3636
# setting fallback_format to null means that in case of a priority mismatch the next rule will be considered
3737
- { path: '^/admin', methods: [ 'GET', 'POST'], priorities: [ 'xml', 'html'], fallback_format: ~, prefer_extension: false }
38-
# you can target specifically the exception controller
38+
# you can specifically target the exception controller
3939
- { path: '^/api', priorities: [ 'xml', 'json'], fallback_format: xml, attributes: [ _controller: FOS\RestBundle\Controller\ExceptionController ], prefer_extension: false }
4040
# setting a priority to */* basically means any format will be matched
4141
- { path: '^/', priorities: [ 'text/html', '*/*'], fallback_format: html, prefer_extension: true }

0 commit comments

Comments
 (0)