Skip to content

Commit c4fb50d

Browse files
committed
minor #12610 [3.4] Fixed many spelling issues found in the docs (wouterj)
This PR was merged into the 3.4 branch. Discussion ---------- [3.4] Fixed many spelling issues found in the docs I was planning to do this for a long time: Run the [Sphinx spelling checker](https://pypi.org/project/sphinxcontrib.spelling/) on the Symfony documentation. This PR fixes quite a lot of spelling issues found in the files starting with `b` and `c` for the 3.4 branch. I think it's good to have these fixed, so I'm happy to merge this myself and fix any merge conflicts that might occur while doing the up-merge once. Meanwhile, I'm also preparing a "word list" of words that the spelling checker doesn't recognize. The spelling checker uses Enhant, which is [also available for PHP](https://www.php.net/manual/en/book.enchant.php). So we might be able to add this to DOCtor when all issues are fixed. cc @symfony/team-symfony-docs Commits ------- bb5fb7b Fixed many spelling issues
2 parents b1c8312 + bb5fb7b commit c4fb50d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+138
-132
lines changed

best_practices/controllers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ configuration to the main routing configuration file:
4848
4949
This configuration will load annotations from any controller stored inside the
5050
``src/AppBundle/Controller/`` directory and even from its subdirectories.
51-
So if your application defines lots of controllers, it's perfectly ok to
51+
So if your application defines lots of controllers, it's perfectly OK to
5252
reorganize them into subdirectories:
5353

5454
.. code-block:: text

best_practices/templates.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Template Locations
3030
Store all your application's templates in ``app/Resources/views/`` directory.
3131

3232
Traditionally, Symfony developers stored the application templates in the
33-
``Resources/views/`` directory of each bundle. Then they used the Twig namespaced
34-
path to refer to them (e.g. ``@AcmeDemo/Default/index.html.twig``).
33+
``Resources/views/`` directory of each bundle. Then they used Twig namespaces
34+
to refer to them (e.g. ``@AcmeDemo/Default/index.html.twig``).
3535

3636
But for the templates used in your application, it's much more convenient
3737
to store them in the ``app/Resources/views/`` directory. For starters, this
@@ -51,7 +51,7 @@ scattered through lots of bundles.
5151

5252
.. best-practice::
5353

54-
Use lowercased snake_case for directory and template names.
54+
Use lowercase snake_case for directory and template names.
5555

5656
.. best-practice::
5757

bundles/best_practices.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ A namespace becomes a bundle as soon as you add a bundle class to it. The
3737
bundle class name must follow these simple rules:
3838

3939
* Use only alphanumeric characters and underscores;
40-
* Use a StudlyCaps name (i.e. camelCase with the first letter uppercased);
40+
* Use a StudlyCaps name (i.e. camelCase with an uppercase first letter);
4141
* Use a descriptive and short name (no more than two words);
4242
* Prefix the name with the concatenation of the vendor (and optionally the
4343
category namespaces);

components/asset.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ suffix to any asset path::
119119
echo $package->getUrl('image.png');
120120
// result: image.png?v1
121121

122-
In case you want to modify the version format, pass a sprintf-compatible format
123-
string as the second argument of the ``StaticVersionStrategy`` constructor::
122+
In case you want to modify the version format, pass a ``sprintf``-compatible
123+
format string as the second argument of the ``StaticVersionStrategy``
124+
constructor::
124125

125126
// puts the 'version' word before the version value
126127
$package = new Package(new StaticVersionStrategy('v1', '%s?version=%s'));

components/cache/adapters/php_array_cache_adapter.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ that is optimized and preloaded into OPcache memory storage::
3434

3535
.. note::
3636

37-
This adapter requires PHP 7.x and should be used with the php.ini setting
38-
``opcache.enable`` on.
37+
This adapter requires PHP 7.x and should be used with the ``php.ini``
38+
setting ``opcache.enable=On``.

components/class_loader/class_loader.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ your classes::
5555
]);
5656

5757
Classes from a sub-namespace or a sub-hierarchy of `PEAR`_ classes can be
58-
looked for in a location list to ease the vendoring of a sub-set of classes
59-
for large projects::
58+
looked for in a location list to ease the splitting a sub-set of classes into
59+
another package for large projects::
6060

