Skip to content

[3.4] Fixed many spelling issues found in the docs #12610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion best_practices/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ configuration to the main routing configuration file:

This configuration will load annotations from any controller stored inside the
``src/AppBundle/Controller/`` directory and even from its subdirectories.
So if your application defines lots of controllers, it's perfectly ok to
So if your application defines lots of controllers, it's perfectly OK to
reorganize them into subdirectories:

.. code-block:: text
Expand Down
6 changes: 3 additions & 3 deletions best_practices/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Template Locations
Store all your application's templates in ``app/Resources/views/`` directory.

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

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

.. best-practice::

Use lowercased snake_case for directory and template names.
Use lowercase snake_case for directory and template names.

.. best-practice::

Expand Down
2 changes: 1 addition & 1 deletion bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A namespace becomes a bundle as soon as you add a bundle class to it. The
bundle class name must follow these simple rules:

* Use only alphanumeric characters and underscores;
* Use a StudlyCaps name (i.e. camelCase with the first letter uppercased);
* Use a StudlyCaps name (i.e. camelCase with an uppercase first letter);
* Use a descriptive and short name (no more than two words);
* Prefix the name with the concatenation of the vendor (and optionally the
category namespaces);
Expand Down
5 changes: 3 additions & 2 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ suffix to any asset path::
echo $package->getUrl('image.png');
// result: image.png?v1

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

// puts the 'version' word before the version value
$package = new Package(new StaticVersionStrategy('v1', '%s?version=%s'));
Expand Down
4 changes: 2 additions & 2 deletions components/cache/adapters/php_array_cache_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ that is optimized and preloaded into OPcache memory storage::

.. note::

This adapter requires PHP 7.x and should be used with the php.ini setting
``opcache.enable`` on.
This adapter requires PHP 7.x and should be used with the ``php.ini``
setting ``opcache.enable=On``.
4 changes: 2 additions & 2 deletions components/class_loader/class_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ your classes::
]);

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

$loader->addPrefixes([
'Doctrine\Common' => __DIR__.'/vendor/doctrine/common/lib',
Expand Down
2 changes: 1 addition & 1 deletion components/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Config Component
====================

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

Installation
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/processhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ useful information about process status.

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

use Symfony\Component\Process\Process;

Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/progressbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ the example above.
Bar Settings
~~~~~~~~~~~~

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

// the finished part of the bar
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/questionhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ convenient for passwords::
.. caution::

When you ask for a hidden response, Symfony will use either a binary, change
stty mode or use another trick to hide the response. If none is available,
``stty`` mode or use another trick to hide the response. If none is available,
it will fallback and allow the response to be visible unless you set this
behavior to ``false`` using
:method:`Symfony\\Component\\Console\\Question\\Question::setHiddenFallback`
Expand Down
2 changes: 1 addition & 1 deletion components/console/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ built-in options as well as a couple of built-in commands for the Console compon
.. note::

These examples assume you have added a file ``application.php`` to run at
the cli::
the CLI::

#!/usr/bin/env php
<?php
Expand Down
2 changes: 1 addition & 1 deletion components/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Enabling the Exception Handler

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

use Symfony\Component\Debug\ExceptionHandler;
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ A very simple extension may just load configuration files into the container::

This does not gain very much compared to loading the file directly into
the overall container being built. It just allows the files to be split
up amongst the modules/bundles. Being able to affect the configuration
up among the modules/bundles. Being able to affect the configuration
of a module from configuration files outside of the module/bundle is needed
to make a complex application configurable. This can be done by specifying
sections of config files loaded directly into the container as being for
Expand Down
4 changes: 2 additions & 2 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ and :method:`Symfony\\Component\\DomCrawler\\Crawler::filter`::
method.

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

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

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

// returns the node name (HTML tag name) of the first child element under <body>
$tag = $crawler->filterXPath('//body/*')->nodeName();
Expand Down
4 changes: 2 additions & 2 deletions components/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ PHP type (including objects)::
[
'fruit' => $apple,
]
));
)); // displays "Honeycrisp"

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

Caching
Expand Down
74 changes: 38 additions & 36 deletions components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ endpoint for filesystem operations::
string, an array or any object implementing :phpclass:`Traversable` as
the target argument.

mkdir
~~~~~
``mkdir``
~~~~~~~~~

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

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

exists
~~~~~~
``exists``
~~~~~~~~~~

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

copy
~~~~
``copy``
~~~~~~~~

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

touch
~~~~~
``touch``
~~~~~~~~~

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

chown
~~~~~
``chown``
~~~~~~~~~

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

chgrp
~~~~~
``chgrp``
~~~~~~~~~

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

chmod
~~~~~
``chmod``
~~~~~~~~~

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

remove
~~~~~~
``remove``
~~~~~~~~~~

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

rename
~~~~~~
``rename``
~~~~~~~~~~

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

symlink
~~~~~~~
``symlink``
~~~~~~~~~~~

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

readlink
~~~~~~~~
``readlink``
~~~~~~~~~~~~

.. versionadded:: 3.2

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

makePathRelative
~~~~~~~~~~~~~~~~
``makePathRelative``
~~~~~~~~~~~~~~~~~~~~

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

mirror
~~~~~~
``mirror``
~~~~~~~~~~

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

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

isAbsolutePath
~~~~~~~~~~~~~~
``isAbsolutePath``
~~~~~~~~~~~~~~~~~~

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

tempnam
~~~~~~~
``tempnam``
~~~~~~~~~~~

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

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

dumpFile
~~~~~~~~
``dumpFile``
~~~~~~~~~~~~

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

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

appendToFile
~~~~~~~~~~~~
``appendToFile``
~~~~~~~~~~~~~~~~

.. versionadded:: 3.3

Expand Down
4 changes: 2 additions & 2 deletions components/intl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ TextBundleWriter

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

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

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