8000 minor #3899 [RFR] Misc. minor fixes mostly related to formatting issu… · symfony/symfony-docs@5e0e119 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e0e119

Browse files
committed
minor #3899 [RFR] Misc. minor fixes mostly related to formatting issues (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- [RFR] Misc. minor fixes mostly related to formatting issues | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | - Commits ------- 2442839 Reverted the changes in the numbered lists d38f00e Fixed a minor indenttation issue 03b83ba Splitted one tip directive into two smaller tips b223417 Replaced a sidebar with a tip directive e871a32 Fixed a very minor indentation issue 3b557a0 Fixed the formatting of several lists to avoid problems when rendering the documentation on the website 2deb5d7 Added some links to API methods 6625ff2 Fixed the indentation of a bulleted list 81fe666 Fixed more table headers formatting 314c131 Fixed the indentation of one code block 9a71577 Removed a tip inside a sidebar 4641c66 Fixed the formatting of one table headers 0554cae Fixed some minor formatting issues related to lists dee3180 Fixed the formating of one table (it now uses proper headers) 00b3d26 Added the suggestions made by the great @wouterj 79bf0a1 Misc. minor fixes mostly related to formatting issues
2 parents 23b51c8 + 2442839 commit 5e0e119

File tree

14 files changed

+163
-158
lines changed

14 files changed

+163
-158
lines changed

book/doctrine.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,12 @@ doesn't replace your existing methods).
413413

414414
With the ``doctrine:generate:entities`` command you can:
415415

416-
* generate getters and setters;
416+
* generate getters and setters;
417417

418-
* generate repository classes configured with the
419-
``@ORM\Entity(repositoryClass="...")`` annotation;
418+
* generate repository classes configured with the
419+
``@ORM\Entity(repositoryClass="...")`` annotation;
420420

421-
* generate the appropriate constructor for 1:n and n:m relations.
421+
* generate the appropriate constructor for 1:n and n:m relations.
422422

423423
The ``doctrine:generate:entities`` command saves a backup of the original
424424
``Product.php`` named ``Product.php~``. In some cases, the presence of

book/http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ Cache Invalidation
10341034
------------------
10351035

10361036
"There are only two hard things in Computer Science: cache invalidation
1037-
and naming things." --Phil Karlton
1037+
and naming things." -- Phil Karlton
10381038

10391039
You should never need to invalidate cached data because invalidation is already
10401040
taken into account natively in the HTTP cache models. If you use validation,

book/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,8 @@ if ``ip``, ``host`` or ``method`` are not specified for an entry, that ``access_
852852
will match any ``ip``, ``host`` or ``method``:
853853

854854
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
855-
| **URI** | **IP** | **HOST** | **METHOD** | ``access_control`` | Why? |
856-
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
855+
| URI | IP | HOST | METHOD | ``access_control`` | Why? |
856+
+=================+=============+=============+============+================================+=============================================================+
857857
| ``/admin/user`` | 127.0.0.1 | example.com | GET | rule #1 (``ROLE_USER_IP``) | The URI matches ``path`` and the IP matches ``ip``. |
858858
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
859859
| ``/admin/user`` | 127.0.0.1 | symfony.com | GET | rule #1 (``ROLE_USER_IP``) | The ``path`` and ``ip`` still match. This would also match |

book/templating.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,17 @@ to web designers and, in several ways, more powerful than PHP templates:
7575
</body>
7676
</html>
7777

78-
Twig defines two types of special syntax:
78+
Twig defines three types of special syntax:
7979

8080
* ``{{ ... }}``: "Says something": prints a variable or the result of an
8181
expression to the template;
8282

8383
* ``{% ... %}``: "Does something": a **tag** that controls the logic of the
8484
template; it is used to execute statements such as for-loops for example.
8585

