Skip to content

Another collection of fixes: Typos, Formatting, Logic, Links #3174

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 2 commits into from
Nov 13, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 components/dependency_injection/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Compiler passes to allow Interaction between Bundles
:ref:`Compiler passes <components-dependency-injection-compiler-passes>` are
used to allow interaction between different bundles as they cannot affect
each other's configuration in the extension classes. One of the main uses is
to process tagged services, allowing bundles to register services to picked
to process tagged services, allowing bundles to register services to be picked
up by other bundles, such as Monolog loggers, Twig extensions and Data Collectors
for the Web Profiler. Compiler passes are usually placed in the bundle's
``DependencyInjection/Compiler`` directory.
Expand Down
2 changes: 1 addition & 1 deletion components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Sending the response to the client is then as simple as calling
Setting Cookies
~~~~~~~~~~~~~~~

The response cookies can be manipulated though the ``headers`` public
The response cookies can be manipulated through the ``headers`` public
attribute::

use Symfony\Component\HttpFoundation\Cookie;
Expand Down
2 changes: 1 addition & 1 deletion components/security/authorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ An authorization decision will always be based on a few things:
Each attribute stands for a certain right the user should have, e.g.
``ROLE_ADMIN`` to make sure the user is an administrator.
* An object (optional)
Any object on which for which access control needs to be checked, like
Any object for which access control needs to be checked, like
an article or a comment object.

.. _components-security-access-decision-manager:
Expand Down
8 changes: 4 additions & 4 deletions components/security/firewall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ Flow: Firewall, Authentication, Authorization
Hopefully you can now see a little bit about how the "flow" of the security
context works:

#. the Firewall is registered as a listener on the ``kernel.request`` event;
#. at the beginning of the request, the Firewall checks the firewall map
#. The Firewall is registered as a listener on the ``kernel.request`` event;
#. At the beginning of the request, the Firewall checks the firewall map
to see if any firewall should be active for this URL;
#. If a firewall is found in the map for this URL, its listeners are notified
#. each listener checks to see if the current request contains any authentication
#. If a firewall is found in the map for this URL, its listeners are notified;
#. Each listener checks to see if the current request contains any authentication
information - a listener may (a) authenticate a user, (b) throw an
``AuthenticationException``, or (c) do nothing (because there is no
authentication information on the request);
Expand Down
4 changes: 2 additions & 2 deletions cookbook/controller/service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ the route ``_controller`` value:

# app/config/routing.yml
hello:
pattern: /hello
path: /hello
defaults: { _controller: acme.hello.controller:indexAction }

.. code-block:: xml

<!-- app/config/routing.xml -->
<route id="hello" pattern="/hello">
<route id="hello" path="/hello">
<default key="_controller">acme.hello.controller:indexAction</default>
</route>

Expand Down
4 changes: 2 additions & 2 deletions cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ Next, update your routes. If you're placing your routes inside your bundle

# src/Acme/AccountBundle/Resources/config/routing.yml
account_register:
pattern: /register
path: /register
defaults: { _controller: AcmeAccountBundle:Account:register }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please edit this to use 4 spaces


account_create:
pattern: /register/create
path: /register/create
defaults: { _controller: AcmeAccountBundle:Account:create }

.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,6 @@ which is the first one defined or the one configured via the
``default_connection`` parameter.

Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
service where ``[name]`` if the name of the connection.
service where ``[name]`` is the name of the connection.

.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
4 changes: 2 additions & 2 deletions reference/configuration/swiftmailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ type

**type**: ``string`` **default**: ``file``

The method used to store spooled messages. Currently only ``file`` is supported.
However, a custom spool should be possible by creating a service called
The method used to store spooled messages. Valid values are ``memory`` and
``file``. A custom spool should be possible by creating a service called
``swiftmailer.spool.myspool`` and setting this value to ``myspool``.

path
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/File.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ If set, the validator will check that the mime type of the underlying file
is equal to the given mime type (if a string) or exists in the collection
of given mime types (if an array).

You can find a list of existing mime types on the `IANA website`_
You can find a list of existing mime types on the `IANA website`_.

maxSizeMessage
~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Length.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ is used.
minMessage
~~~~~~~~~~

**type**: ``string`` **default**: ``This value is too short. It should have {{ limit }} characters or more.``.
**type**: ``string`` **default**: ``This value is too short. It should have {{ limit }} characters or more.``

The message that will be shown if the underlying value's length is less than the `min`_ option.

maxMessage
~~~~~~~~~~

**type**: ``string`` **default**: ``This value is too long. It should have {{ limit }} characters or less.``.
**type**: ``string`` **default**: ``This value is too long. It should have {{ limit }} characters or less.``

The message that will be shown if the underlying value's length is more than the `max`_ option.