6161
$loader->addPrefixes([
6262
'Doctrine\Common' => __DIR__.'/vendor/doctrine/common/lib',

components/config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Config Component
66
====================
77

88
The Config component provides several classes to help you find, load,
9-
combine, autofill and validate configuration values of any kind, whatever
9+
combine, fill and validate configuration values of any kind, whatever
1010
their source may be (YAML, XML, INI files, or for instance a database).
1111

1212
Installation

components/console/helpers/processhelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ useful information about process status.
99

1010
To display process details, use the :class:`Symfony\\Component\\Console\\Helper\\ProcessHelper`
1111
and run your command with verbosity. For example, running the following code with
12-
a very verbose verbosity (e.g. -vv)::
12+
a very verbose verbosity (e.g. ``-vv``)::
1313

1414
use Symfony\Component\Process\Process;
1515

components/console/helpers/progressbar.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ the example above.
237237
Bar Settings
238238
~~~~~~~~~~~~
239239

240-
Amongst the placeholders, ``bar`` is a bit special as all the characters used
240+
Among the placeholders, ``bar`` is a bit special as all the characters used
241241
to display it can be customized::
242242

243243
// the finished part of the bar

components/console/helpers/questionhelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ convenient for passwords::
203203
.. caution::
204204

205205
When you ask for a hidden response, Symfony will use either a binary, change
206-
stty mode or use another trick to hide the response. If none is available,
206+
``stty`` mode or use another trick to hide the response. If none is available,
207207
it will fallback and allow the response to be visible unless you set this
208208
behavior to ``false`` using
209209
:method:`Symfony\\Component\\Console\\Question\\Question::setHiddenFallback`

components/console/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ built-in options as well as a couple of built-in commands for the Console compon
1010
.. note::
1111

1212
These examples assume you have added a file ``application.php`` to run at
13-
the cli::
13+
the CLI::
1414

1515
#!/usr/bin/env php
1616
<?php

components/debug.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Enabling the Exception Handler
5858

5959
The :class:`Symfony\\Component\\Debug\\ExceptionHandler` class catches
6060
uncaught PHP exceptions and converts them to a nice PHP response. It is useful
61-
in debug mode to replace the default PHP/XDebug output with something prettier
61+
in debug mode to replace the default PHP/Xdebug output with something prettier
6262
and more useful::
6363

6464
use Symfony\Component\Debug\ExceptionHandler;

components/dependency_injection/compilation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ A very simple extension may just load configuration files into the container::
7878

7979
This does not gain very much compared to loading the file directly into
8080
the overall container being built. It just allows the files to be split
81-
up amongst the modules/bundles. Being able to affect the configuration
81+
up among the modules/bundles. Being able to affect the configuration
8282
of a module from configuration files outside of the module/bundle is needed
8383
to make a complex application configurable. This can be done by specifying
8484
sections of config files loaded directly into the container as being for

components/dom_crawler.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ and :method:`Symfony\\Component\\DomCrawler\\Crawler::filter`::
146146
method.
147147

148148
The default namespace is removed when loading the content if it's the only
149-
namespace in the document. It's done to simplify the xpath queries.
149+
namespace in the document. It's done to simplify the XPath queries.
150150

151151
Namespaces can be explicitly registered with the
152152
:method:`Symfony\\Component\\DomCrawler\\Crawler::registerNamespace` method::
@@ -188,7 +188,7 @@ Get all the child or parent nodes::
188188
Accessing Node Values
189189
~~~~~~~~~~~~~~~~~~~~~
190190

191-
Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::
191+
Access the node name (HTML tag name) of the first node of the current selection (e.g. "p" or "div")::
192192

193193
// returns the node name (HTML tag name) of the first child element under <body>
194194
$tag = $crawler->filterXPath('//body/*')->nodeName();

components/expression_language.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ PHP type (including objects)::
102102
[
103103
'fruit' => $apple,
104104
]
105-
));
105+
)); // displays "Honeycrisp"
106106

107-
This will print "Honeycrisp". For more information, see the :doc:`/components/expression_language/syntax`
107+
For more information, see the :doc:`/components/expression_language/syntax`
108108
entry, especially :ref:`component-expression-objects` and :ref:`component-expression-arrays`.
109109

110110
Caching

components/filesystem.rst