86-
.. note::
87-
88-
There is a third syntax used for creating comments: ``{# this is a comment #}``.
89-
This syntax can be used across multiple lines like the PHP-equivalent
90-
``/* comment */`` syntax.
86+
* ``{# ... #}``: "Comment something": it's the equivalent of the PHP
87+
``/* comment */`` syntax. It's used to add single or multi-line comments.
88+
The content of the comments isn't included in the rendered pages.
9189

9290
Twig also contains **filters**, which modify content before being rendered.
9391
The following makes the ``title`` variable all uppercase before rendering
@@ -399,14 +397,14 @@ lives in a specific location:
399397
template for a specific page. The three parts of the string, each separated
400398
by a colon (``:``), mean the following:
401399

402-
* ``AcmeBlogBundle``: (*bundle*) the template lives inside the
403-
``AcmeBlogBundle`` (e.g. ``src/Acme/BlogBundle``);
400+
* ``AcmeBlogBundle``: (*bundle*) the template lives inside the
401+
``AcmeBlogBundle`` (e.g. ``src/Acme/BlogBundle``);
404402

405-
* ``Blog``: (*controller*) indicates that the template lives inside the
406-
``Blog`` subdirectory of ``Resources/views``;
403+
* ``Blog``: (*controller*) indicates that the template lives inside the
404+
``Blog`` subdirectory of ``Resources/views``;
407405

408-
* ``index.html.twig``: (*template*) the actual name of the file is
409-
``index.html.twig``.
406+
* ``index.html.twig``: (*template*) the actual name of the file is
407+
``index.html.twig``.
410408

411409
Assuming that the ``AcmeBlogBundle`` lives at ``src/Acme/BlogBundle``, the
412410
final path to the layout would be ``src/Acme/BlogBundle/Resources/views/Blog/index.html.twig``.

components/http_foundation/session_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ activate these in the same way as it does for custom handlers.
3737

3838
Symfony2 provides drivers for the following native save handler as an example:
3939

40-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler`
40+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler`
4141

4242
Example usage::
4343

components/http_kernel/introduction.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,22 @@ will be called after another event - ``kernel.controller`` - is dispatched.
242242
This string is then transformed into a PHP callable by doing the following:
243243

244244
a) The ``AcmeDemoBundle:Default:index`` format of the ``_controller`` key
245-
is changed to another string that contains the full class and method
246-
name of the controller by following the convention used in Symfony2 - e.g.
247-
``Acme\DemoBundle\Controller\DefaultController::indexAction``. This transformation
248-
is specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
249-
sub-class used by the Symfony2 Framework.
245+
is changed to another string that contains the full class and method
246+
name of the controller by following the convention used in Symfony2 - e.g.
247+
``Acme\DemoBundle\Controller\DefaultController::indexAction``. This transformation
248+
is specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
249+
sub-class used by the Symfony2 Framework.
250250

251251
b) A new instance of your controller class is instantiated with no
252-
constructor arguments.
252+
constructor arguments.
253253

