Skip to content

Commit ae45622

Browse files
Ca-Joujaviereguiluz
Ca-Jou
authored andcommitted
spotted minor EN mistakes and coherence issues between the different …
1 parent 2439869 commit ae45622

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

create_framework/dependency_injection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Now, here is how you can register a custom listener in the front controller::
205205
->addMethodCall('addSubscriber', [new Reference('listener.string_response')])
206206
;
207207

208-
Beside describing your objects, the dependency injection container can also be
208+
Besides describing your objects, the dependency injection container can also be
209209
configured via parameters. Let's create one that defines if we are in debug
210210
mode or not::
211211

create_framework/event_dispatcher.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ version of this pattern:
2323
How does it work? The *dispatcher*, the central object of the event dispatcher
2424
system, notifies *listeners* of an *event* dispatched to it. Put another way:
2525
your code dispatches an event to the dispatcher, the dispatcher notifies all
26-
registered listeners for the event, and each listener do whatever it wants
26+
registered listeners for the event, and each listener does whatever it wants
2727
with the event.
2828

2929
As an example, let's create a listener that transparently adds the Google

create_framework/front_controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ its sub-directories (only if needed -- see above tip).
132132
like ``$request = Request::create('/hello?name=Fabien');`` where the
133133
argument is the URL path you want to simulate.
134134

135-
Now that the web server always access the same script (``front.php``) for all
135+
Now that the web server always accesses the same script (``front.php``) for all
136136
pages, we can secure the code further by moving all other PHP files outside the
137137
web root directory:
138138

create_framework/http_foundation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ cases by yourself. Why not using a technology that already works?
273273
a look at the ``Symfony\Component\HttpFoundation`` API or read
274274
its dedicated :doc:`documentation </components/http_foundation>`.
275275

276-
Believe or not but we have our first framework. You can stop now if you want.
276+
Believe it or not but we have our first framework. You can stop now if you want.
277277
Using just the Symfony HttpFoundation component already allows you to write
278278
better and more testable code. It also allows you to write code faster as many
279279
day-to-day problems have already been solved for you.
@@ -282,7 +282,7 @@ As a matter of fact, projects like Drupal have adopted the HttpFoundation
282282
component; if it works for them, it will probably work for you. Don't reinvent
283283
the wheel.
284284

285-
I've almost forgot to talk about one added benefit: using the HttpFoundation
285+
I've almost forgotten to talk about one added benefit: using the HttpFoundation
286286
component is the start of better interoperability between all frameworks and
287287
`applications using it`_ (like `Symfony`_, `Drupal 8`_, `phpBB 3`_, `Laravel`_
288288
and `ezPublish 5`_, and `more`_).

create_framework/http_kernel_controller_resolver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The move is pretty straightforward and makes a lot of sense as soon as you
3131
create more pages but you might have noticed a non-desirable side effect...
3232
The ``LeapYearController`` class is *always* instantiated, even if the
3333
requested URL does not match the ``leap_year`` route. This is bad for one main
34-
reason: performance wise, all controllers for all routes must now be
34+
reason: performance-wise, all controllers for all routes must now be
3535
instantiated for every request. It would be better if controllers were
3636
lazy-loaded so that only the controller associated with the matched route is
3737
instantiated.

create_framework/http_kernel_httpkernelinterface.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Update your framework so that it implements this interface::
4646
}
4747
}
4848

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

5252
The ``HttpCache`` class implements a fully-featured reverse proxy, written in
5353
PHP; it implements ``HttpKernelInterface`` and wraps another
@@ -64,7 +64,8 @@ PHP; it implements ``HttpKernelInterface`` and wraps another
6464
new HttpKernel\HttpCache\Store(__DIR__.'/../cache')
6565
);
6666

67-
$framework->handle($request)->send();
67+
$response = $framework->handle($request);
68+
$response->send();
6869

6970
That's all it takes to add HTTP caching support to our framework. Isn't it
7071
amazing?

0 commit comments

Comments
 (0)