+38-36
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ endpoint for filesystem operations::
4444
string, an array or any object implementing :phpclass:`Traversable` as
4545
the target argument.
4646

47-
mkdir
48-
~~~~~
47+
``mkdir``
48+
~~~~~~~~~
4949

5050
:method:`Symfony\\Component\\Filesystem\\Filesystem::mkdir` creates a directory recursively.
5151
On POSIX filesystems, directories are created with a default mode value
@@ -65,12 +65,12 @@ On POSIX filesystems, directories are created with a default mode value
6565
.. note::
6666

6767
The directory permissions are affected by the current `umask`_.
68-
Set the umask for your webserver, use PHP's :phpfunction:`umask`
68+
Set the ``umask`` for your webserver, use PHP's :phpfunction:`umask`
6969
function or use the :phpfunction:`chmod` function after the
7070
directory has been created.
7171

72-
exists
73-
~~~~~~
72+
``exists``
73+
~~~~~~~~~~
7474

7575
:method:`Symfony\\Component\\Filesystem\\Filesystem::exists` checks for the
7676
presence of one or more files or directories and returns ``false`` if any of
@@ -88,8 +88,8 @@ them is missing::
8888
You can pass an array or any :phpclass:`Traversable` object as the first
8989
argument.
9090

91-
copy
92-
~~~~
91+
``copy``
92+
~~~~~~~~
9393

9494
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` makes a copy of a
9595
single file (use :method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` to
@@ -103,8 +103,8 @@ by the third boolean argument::
103103
// image.jpg will be overridden
104104
$filesystem->copy('image-ICC.jpg', 'image.jpg', true);
105105

106-
touch
107-
~~~~~
106+
``touch``
107+
~~~~~~~~~
108108

109109
:method:`Symfony\\Component\\Filesystem\\Filesystem::touch` sets access and
110110
modification time for a file. The current time is used by default. You can set
@@ -122,8 +122,8 @@ your own with the second argument. The third argument is the access time::
122122
You can pass an array or any :phpclass:`Traversable` object as the first
123123
argument.
124124

125-
chown
126-
~~~~~
125+
``chown``
126+
~~~~~~~~~
127127

128128
:method:`Symfony\\Component\\Filesystem\\Filesystem::chown` changes the owner of
129129
a file. The third argument is a boolean recursive option::
@@ -138,8 +138,8 @@ a file. The third argument is a boolean recursive option::
138138
You can pass an array or any :phpclass:`Traversable` object as the first
139139
argument.
140140

141-
chgrp
142-
~~~~~
141+
``chgrp``
142+
~~~~~~~~~
143143

144144
:method:`Symfony\\Component\\Filesystem\\Filesystem::chgrp` changes the group of
145145
a file. The third argument is a boolean recursive option::
@@ -154,8 +154,8 @@ a file. The third argument is a boolean recursive option::
154154
You can pass an array or any :phpclass:`Traversable` object as the first
155155
argument.
156156

157-
chmod
158-
~~~~~
157+
``chmod``
158+
~~~~~~~~~
159159

160160
:method:`Symfony\\Component\\Filesystem\\Filesystem::chmod` changes the mode or
161161
permissions of a file. The fourth argument is a boolean recursive option::
@@ -170,8 +170,8 @@ permissions of a file. The fourth argument is a boolean recursive option::
170170
You can pass an array or any :phpclass:`Traversable` object as the first
171171
argument.
172172

173-
remove
174-
~~~~~~
173+
``remove``
174+
~~~~~~~~~~
175175