254254
c) If the controller implements :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`,
255-
``setContainer`` is called on the controller object and the container
256-
is passed to it. This step is also specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
257-
sub-class used by the Symfony2 Framework.
255+
``setContainer`` is called on the controller object and the container
256+
is passed to it. This step is also specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
257+
sub-class used by the Symfony2 Framework.
258258

259-
There are also a few other variations on the above process (e.g. if
260-
you're registering your controllers as services).
259+
There are also a few other variations on the above process (e.g. if
260+
you're registering your controllers as services).
261261

262262
.. _component-http-kernel-kernel-controller:
263263< F42D div class="diff-text-inner">
@@ -325,14 +325,14 @@ of arguments that should be passed when executing that callable.
325325
to determine which value should be passed for each argument:
326326

327327
a) If the ``Request`` attributes bag contains a key that matches the name
328-
of the argument, that value is used. For example, if the first argument
329-
to a controller is ``$slug``, and there is a ``slug`` key in the ``Request``
330-
``attributes`` bag, that value is used (and typically this value came
331-
from the ``RouterListener``).
328+
of the argument, that value is used. For example, if the first argument
329+
to a controller is ``$slug``, and there is a ``slug`` key in the ``Request``
330+
``attributes`` bag, that value is used (and typically this value came
331+
from the ``RouterListener``).
332332

333333
b) If the argument in the controller is type-hinted with Symfony's
334-
:class:`Symfony\\Component\\HttpFoundation\\Request` object, then the
335-
``Request`` is passed in as the value.
334+
:class:`Symfony\\Component\\HttpFoundation\\Request` object, then the
335+
``Request`` is passed in as the value.
336336

337337
.. _component-http-kernel-calling-controller:
338338

@@ -528,20 +528,20 @@ below for more details).
528528
The listener has several goals:
529529

530530
1) The thrown exception is converted into a
531-
:class:`Symfony\\Component\\HttpKernel\\Exception\\FlattenException`
532-
object, which contains all the information about the request, but which
533-
can be printed and serialized.
531+
:class:`Symfony\\Component\\HttpKernel\\Exception\\FlattenException`
532+
object, which contains all the information about the request, but which
533+
can be printed and serialized.
534534

535535
2) If the original exception implements
536-
:class:`Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface`,
537-
then ``getStatusCode`` and ``getHeaders`` are called on the exception
538-
and used to populate the headers and status code of the ``FlattenException``
539-
object. The idea is that these are used in the next step when creating
540-
the final response.
536+
:class:`Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface`,
537+
then ``getStatusCode`` and ``getHeaders`` are called on the exception
538+
and used to populate the headers and status code of the ``FlattenException``
539+
object. The idea is that these are used in the next step when creating
540+
the final response.
541541

542542
3) A controller is executed and passed the flattened exception. The exact
543-
controller to render is passed as a constructor argument to this listener.
544-
This controller will return the final ``Response`` for this error page.
543+
controller to render is passed as a constructor argument to this listener.
544+
This controller will return the final ``Response`` for this error page.
545545

546546
**ExceptionListener in Security**
547547

@@ -570,8 +570,8 @@ each event has their own event object:
570570
.. _component-http-kernel-event-table:
571571

572572
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
573-
| **Name** | ``KernelEvents`` **Constant** | **Argument passed to the listener** |
574-
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
573+
| Name | ``KernelEvents`` Constant | Argument passed to the listener |
574+
+===================+===============================+=====================================================================================+
575575
| kernel.request | ``KernelEvents::REQUEST`` | :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent` |
576576
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
577577
| kernel.controller | ``KernelEvents::CONTROLLER`` | :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent` |

components/routing/hostname_pattern.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,11 @@ instance, if you want to match both ``m.example.com`` and
176176
177177
return $collection;
178178
179-
.. sidebar:: Using Service Parameters
179+
.. tip::
180180

181181
You can also use service parameters if you do not want to hardcode the
182182
hostname:
183183

184-
.. tip::
185-
186-
Make sure you also include a default option for the ``domain`` placeholder,
187-
otherwise you need to include a domain value each time you generate
188-
a URL using the route.
189-
190184
.. configuration-block::
191185

192186
.. code-block:: yaml
@@ -242,6 +236,12 @@ instance, if you want to match both ``m.example.com`` and
242236
243237
return $collection;
244238
239+
.. tip::
240+
241+
Make sure you also include a default option for the ``domain`` placeholder,
242+
otherwise you need to include a domain value each time you generate
243+
a URL using the route.
244+
245245
.. _component-routing-host-imported:
246246

247247
Using Host Matching of Imported Routes
@@ -289,12 +289,12 @@ Testing your Controllers
289289
You need to set the Host HTTP header on your request objects if you want to get
290290
past url matching in your functional tests.
291291

292-
.. code-block:: php
292+
.. code-block:: php
293293
294-
$crawler = $client->request(
295-
'GET',
296-
'/homepage',
297-
array(),
298-
array(),
299-
array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
300-
);
294+
$crawler = $client->request(
295+
'GET',
296+
'/homepage',
297+
array(),
298+
array(),
299+
array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
300+
);

contributing/code/patches.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -310,23 +310,23 @@ translation files, use the shorter version of the check-list:
310310
311311
Some answers to the questions trigger some more requirements:
312312

313-
* If you answer yes to "Bug fix?", check if the bug is already listed in the
314-
Symfony issues and reference it/them in "Fixed tickets";
313+
* If you answer yes to "Bug fix?", check if the bug is already listed in the
314+
Symfony issues and reference it/them in "Fixed tickets";
315315

316-
* If you answer yes to "New feature?", you must submit a pull request to the
317-
documentation and reference it under the "Doc PR" section;
316+
* If you answer yes to "New feature?", you must submit a pull request to the
317+
documentation and reference it under the "Doc PR" section;
318318

319-
* If you answer yes to "BC breaks?", the patch must contain updates to the
320-
relevant ``CHANGELOG`` and ``UPGRADE`` files;
319+
* If you answer yes to "BC breaks?", the patch must contain updates to the
320+
relevant ``CHANGELOG`` and ``UPGRADE`` files;
321321

322-
* If you answer yes to "Deprecations?", the patch must contain updates to the
323-
relevant ``CHANGELOG`` and ``UPGRADE`` files;
322+
* If you answer yes to "Deprecations?", the patch must contain updates to the
323+
relevant ``CHANGELOG`` and ``UPGRADE`` files;
324324

325-
* If you answer no to "Tests pass", you must add an item to a todo-list with
326-
the actions that must be done to fix the tests;
325+
* If you answer no to "Tests pass", you must add an item to a todo-list with
326+
the actions that must be done to fix the tests;
327327

328-
* If the "license" is not MIT, just don't submit the pull request as it won't
329-
be accepted anyway.
328+
* If the "license" is not MIT, just don't submit the pull request as it won't
329+
be accepted anyway.
330330

331331
If some of the previous requirements are not met, create a todo-list and add
332332
relevant items:

cookbook/configuration/environments.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ The new environment is now accessible via::
287287

288288
.. note::
289289

290-
Some environments, like the ``dev`` environment, are never meant to be
291-
accessed on any deployed server by the general public. This is because
292-
certain environments, for debugging purposes, may give too much information
293-
about the application or underlying infrastructure. To be sure these environments
294-
aren't accessible, the front controller is usually protected from external
295-
IP addresses via the following code at the top of the controller:
290+
Some environments, like the ``dev`` environment, are never meant to be
291+
accessed on any deployed server by the general public. This is because
292+
certain environments, for debugging purposes, may give too much information
293+
about the application or underlying infrastructure. To be sure these environments
294+
aren't accessible, the front controller is usually protected from external
295+
IP addresses via the following code at the top of the controller:
296296

297297
.. code-block:: php
298298
@@ -315,8 +315,12 @@ However, each environment caches its own set of files:
315315

316316
.. code-block:: text
317317
318-
app/cache/dev - cache directory for the *dev* environment
319-
app/cache/prod - cache directory for the *prod* environment
318+
<your-project>/
319+
├─ app/
320+
│ ├─ cache/
321+
│ │ ├─ dev/ # cache directory for the *dev* environment
322+
│ │ └─ prod/ # cache directory for the *prod* environment
323+
│ ├─ ...
320324
321325
Sometimes, when debugging, it may be helpful to inspect a cached file to
322326
understand how something is working. When doing so, remember to look in

cookbook/configuration/web_server_configuration.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ following configuration snippet:
5555
In Apache 2.4, ``Order allow,deny`` has been replaced by ``Require all granted``,
5656
and hence you need to modify your ``Directory`` permission settings as follows:
5757

58-
.. code-block:: apache
58+
.. code-block:: apache
5959
60-
<Directory /var/www/project/web>
61-
# enable the .htaccess rewrites
62-
AllowOverride All
63-
Require all granted
64-
</Directory>
60+
<Directory /var/www/project/web>
61+
# enable the .htaccess rewrites
62+
AllowOverride All
63+
Require all granted
64+
</Directory>
6565
6666
Nginx
6767
-----

0 commit comments

Comments
 (0)
0