diff --git a/components/filesystem.rst b/components/filesystem.rst index 46c88d73d7d..e1297f19d13 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -214,7 +214,7 @@ systems (unlike PHP's :phpfunction:`readlink` function):: Its behavior is the following:: - public function readlink($path, $canonicalize = false) + public function readlink($path, $canonicalize = false) { ... } * When ``$canonicalize`` is ``false``: * if ``$path`` does not exist or is not a link, it returns ``null``. diff --git a/components/serializer.rst b/components/serializer.rst index c26cd480134..5bcbcdf47e4 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -1122,6 +1122,7 @@ to ``true``:: $result = $normalizer->normalize($dummy, 'json', [AbstractObjectNormalizer::SKIP_NULL_VALUES => true]); // ['bar' => 'notNull'] + .. _component-serializer-handling-circular-references: Handling Circular References diff --git a/create_framework/http_kernel_controller_resolver.rst b/create_framework/http_kernel_controller_resolver.rst index 12d9efead6e..95d494856fe 100644 --- a/create_framework/http_kernel_controller_resolver.rst +++ b/create_framework/http_kernel_controller_resolver.rst @@ -103,29 +103,29 @@ The ``index()`` method needs the Request object as an argument. ``getArguments()`` knows when to inject it properly if it is type-hinted correctly:: - public function index(Request $request) + public function index(Request $request) { ... } // won't work - public function index($request) + public function index($request) { ... } More interesting, ``getArguments()`` is also able to inject any Request attribute; if the argument has the same name as the corresponding attribute:: - public function index($year) + public function index($year) { ... } You can also inject the Request and some attributes at the same time (as the matching is done on the argument name or a type hint, the arguments order does not matter):: - public function index(Request $request, $year) + public function index(Request $request, $year) { ... } - public function index($year, Request $request) + public function index($year, Request $request) { ... } Finally, you can also define default values for any argument that matches an optional attribute of the Request:: - public function index($year = 2012) + public function index($year = 2012) { ... } Let's inject the ``$year`` request attribute for our controller:: diff --git a/reference/forms/types/file.rst b/reference/forms/types/file.rst index 78ea0362ee2..5a81f422c67 100644 --- a/reference/forms/types/file.rst +++ b/reference/forms/types/file.rst @@ -37,7 +37,7 @@ be used to move the ``attachment`` file to a permanent location:: // ... if ($form->isSubmitted() && $form->isValid()) { - $someNewFilename = ... + $someNewFilename = ...; $file = $form['attachment']->getData(); $file->move($directory, $someNewFilename);