Skip to content

Commit b7ab858

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Bootstraped the documentation of Workflow options Some docs fixes Documented the missing validation.static_method option Documented the missing session.use_cookies config option be keen to newcomers removed php open tag
2 parents ce574b3 + facbe1a commit b7ab858

27 files changed

+203
-46
lines changed

bundles/best_practices.rst

-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ following standardized instructions in your ``README.md`` file.
309309
in the `app/AppKernel.php` file of your project:
310310
311311
```php
312-
<?php
313312
// app/AppKernel.php
314313
315314
// ...

components/debug.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Usage
2222
-----
2323

2424
The Debug component provides several tools to help you debug PHP code.
25-
Enabling them all can be done by calling the static method ``Debug::enable()``::
25+
Enable all of them by calling this method::
2626

2727
use Symfony\Component\Debug\Debug;
2828

@@ -83,7 +83,7 @@ throw more helpful exceptions when a class isn't found by the registered
8383
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced
8484
with a ``DebugClassLoader`` wrapper.
8585

86-
To activate the ``DebugClassLoader``, call its static
86+
Using the ``DebugClassLoader`` is done by calling its static
8787
:method:`Symfony\\Component\\Debug\\DebugClassLoader::enable` method::
8888

8989
use Symfony\Component\Debug\DebugClassLoader;

components/http_kernel.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ to the login page or a 403 Access Denied response.
174174
If a ``Response`` is returned at this stage, the process skips directly to
175175
the :ref:`kernel.response <component-http-kernel-kernel-response>` event.
176176

177-
Other listeners simply initialize things or add more information to the request.
177+
Other listeners initialize things or add more information to the request.
178178
For example, a listener might determine and set the locale on the ``Request``
179179
object.
180180

components/stopwatch.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Alternatively, you can clone the `<https://github.com/symfony/stopwatch>`_ repos
2121
Usage
2222
-----
2323

24-
The Stopwatch component provides an easy and consistent way to measure execution
24+
The Stopwatch component provides a consistent way to measure execution
2525
time of certain parts of code so that you don't constantly have to parse
2626
microtime by yourself. Instead, use the
2727
:class:`Symfony\\Component\\Stopwatch\\Stopwatch` class::

console/commands_as_services.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Or set the ``command`` attribute on the ``console.command`` tag in your service
113113
114114
// config/services.php
115115
use App\Command\SunshineCommand;
116-
//...
116+
// ...
117117
118118
$container
119119
->register(SunshineCommand::class)

console/input.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Using Command Options
119119
Unlike arguments, options are not ordered (meaning you can specify them in any
120120
order) and are specified with two dashes (e.g. ``--yell``). Options are
121121
*always* optional, and can be setup to accept a value (e.g. ``--dir=src``) or
122-
simply as a boolean flag without a value (e.g. ``--yell``).
122+
as a boolean flag without a value (e.g. ``--yell``).
123123

124124
For example, add a new option to the command that can be used to specify
125125
how many times in a row the message should be printed::

console/request_context.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ will override the defaults.
6868
Configuring the Request Context per Command
6969
-------------------------------------------
7070

71-
To change it only in one command you can fetch the Request Context from the
72-
router service and override its settings::
71+
To change it only in one command you need to fetch the Request Context
72+
from the ``router`` service and override its settings::
7373

7474
// src/Command/DemoCommand.php
7575
use Symfony\Component\Routing\RouterInterface;

contributing/code/standards.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ Symfony Coding Standards in Detail
2929
If you want to learn about the Symfony coding standards in detail, here's a
3030
short example containing most features described below:
3131

