Skip to content

Commit a32eb51

Browse files
committed
be keen to newcomers
1 parent e9c58ec commit a32eb51

File tree

9 files changed

+20
-24
lines changed

9 files changed

+20
-24
lines changed

create_framework/dependency_injection.rst

Lines changed: 3 additions & 3 deletions
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 (an 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).

create_framework/event_dispatcher.rst

Lines changed: 1 addition & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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 easily achieved by
65-
routing all client requests to a single PHP script.
64+
dispatching to our code for better flexibility. This can be achieved byrouting
65+
all client requests to a single PHP script.
6666

6767
.. tip::
6868

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 3 additions & 4 deletions
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,9 +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? Just subscribe to
119-
``StreamedResponseListener``::
117+
If you want out of the box support for streamed responses, subscribe
118+
to ``StreamedResponseListener``::
120119

121120
$dispatcher->addSubscriber(new HttpKernel\EventListener\StreamedResponseListener());
122121

create_framework/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +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? Insanely easy::
192+
impact. You can use the generator this way::
193193

194194
use Symfony\Component\Routing;
195195

create_framework/unit_testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Executing this test is as simple as running ``phpunit`` from the
136136
After the test ran, you should see a green bar. If not, you have a bug
137137
either in the test or in the framework code!
138138

139-
Adding a unit test for any exception thrown in a controller is just as easy::
139+
Adding a unit test for any exception thrown in a controller::
140140

141141
public function testErrorHandling()
142142
{

http_cache.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ but is a great way to start.
7777

7878
For details on setting up Varnish, see :doc:`/http_cache/varnish`.
7979

80-
Enabling the proxy is easy: each application comes with a caching kernel (``AppCache``)
81-
that wraps the default one (``AppKernel``). The caching Kernel *is* the reverse
82-
proxy.
80+
Each application comes with a caching kernel (``AppCache``)that wraps the
81+
default one (``AppKernel``). The caching Kernel *is* the reverse proxy.
8382

8483
To enable caching, modify the code of your front controller. You can also make these
8584
changes to ``app_dev.php`` to add caching to the ``dev`` environment::
@@ -267,7 +266,7 @@ Validation Caching
267266
single: Cache; Cache-Control header
268267
single: HTTP headers; Cache-Control
269268

270-
With expiration caching, you simply say "cache for 3600 seconds!". But, when someone
269+
With expiration caching, you say "cache for 3600 seconds!". But, when someone
271270
updates cached content, you won't see that content on your site until the cache
272271
expires.
273272

security.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ this would deny you access. More on that later (:ref:`security-authorization-acc
452452
Loading Users from the Database
453453
...............................
454454

455-
If you'd like to load your users via the Doctrine ORM, that's easy! See
455+
If you'd like to load your users via the Doctrine ORM, see
456456
:doc:`/security/entity_provider` for all the details.
457457

458458
.. _security-encoding-user-password:
@@ -685,8 +685,7 @@ Add Code to Deny Access
685685
There are **two** ways to deny access to something:
686686

687687
#. :ref:`access_control in security.yml <security-authorization-access-control>`
688-
allows you to protect URL patterns (e.g. ``/admin/*``). This is easy,
689-
but less flexible;
688+
allows you to protect URL patterns (e.g. ``/admin/*``). Simpler, but less flexible;
690689

691690
#. :ref:`in your code via the security.authorization_checker service <security-securing-controller>`.
692691

@@ -808,8 +807,8 @@ matches the URL.
808807
]);
809808
810809
Prepending the path with ``^`` means that only URLs *beginning* with the
811-
pattern are matched. For example, a path of simply ``/admin`` (without
812-
the ``^``) would match ``/admin/foo`` but would also match URLs like ``/foo/admin``.
810+
pattern are matched. For example, a path of ``/admin`` (without the ``^``)
811+
would match ``/admin/foo`` but would also match URLs like ``/foo/admin``.
813812

814813
.. _security-access-control-explanation:
815814

@@ -828,7 +827,7 @@ the ``^``) would match ``/admin/foo`` but would also match URLs like ``/foo/admi
828827
Securing Controllers and other Code
829828
...................................
830829

831-
You can easily deny access from inside a controller::
830+
You can deny access from inside a controller::
832831

833832
// ...
834833

session/php_bridge.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ for the ``handler_id``:
4545
],
4646
]);
4747
48-
Otherwise, if the problem is simply that you cannot avoid the application
48+
Otherwise, if the problem is that you cannot avoid the application
4949
starting the session with ``session_start()``, you can still make use of
5050
a Symfony based session save handler by specifying the save handler as in
5151
the example below:

0 commit comments

Comments
 (0)