Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac3b26b

Browse filesBrowse files
committed
Use Vale on 'quick tour', 'create framework' and getting started sections
1 parent 895d2e7 commit ac3b26b
Copy full SHA for ac3b26b

16 files changed

+72
-36
lines changed

‎.vale.ini

Copy file name to clipboardExpand all lines: .vale.ini
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Packages = Microsoft, write-good
44
Vocab = Symfony
55

66
[*]
7-
BasedOnStyles = Vale, Microsoft, write-good
8-
BlockIgnores = (?s) *(\.\. configuration-block::)
7+
BasedOnStyles = Vale, Microsoft, write-good, Symfony
8+
BlockIgnores = (?s) *(\.\. (configuration-block|code-block)::[^\n]+(\n\s[^\n]+)+)
99
TokenIgnores = (:ref:`.*`)
10+
11+
Microsoft.Headings = NO
12+
Microsoft.Foreign = NO
13+
Microsoft.Quotes = NO
14+
Microsoft.Contractions = NO

‎.vale/Symfony/Headings.yml

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends: capitalization
2+
message: "'%s' should be in title case"
3+
level: warning
4+
scope: heading
5+
match: $title
6+
style: Chicago
+31-6Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
11
Symfony
2-
namespace
3-
autowiring
4-
autowired
5-
boolean
6-
stderr
7-
config
2+
Ctype
3+
iconv
4+
Tokenizer
5+
Monolog
6+
nginx
7+
Laravel
8+
ezPublish
9+
PHPUnit
10+
Xdebug
11+
webpack
12+
(?i)autocompletes
13+
(?i)autoload(ing|ed)
14+
(?i)autoloader
15+
(?i)autowir(ing|ed)
16+
(?i)autowire
17+
(?i)auto-(installing|escaping)
18+
(?i)boolean
19+
(?i)charset
20+
(?i)config
21+
(?i)env
22+
(?i)hardcode(d|s)
23+
(?i)hasser
24+
(?i)inlined
25+
(?i)isser
26+
(?i)namespace
27+
(?i)profiler
28+
(?i)reusability
29+
(?i)stderr
30+
(?i)uncomment
31+
(?i)unvalidated
32+
(?i)validator

‎configuration.rst

Copy file name to clipboardExpand all lines: configuration.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,9 @@ override environment variables defined in ``.env`` files.
895895
Configuring Environment Variables in Production
896896
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
897897

898-
In production, the ``.env`` files are also parsed and loaded on each request. So
899-
the easiest way to define env vars is by creating a ``.env.local`` file on your
900-
production server(s) with your production values.
898+
In production, the ``.env`` files are also parsed and loaded on each request.
899+
The easiest way to define env vars is by creating a ``.env.local`` file on your
900+
production servers with your production values.
901901

902902
To improve performance, you can optionally run the ``dump-env`` Composer command:
903903

‎controller.rst

Copy file name to clipboardExpand all lines: controller.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Generating URLs
104104
~~~~~~~~~~~~~~~
105105