32-
.. code-block:: html+php
33-
34-
<?php
32+
.. code-block:: php
3533
3634
/*
3735
* This file is part of the Symfony package.

create_framework/dependency_injection.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ framework more configurable, but at the same time, it introduces a lot of
6666
issues:
6767

6868
* We are not able to register custom listeners anymore as the dispatcher is
69-
not available outside the Framework class (an easy workaround could be the
69+
not available outside the Framework class (a workaround could be the
7070
adding of a ``Framework::getEventDispatcher()`` method);
7171

7272
* We have lost the flexibility we had before; you cannot change the
7373
implementation of the ``UrlMatcher`` or of the ``ControllerResolver``
7474
anymore;
7575

76-
* Related to the previous point, we cannot test our framework easily anymore
77-
as it's impossible to mock internal objects;
76+
* Related to the previous point, we cannot test our framework without much
77+
effort anymore as it's impossible to mock internal objects;
7878

7979
* We cannot change the charset passed to ``ResponseListener`` anymore (a
8080
workaround could be to pass it as a constructor argument).
@@ -234,7 +234,7 @@ And the related change in the front controller::
234234

235235
$container->setParameter('routes', include __DIR__.'/../src/app.php');
236236

237-
We have obviously barely scratched the surface of what you can do with the
237+
We have barely scratched the surface of what you can do with the
238238
container: from class names as parameters, to overriding existing object
239239
definitions, from shared service support to dumping a container to a plain PHP class,
240240
and much more. The Symfony dependency injection container is really powerful

create_framework/event_dispatcher.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ The EventDispatcher Component
33

44
Our framework is still missing a major characteristic of any good framework:
55
*extensibility*. Being extensible means that the developer should be able to
6-
easily hook into the framework life cycle to modify the way the request is
7-
handled.
6+
hook into the framework life cycle to modify the way the request is handled.
87

98
What kind of hooks are we talking about? Authentication or caching for
109
instance. To be flexible, hooks must be plug-and-play; the ones you "register"

create_framework/front_controller.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ which name is exposed to the end user via the URL
6161
(``http://127.0.0.1:4321/bye.php``): there is a direct mapping between the PHP
6262
script name and the client URL. This is because the dispatching of the request
6363
is done by the web server directly. It might be a good idea to move this
64-
dispatching to our code for better flexibility. This can be achieved by
65-
routing all client requests to a single PHP script.
64+
dispatching to our code for better flexibility. This can be achieved by routing
65+
all client requests to a single PHP script.
6666

6767
.. tip::
6868

create_framework/http_kernel_httpkernel_class.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The HttpKernel Component: The HttpKernel Class
44
If you were to use our framework right now, you would probably have to add
55
support for custom error messages. We do have 404 and 500 error support but
66
the responses are hardcoded in the framework itself. Making them customizable
7-
is easy enough though: dispatch a new event and listen to it. Doing it right
7+
is straightforward though: dispatch a new event and listen to it. Doing it right
88
means that the listener has to call a regular controller. But what if the
99
error controller throws an exception? You will end up in an infinite loop.
1010
There should be an easier way, right?
@@ -114,8 +114,8 @@ client; that's what the ``ResponseListener`` does::
114114

115115
$dispatcher->addSubscriber(new HttpKernel\EventListener\ResponseListener('UTF-8'));
116116

117-
This one was easy too! Let's take another one: do you want out of the box
118-
support for streamed responses? Subscribe to ``StreamedResponseListener``::
117+
If you want out of the box support for streamed responses, subscribe
118+
to ``StreamedResponseListener``::
119119

120120
$dispatcher->addSubscriber(new HttpKernel\EventListener\StreamedResponseListener());
121121

create_framework/http_kernel_httpkernelinterface.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Update your framework so that it implements this interface::
4646
}
4747
}
4848

49-
Even if this change looks trivial, it brings us a lot! Let's talk about one of
49+
Even if this change looks not too complex, it brings us a lot! Let's talk about one of
5050
the most impressive one: transparent :doc:`HTTP caching </http_cache>` support.
5151

5252
The ``HttpCache`` class implements a fully-featured reverse proxy, written in

create_framework/routing.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ more flexible than the previous one. Enjoy!
189189
Using the Routing component has one big additional benefit: the ability to
190190
generate URLs based on Route definitions. When using both URL matching and URL
191191
generation in your code, changing the URL patterns should have no other
192-
impact. Want to know how to use the generator? Calling the ``generate`` method
193-
is all it takes::
192+
impact. You can use the generator this way::
194193

195194
use Symfony\Component\Routing;
196195

create_framework/separation_of_concerns.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ a well defined goal:
171171
our application;
172172

173173
* ``src/Simplex``: The reusable framework code that abstracts the handling of
174-
incoming Requests (by the way, it makes your controllers/templates easily
174+
incoming Requests (by the way, it makes your controllers/templates better
175175
testable -- more about that later on);
176176

177177
* ``src/Calendar``: Our application specific code (the controllers and the

create_framework/unit_testing.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ Execute this test by running ``phpunit`` in the ``example.com`` directory:
135135
After the test ran, you should see a green bar. If not, you have a bug
136136
either in the test or in the framework code!
137137

138-
Adding a unit test for any exception thrown in a controller means expecting a
139-
response code of 500::
138+
Adding a unit test for any exception thrown in a controller::
140139

141140
public function testErrorHandling()
142141
{

http_cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Validation Caching
282282
single: Cache; Cache-Control header
283283
single: HTTP headers; Cache-Control
284284

285-
With expiration caching, you simply say "cache for 3600 seconds!". But, when someone
285+
With expiration caching, you say "cache for 3600 seconds!". But, when someone
286286
updates cached content, you won't see that content on your site until the cache
287287
expires.
288288

page_creation.rst

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Suppose you want to create a page - ``/lucky/number`` - that generates a lucky (
4444
random) number and prints it. To do that, create a "Controller class" and a
4545
"controller" method inside of it::
4646

47-
<?php
4847
// src/Controller/LuckyController.php
4948
namespace App\Controller;
5049

0 commit comments

Comments
 (0)