Expand Down
7 changes: 6 additions & 1 deletion reference/constraints/Null.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ of an ``Author`` class exactly equal to ``null``, you could do the following:
Acme\BlogBundle\Entity\Author:
properties:
firstName:
- 'Null': ~
- "Null": ~
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to be consistent with the examples for the True and False validators, i.e. all validators using reserved Twig words. Both are using double quotes. We could also change those to single quotes or is there a reason to not making it consistent? Actually, in PHP I think single quotes are the standard, what about Yaml?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In yaml all reserved words (true, false, null) are put in single quotes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I'll change it for the True and False validator instead.


.. code-block:: php-annotations

Expand Down Expand Up @@ -77,6 +77,11 @@ of an ``Author`` class exactly equal to ``null``, you could do the following:
}
}

.. caution::

When using YAML, be sure to surround ``Null`` with quotes (``"Null"``)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null (lowercase)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the validator's name is "Null" (uc first). For the next line it could be "...YAML will convert this into a null value...".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry. You only need to change the next line

or else YAML will convert this into a Null value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean like ...or else YAML will convert this into a null value?


Options
-------

Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ will convert the pattern given in the `pattern`_ option into an HTML5 compatible
pattern. This means that the delimiters are removed (e.g. ``/[a-z]+/`` becomes ``[a-z]+``).

However, there are some other incompatibilities between both patterns which
cannot be fixed by the constraint. For instance, the html5 pattern attribute
cannot be fixed by the constraint. For instance, the HTML5 ``pattern`` attribute
does not support flags. If you have a pattern like ``/[a-z]+/i`` you need to
specify the html5 compatible pattern in the ``htmlPattern`` option:
specify the HTML5 compatible pattern in the ``htmlPattern`` option:

.. configuration-block::

Expand Down
5 changes: 5 additions & 0 deletions reference/constraints/True.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ Then you can constrain this method with ``True``.

If the ``isTokenValid()`` returns false, the validation will fail.

.. caution::

When using YAML, be sure to surround ``True`` with quotes (``"True"``)
or else YAML will convert this into a Boolean value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true Boolean value


Options
-------

Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ errorPath
.. versionadded:: 2.1
The ``errorPath`` option was added in Symfony 2.1.

If the entity violates constraint the error message is bound to the first
field in `fields`_. If there are more than one fields, you may want to map
If the entity violates the constraint the error message is bound to the first
field in `fields`_. If there is more than one field, you may want to map
the error message to another field.

Consider this example:
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ you need is the JavaScript:
is automatically available on the ``data-prototype`` attribute of the
element (e.g. ``div`` or ``table``) that surrounds your collection. The
only difference is that the entire "form row" is rendered for you, meaning
you wouldn't have to wrap it in any container element as was done
you wouldn't have to wrap it in any container element as it was done
above.

Field Options
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/integer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This field has different options on how to handle input values that aren't
integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6).

+-------------+-----------------------------------------------------------------------+
| Rendered as | ``input`` ``text`` field |
| Rendered as | ``input`` ``number`` field |
+-------------+-----------------------------------------------------------------------+
| Options | - `rounding_mode`_ |
| | - `precision`_ |
Expand Down
6 changes: 3 additions & 3 deletions reference/forms/types/options/attr.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ attr

**type**: array **default**: Empty array

If you want to add extra attributes to HTML field representation
you can use ``attr`` option. It's an associative array with HTML attribute
as a key. This can be useful when you need to set a custom class for some widget::
If you want to add extra attributes to an HTML field representation
you can use the ``attr`` option. It's an associative array with HTML attributes
as keys. This can be useful when you need to set a custom class for some widget::

$builder->add('body', 'textarea', array(
'attr' => array('class' => 'tinymce'),
Expand Down
8 changes: 4 additions & 4 deletions reference/forms/types/options/date_widget.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ widget

The basic way in which this field should be rendered. Can be one of the following:

* ``choice``: renders three select inputs. The order of the selects is defined
* ``choice``: renders three select inputs. The order of the selects is defined
in the `format`_ option.

* ``text``: renders a three field input of type text (month, day, year).
* ``text``: renders a three field input of type ``text`` (month, day, year).

* ``single_text``: renders a single input of type date (text in Symfony 2.0). User's
input is validated based on the `format`_ option.
* ``single_text``: renders a single input of type ``date`` (``text`` in Symfony 2.0).
User's input is validated based on the `format`_ option.
6 changes: 3 additions & 3 deletions reference/forms/types/options/error_mapping.rst.inc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. versionadded:: 2.1
The ``error_mapping`` option is new to Symfony 2.1.

error_mapping
~~~~~~~~~~~~~

**type**: ``array`` **default**: ``empty``

.. versionadded:: 2.1
The ``error_mapping`` option is new to Symfony 2.1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know why all have this wording, i think it was introduced in or similar could be clear

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be indented by 4 spaces. And I'm -1 for this change, as it will get removed in 2.3, so it's useless to add it only to 2.2 imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But these "2.1" notes will last in the 2.2 branch, right? So why no update them in 2.2 as long as the 2.2 branch is maintained?


This option allows you to modify the target of a validation error.

Imagine you have a custom method named ``matchingCityAndZipCode`` that validates
Expand Down