176176
:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` deletes files,
177177
directories and symlinks::
@@ -183,8 +183,8 @@ directories and symlinks::
183183
You can pass an array or any :phpclass:`Traversable` object as the first
184184
argument.
185185

186-
rename
187-
~~~~~~
186+
``rename``
187+
~~~~~~~~~~
188188

189189
:method:`Symfony\\Component\\Filesystem\\Filesystem::rename` changes the name
190190
of a single file or directory::
@@ -194,8 +194,8 @@ of a single file or directory::
194194
// renames a directory
195195
$filesystem->rename('/tmp/files', '/path/to/store/files');
196196

197-
symlink
198-
~~~~~~~
197+
``symlink``
198+
~~~~~~~~~~~
199199

200200
:method:`Symfony\\Component\\Filesystem\\Filesystem::symlink` creates a
201201
symbolic link from the target to the destination. If the filesystem does not
@@ -207,8 +207,8 @@ support symbolic links, a third boolean argument is available::
207207
// does not support symbolic links
208208
$filesystem->symlink('/path/to/source', '/path/to/destination', true);
209209

210-
readlink
211-
~~~~~~~~
210+
``readlink``
211+
~~~~~~~~~~~~
212212

213213
.. versionadded:: 3.2
214214

@@ -242,8 +242,8 @@ Its behavior is the following::
242242
* if ``$path`` does not exist, it returns null.
243243
* if ``$path`` exists, it returns its absolute fully resolved final version.
244244

245-
makePathRelative
246-
~~~~~~~~~~~~~~~~
245+
``makePathRelative``
246+
~~~~~~~~~~~~~~~~~~~~
247247

248248
:method:`Symfony\\Component\\Filesystem\\Filesystem::makePathRelative` takes two
249249
absolute paths and returns the relative path from the second path to the first one::
@@ -256,8 +256,8 @@ absolute paths and returns the relative path from the second path to the first o
256256
// returns 'videos/'
257257
$filesystem->makePathRelative('/tmp/videos', '/tmp')
258258

259-
mirror
260-
~~~~~~
259+
``mirror``
260+
~~~~~~~~~~
261261

262262
:method:`Symfony\\Component\\Filesystem\\Filesystem::mirror` copies all the
263263
contents of the source directory into the target one (use the
@@ -266,8 +266,8 @@ files)::
266266

267267
$filesystem->mirror('/path/to/source', '/path/to/target');
268268

269-
isAbsolutePath
270-
~~~~~~~~~~~~~~
269+
``isAbsolutePath``
270+
~~~~~~~~~~~~~~~~~~
271271

272272
:method:`Symfony\\Component\\Filesystem\\Filesystem::isAbsolutePath` returns
273273
``true`` if the given path is absolute, ``false`` otherwise::
@@ -281,16 +281,18 @@ isAbsolutePath
281281
// returns false
282282
$filesystem->isAbsolutePath('../dir');
283283

284-
tempnam
285-
~~~~~~~
284+
``tempnam``
285+
~~~~~~~~~~~
286286

287-
:method:`Symfony\\Component\\Filesystem\\Filesystem::tempnam` creates a temporary file with a unique filename, and returns its path, or throw an exception on failure::
287+
:method:`Symfony\\Component\\Filesystem\\Filesystem::tempnam` creates a
288+
temporary file with a unique filename, and returns its path, or throw an
289+
exception on failure::
288290

289291
// returns a path like : /tmp/prefix_wyjgtF
290292
$filesystem->tempnam('/tmp', 'prefix_');
291293

292-
dumpFile
293-
~~~~~~~~
294+
``dumpFile``
295+
~~~~~~~~~~~~
294296

295297
:method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` saves the given
296298
contents into a file. It does this in an atomic manner: it writes a temporary
@@ -302,8 +304,8 @@ complete new file (but never a partially-written file)::
302304

303305
The ``file.txt`` file contains ``Hello World`` now.
304306

305-
appendToFile
306-
~~~~~~~~~~~~
307+
``appendToFile``
308+
~~~~~~~~~~~~~~~~
307309

308310
.. versionadded:: 3.3
309311

components/intl.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ TextBundleWriter
8686

8787
The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Writer\\TextBundleWriter`
8888
writes an array or an array-like object to a plain-text resource bundle. The
89-
resulting .txt file can be converted to a binary .res file with the
89+
resulting ``.txt`` file can be converted to a binary ``.res`` file with the
9090
:class:`Symfony\\Component\\Intl\\ResourceBundle\\Compiler\\BundleCompiler`
9191
class::
9292

@@ -105,7 +105,7 @@ class::
105105
$compiler = new BundleCompiler();
106106
$compiler->compile('/path/to/bundle', '/path/to/binary/bundle');
107107

108-
The command "genrb" must be available for the
108+
The command ``genrb`` must be available for the
109109
:class:`Symfony\\Component\\Intl\\ResourceBundle\\Compiler\\BundleCompiler` to
110110
work. If the command is located in a non-standard location, you can pass its
111111
path to the

0 commit comments

Comments
 (0)