106106
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::generateUrl`
107-
method is just a helper method that generates the URL for a given route::
107+
method is just a helper method that generates the URL of a given route::
108108

109109
$url = $this->generateUrl('app_lucky_number', ['max' => 10]);
110110

@@ -458,7 +458,7 @@ In Symfony, a controller is required to return a ``Response`` object::
458458
$response->headers->set('Content-Type', 'text/css');
459459

460460
To facilitate this, different response objects are included to address different
461-
response types. Some of these are mentioned below. To learn more about the
461+
response types. Some of these are mentioned below. To learn more about the
462462
``Request`` and ``Response`` (and different ``Response`` classes), see the
463463
:ref:`HttpFoundation component documentation <component-http-foundation-request>`.
464464

‎create_framework/dependency_injection.rst

Copy file name to clipboardExpand all lines: create_framework/dependency_injection.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ reporting turned on and errors displayed in the browser to ease debugging::
6565
environment. Having two different front controllers gives you the opportunity
6666
to have a slightly different configuration for each of them.
6767

68-
So, moving code from the front controller to the framework class makes our
68+
Moving code from the front controller to the framework class makes our
6969
framework more configurable, but at the same time, it introduces a lot of
7070
issues:
7171

‎create_framework/http_foundation.rst

Copy file name to clipboardExpand all lines: create_framework/http_foundation.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ it suffers from a few problems::
2222
printf('Hello %s', $name);
2323

2424
First, if the ``name`` query parameter is not defined in the URL query string,
25-
you will get a PHP warning; so let's fix it::
25+
you will get a PHP warning; let's fix it::
2626

2727
// framework/index.php
2828
$name = $_GET['name'] ?? 'World';
@@ -93,8 +93,8 @@ reading this book now and go back to whatever code you were working on before.
9393
Going OOP with the HttpFoundation Component
9494
-------------------------------------------
9595

96-
Writing web code is about interacting with HTTP. So, the fundamental
97-
principles of our framework should be around the `HTTP specification`_.
96+
Writing web code is about interacting with HTTP. The fundamental principles
97+
of our framework should be around the `HTTP specification`_.
9898

9999
The HTTP specification describes how a client (a browser for instance)
100100
interacts with a server (our application via a web server). The dialog between
@@ -261,7 +261,7 @@ explicitly trust your reverse proxies by calling ``setTrustedProxies()``::
261261
// the client is a known one, so give it some more privilege
262262
}
263263

264-
So, the ``getClientIp()`` method works securely in all circumstances. You can
264+
The ``getClientIp()`` method works securely in all circumstances. You can
265265
use it in all your projects, whatever the configuration is, it will behave
266266
correctly and safely. That's one of the goals of using a framework. If you were
267267
to write a framework from scratch, you would have to think about all these

‎create_framework/http_kernel_controller_resolver.rst

Copy file name to clipboardExpand all lines: create_framework/http_kernel_controller_resolver.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The HttpKernel Component: the Controller Resolver
1+
The HttpKernel Component: The Controller Resolver
22
=================================================
33

44
You might think that our framework is already pretty solid and you are

‎create_framework/routing.rst

Copy file name to clipboardExpand all lines: create_framework/routing.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ With this knowledge in mind, let's write the new version of our framework::
157157

158158
$response->send();
159159

160-
There are a few new things in the code:
160+
This code has a few new things:
161161

162162
* Route names are used for template names;
163163

‎create_framework/unit_testing.rst

Copy file name to clipboardExpand all lines: create_framework/unit_testing.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ controller. We check that the response status is 200 and that its content is
196196
the one we have set in the controller.
197197

198198
To check that we have covered all possible use cases, run the PHPUnit test
199-
coverage feature (you need to enable `XDebug`_ first):
199+
coverage feature (you need to enable `Xdebug`_ first):
200200

201201
.. code-block:: terminal
202202

‎page_creation.rst

Copy file name to clipboardExpand all lines: page_creation.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ project:
305305
Most of the time, you'll be working in ``src/``, ``templates/`` or ``config/``.
306306
As you keep reading, you'll learn what can be done inside each of these.
307307

308-
So what about the other directories in the project?
308+
What about the other directories in the project?
309309

310310
``bin/``
311311
The famous ``bin/console`` file lives here (and other, less important

‎quick_tour/flex_recipes.rst

Copy file name to clipboardExpand all lines: quick_tour/flex_recipes.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ small, simple and *fast*. And you're in total control of what you add.
3636
Flex Recipes and Aliases
3737
------------------------
3838

39-
So how can we install and configure Twig? By running one single command:
39+
How can we install and configure Twig? By running one single command:
4040

4141
.. code-block:: terminal
4242

‎quick_tour/the_big_picture.rst

Copy file name to clipboardExpand all lines: quick_tour/the_big_picture.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Symfony application:
4040
└─ vendor/
4141
4242
Can we already load the project in a browser? Yes! You can setup
43-
:doc:`Nginx or Apache </setup/web_server_configuration>` and configure their
43+
:doc:`nginx or Apache </setup/web_server_configuration>` and configure their
4444
document root to be the ``public/`` directory. But, for development, it's better
4545
to :doc:`install the Symfony local web server </setup/symfony_server>` and run
4646
it as follows:
@@ -100,7 +100,7 @@ A controller is just a normal function with *one* rule: it must return a Symfony
100100
``Response`` object. But that response can contain anything: simple text, JSON or
101101
a full HTML page.
102102

103-
But the routing system is *much* more powerful. So let's make the route more interesting:
103+
But the routing system is *much* more powerful. Let's make the route more interesting:
104104

105105
.. code-block:: diff
106106
@@ -135,7 +135,7 @@ Try the page out by going to ``http://localhost:8000/hello/Symfony``. You should
135135
see: Hello Symfony! The value of the ``{name}`` in the URL is available as a ``$name``
136136
argument in your controller.
137137

138-
But this can be even simpler! So let's install annotations support:
138+
But this can be even simpler! Let's install annotations support:
139139

140140
.. code-block:: terminal
141141

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,9 +1098,9 @@ Parameter Conversion
10981098

10991099
A common routing need is to convert the value stored in some parameter (e.g. an
11001100
integer acting as the user ID) into another value (e.g. the object that
1101-
represents the user). This feature is called a "param converter".
1101+
represents the user). This feature is called a "parameter converter".
11021102

1103-
To add support for "param converters" we need SensioFrameworkExtraBundle:
1103+
To add support for "parameter converters" we need SensioFrameworkExtraBundle:
11041104

11051105
.. code-block:: terminal
11061106
@@ -1133,11 +1133,11 @@ controller action. Instead of ``string $slug``, add ``BlogPost $post``::
11331133
}
11341134

11351135
If your controller arguments include type-hints for objects (``BlogPost`` in
1136-
this case), the "param converter" makes a database request to find the object
1136+
this case), the "parameter converter" makes a database request to find the object
11371137
using the request parameters (``slug`` in this case). If no object is found,
11381138
Symfony generates a 404 response automatically.
11391139

1140-
Read the `full param converter documentation`_ to learn about the converters
1140+
Read the `full parameter converter documentation`_ to learn about the converters
11411141
provided by Symfony and how to configure them.
11421142

11431143
Special Parameters
@@ -2635,7 +2635,7 @@ use the ``generateUrl()`` helper::
26352635
.. caution::
26362636

26372637
While objects are converted to string when used as placeholders, they are not
2638-
converted when used as extra parameters. So, if you're passing an object (e.g. an Uuid)
2638+
converted when used as extra parameters. If you're passing an object (e.g. an UUID)
26392639
as value of an extra parameter, you need to explicitly convert it to a string::
26402640

26412641
$this->generateUrl('blog', ['uuid' => (string) $entity->getUuid()]);
@@ -3067,5 +3067,5 @@ Learn more about Routing
30673067

30683068
.. _`PHP regular expressions`: https://www.php.net/manual/en/book.pcre.php
30693069
.. _`PCRE Unicode properties`: https://www.php.net/manual/en/regexp.reference.unicode.php
3070-
.. _`full param converter documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
3070+
.. _`full parameter converter documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
30713071
.. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle

‎setup.rst

Copy file name to clipboardExpand all lines: setup.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ to run this command which displays information about the project:
114114
Running Symfony Applications
115115
----------------------------
116116

117-
In production, you should install a web server like Nginx or Apache and
117+
In production, you should install a web server like nginx or Apache and
118118
:doc:`configure it to run Symfony </setup/web_server_configuration>`. This
119119
method can also be used if you're not using the Symfony local web server for
120120
development.
@@ -211,7 +211,7 @@ Symfony Packs
211211

212212
Sometimes a single feature requires installing several packages and bundles.
213213
Instead of installing them individually, Symfony provides **packs**, which are
214-
Composer metapackages that include several dependencies.
214+
Composer meta-packages that include several dependencies.
215215

216216
For example, to add debugging features in your application, you can run the
217217
``composer require --dev debug`` command. This installs the ``symfony/debug-pack``,

‎templates.rst

Copy file name to clipboardExpand all lines: templates.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Build, Versioning & More Advanced CSS, JavaScript and Image Handling
362362
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363363

364364
For help building, versioning and minifying your JavaScript and
365-
CSS assets in a modern way, read about :doc:`Symfony's Webpack Encore </frontend>`.
365+
CSS assets in a modern way, read about :doc:`Symfony's webpack Encore </frontend>`.
366366

367367
.. _twig-app-variable:
368368

@@ -1034,7 +1034,7 @@ JavaScript library.
10341034

10351035
First, include the `hinclude.js`_ library in your page
10361036
:ref:`linking to it <templates-link-to-assets>` from the template or adding it
1037-
to your application JavaScript :doc:`using Webpack Encore </frontend>`.
1037+
to your application JavaScript :doc:`using webpack Encore </frontend>`.
10381038

10391039
As the embedded content comes from another page (or controller for that matter),
10401040
Symfony uses a version of the standard ``render()`` function to configure

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.