Skip to content

Commit

Permalink
Merge branch '2.4'
Browse files Browse the repository at this point in the history
Conflicts:
	book/routing.rst
	book/security.rst
	changelog.rst
	components/config/definition.rst
	components/dependency_injection/compilation.rst
	components/finder.rst
	components/http_foundation/introduction.rst
	components/process.rst
	components/property_access/introduction.rst
	components/stopwatch.rst
	cookbook/console/sending_emails.rst
	cookbook/templating/render_without_controller.rst
	reference/constraints/CardScheme.rst
	reference/constraints/Luhn.rst
	reference/twig_reference.rst
  • Loading branch information
weaverryan committed May 9, 2014
2 parents 6d00c3d + 0ef4751 commit 0fe1bfd
Show file tree
Hide file tree
Showing 67 changed files with 161 additions and 147 deletions.
8 changes: 4 additions & 4 deletions book/forms.rst
Expand Up @@ -232,10 +232,10 @@ controller::
}

.. versionadded:: 2.3
The :method:`Symfony\\Component\\Form\\FormInterface::handleRequest` method was
added in Symfony 2.3. Previously, the ``$request`` was passed to the
``submit`` method - a strategy which is deprecated and will be removed
in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`.
The :method:`Symfony\\Component\\Form\\FormInterface::handleRequest` method
was introduced in Symfony 2.3. Previously, the ``$request`` was passed
to the ``submit`` method - a strategy which is deprecated and will be
removed in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`.

This controller follows a common pattern for handling forms, and has three
possible paths:
Expand Down
2 changes: 1 addition & 1 deletion book/page_creation.rst
Expand Up @@ -1061,5 +1061,5 @@ to rapidly develop applications.
.. _`Twig`: http://twig.sensiolabs.org
.. _`third-party bundles`: http://knpbundles.com
.. _`Symfony Standard Edition`: http://symfony.com/download
.. _`Apache's DirectoryIndex documentation`: http://httpd.apache.org/docs/2.0/mod/mod_dir.html
.. _`Apache's DirectoryIndex documentation`: http://httpd.apache.org/docs/current/mod/mod_dir.html
.. _`Nginx HttpCoreModule location documentation`: http://wiki.nginx.org/HttpCoreModule#location
5 changes: 3 additions & 2 deletions book/testing.rst
Expand Up @@ -415,8 +415,9 @@ Accessing internal Objects
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.3
The ``getInternalRequest()`` and ``getInternalResponse()`` method were
added in Symfony 2.3.
The :method:`Symfony\\Component\\BrowserKit\\Client::getInternalRequest`
and :method:`Symfony\\Component\\BrowserKit\\Client::getInternalResponse`
methods were introduced in Symfony 2.3.

If you use the client to test your application, you might want to access the
client's internal objects::
Expand Down
3 changes: 2 additions & 1 deletion changelog.rst
Expand Up @@ -206,8 +206,9 @@ New Documentation
Fixed Documentation
~~~~~~~~~~~~~~~~~~~

- `adcbb5d <https://github.com/symfony/symfony-docs/commit/adcbb5de6c3b8d6ba59e619315ef13fe45318494>`_ #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut)
- `5c4336a <https://github.com/symfony/symfony-docs/commit/5c4336a325ec98bc0eb7ef35baf86bcb9628e490>`_ #3570 Callback: [Validator, validate] expects validate to be static (nixilla)
- `5c367b4 <https://github.com/symfony/symfony-docs/commit/5c367b4dfa5c3adc8993702b1ae8f686c74419c8>`_ #3517 Fixed OptionsResolver component docs (WouterJ)
- `adcbb5d <https://github.com/symfony/symfony-docs/commit/adcbb5de6c3b8d6ba59e619315ef13fe45318494>`_ #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut)
- `a21fb26 <https://github.com/symfony/symfony-docs/commit/a21fb260978eaa27b1cb94fccb0bd0af71b6df7f>`_ #3559 Remove reference to copying parameters.yml from Git cookbook (pwaring)
- `de71a51 <https://github.com/symfony/symfony-docs/commit/de71a5143f6d30fff7e890cea250d047a63916d2>`_ #3551 [Cookbook][Dynamic Form Modification] Fix sample code (rybakit)
- `143db2f <https://github.com/symfony/symfony-docs/commit/143db2f75caa9ef6d7e1c230d0ac9d59c17fde5f>`_ #3550 Update introduction.rst (taavit)
Expand Down
2 changes: 1 addition & 1 deletion components/config/caching.rst
@@ -1,7 +1,7 @@
.. index::
single: Config; Caching based on resources

Caching based on resources
Caching Based on Resources
==========================

When all configuration resources are loaded, you may want to process the configuration
Expand Down
30 changes: 15 additions & 15 deletions components/config/definition.rst
@@ -1,10 +1,10 @@
.. index::
single: Config; Defining and processing configuration values

Defining and processing configuration values
Defining and Processing Configuration Values
============================================

Validating configuration values
Validating Configuration Values
-------------------------------

After loading configuration values from all kinds of resources, the values
Expand Down Expand Up @@ -38,7 +38,7 @@ they are when first encountered. Also, some keys are only available when
another key has a specific value (in the sample configuration above: the
``memory`` key only makes sense when the ``driver`` is ``sqlite``).

Defining a hierarchy of configuration values using the TreeBuilder
Defining a Hierarchy of Configuration Values Using the TreeBuilder
------------------------------------------------------------------

All the rules concerning configuration values can be defined using the
Expand Down Expand Up @@ -66,10 +66,10 @@ should be returned from a custom ``Configuration`` class which implements the
}
}

Adding node definitions to the tree
Adding Node Definitions to the Tree
-----------------------------------

Variable nodes
Variable Nodes
~~~~~~~~~~~~~~

A tree contains node definitions which can be laid out in a semantic way.
Expand All @@ -91,7 +91,7 @@ The root node itself is an array node, and has children, like the boolean
node ``auto_connect`` and the scalar node ``default_connection``. In general:
after defining a node, a call to ``end()`` takes you one step up in the hierarchy.

Node type
Node Type
~~~~~~~~~

It is possible to validate the type of a provided value by using the appropriate
Expand All @@ -108,7 +108,7 @@ node definition. Node type are available for:
and are created with ``node($name, $type)`` or their associated shortcut
``xxxxNode($name)`` method.

Numeric node constraints
Numeric Node Constraints
~~~~~~~~~~~~~~~~~~~~~~~~

Numeric nodes (float and integer) provide two extra constraints -
Expand All @@ -130,7 +130,7 @@ allowing to validate the value::
->end()
;

Enum nodes
Enum Nodes
~~~~~~~~~~

Enum nodes provide a constraint to match the given input against a set of
Expand All @@ -146,7 +146,7 @@ values::

This will restrict the ``gender`` option to be either ``male`` or ``female``.

Array nodes
Array Nodes
~~~~~~~~~~~

It is possible to add a deeper level to the hierarchy, by adding an array
Expand Down Expand Up @@ -187,7 +187,7 @@ inside the current node. According to the prototype definition in the example
above, it is possible to have multiple connection arrays (containing a ``driver``,
``host``, etc.).

Array node options
Array Node Options
~~~~~~~~~~~~~~~~~~

Before defining the children of an array node, you can provide options like:
Expand Down Expand Up @@ -230,7 +230,7 @@ In XML, each ``parameters`` node would have a ``name`` attribute (along with
the final array. The ``useAttributeAsKey`` is useful for normalizing how
arrays are specified between different formats like XML and YAML.

Default and required values
Default and required Values
---------------------------

For all node types, it is possible to define default values and replacement
Expand Down Expand Up @@ -307,7 +307,7 @@ you can take advantage of the shortcut
The ``canBeDisabled`` method looks about the same except that the section
would be enabled by default.

Merging options
Merging Options
---------------

Extra options concerning the merge process may be provided. For arrays:
Expand All @@ -321,7 +321,7 @@ For all nodes:
``cannotBeOverwritten()``
don’t let other configuration arrays overwrite an existing value for this node

Appending sections
Appending Sections
------------------

If you have a complex configuration to validate then the tree can grow to
Expand Down Expand Up @@ -493,7 +493,7 @@ By changing a string value into an associative array with ``name`` as the key::
->end()
;

Validation rules
Validation Rules
----------------

More advanced validation rules can be provided using the
Expand Down Expand Up @@ -539,7 +539,7 @@ Usually, "then" is a closure. Its return value will be used as a new value
for the node, instead
of the node's original value.

Processing configuration values
Processing Configuration Values
-------------------------------

The :class:`Symfony\\Component\\Config\\Definition\\Processor` uses the tree
Expand Down
8 changes: 4 additions & 4 deletions components/config/resources.rst
@@ -1,10 +1,10 @@
.. index::
single: Config; Loading resources

Loading resources
Loading Resources
=================

Locating resources
Locating Resources
------------------

Loading the configuration normally starts with a search for resources – in
Expand All @@ -24,7 +24,7 @@ look in this directory first. The third argument indicates whether or not the
locator should return the first file it has found, or an array containing
all matches.

Resource loaders
Resource Loaders
----------------

For each type of resource (YAML, XML, annotation, etc.) a loader must be defined.
Expand Down Expand Up @@ -57,7 +57,7 @@ class, which allows for recursively importing other resources::
}
}

Finding the right loader
Finding the right Loader
------------------------

The :class:`Symfony\\Component\\Config\\Loader\\LoaderResolver` receives as
Expand Down
6 changes: 3 additions & 3 deletions components/console/events.rst
Expand Up @@ -5,7 +5,7 @@ Using Events
============

.. versionadded:: 2.3
Console events were added in Symfony 2.3.
Console events were introduced in Symfony 2.3.

The Application class of the Console component allows you to optionally hook
into the lifecycle of a console application via events. Instead of reinventing
Expand Down Expand Up @@ -51,7 +51,7 @@ dispatched. Listeners receive a
$application = $command->getApplication();
});

The ``ConsoleEvents::TERMINATE`` event
The ``ConsoleEvents::TERMINATE`` Event
--------------------------------------

**Typical Purposes**: To perform some cleanup actions after the command has
Expand Down Expand Up @@ -89,7 +89,7 @@ Listeners receive a
It is then dispatched just before the ``ConsoleEvents::EXCEPTION`` event.
The exit code received in this case is the exception code.

The ``ConsoleEvents::EXCEPTION`` event
The ``ConsoleEvents::EXCEPTION`` Event
--------------------------------------

**Typical Purposes**: Handle exceptions thrown during the execution of a
Expand Down
6 changes: 3 additions & 3 deletions components/console/helpers/dialoghelper.rst
Expand Up @@ -23,7 +23,7 @@ All the methods inside the Dialog Helper have an
argument, the question as the second argument and the default value as the last
argument.

Asking the User for confirmation
Asking the User for Confirmation
--------------------------------

Suppose you want to confirm an action before actually executing it. Add
Expand Down Expand Up @@ -172,7 +172,7 @@ You can also ask and validate a hidden response::
If you want to allow the response to be visible if it cannot be hidden for
some reason, pass true as the fifth argument.

Let the user choose from a list of Answers
Let the User Choose from a List of Answers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have a predefined set of answers the user can choose from, you
Expand Down Expand Up @@ -240,7 +240,7 @@ this set the seventh argument to ``true``::
Now, when the user enters ``1,2``, the result will be:
``You have just selected: blue, yellow``.

Testing a Command which expects input
Testing a Command which Expects Input
-------------------------------------

If you want to write a unit test for a command which expects some kind of input
Expand Down
2 changes: 1 addition & 1 deletion components/console/introduction.rst
Expand Up @@ -472,7 +472,7 @@ method::
You can also test a whole console application by using
:class:`Symfony\\Component\\Console\\Tester\\ApplicationTester`.

Calling an existing Command
Calling an Existing Command
---------------------------

If a command depends on another one being run before it, instead of asking the
Expand Down
2 changes: 1 addition & 1 deletion components/console/single_command_tool.rst
@@ -1,7 +1,7 @@
.. index::
single: Console; Single command application

Building a Single Command Application
Building a single Command Application
=====================================

When building a command line tool, you may not need to provide several commands.
Expand Down
8 changes: 4 additions & 4 deletions components/css_selector.rst
Expand Up @@ -18,8 +18,8 @@ You can install the component in 2 different ways:
Usage
-----

Why use CSS selectors?
~~~~~~~~~~~~~~~~~~~~~~
Why to Use CSS selectors?
~~~~~~~~~~~~~~~~~~~~~~~~~

When you're parsing an HTML or an XML document, by far the most powerful
method is XPath.
Expand All @@ -41,7 +41,7 @@ be converted to an XPath equivalent. This XPath expression can then be used
with other functions and classes that use XPath to find elements in a
document.

The CssSelector component
The CssSelector Component
~~~~~~~~~~~~~~~~~~~~~~~~~

The component's only goal is to convert CSS selectors to their XPath
Expand All @@ -66,7 +66,7 @@ You can use this expression with, for instance, :phpclass:`DOMXPath` or
uses the CssSelector component to find elements based on a CSS selector
string. See the :doc:`/components/dom_crawler` for more details.

Limitations of the CssSelector component
Limitations of the CssSelector Component
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not all CSS selectors can be converted to XPath equivalents.
Expand Down
4 changes: 2 additions & 2 deletions components/debug/introduction.rst
Expand Up @@ -8,8 +8,8 @@ The Debug Component
The Debug component provides tools to ease debugging PHP code.

.. versionadded:: 2.3
The Debug component is new to Symfony 2.3. Previously, the classes were
located in the HttpKernel component.
The Debug component was introduced in Symfony 2.3. Previously, the classes
were located in the HttpKernel component.

Installation
------------
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/advanced.rst
Expand Up @@ -156,7 +156,7 @@ service by asking for the ``bar`` service like this::
bar: "@foo"
Requiring files
Requiring Files
---------------

There might be use cases when you need to include another file just before
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Expand Up @@ -273,7 +273,7 @@ but also load a secondary one only if a certain parameter is set::

.. _components-dependency-injection-compiler-passes:

Prepending Configuration passed to the Extension
Prepending Configuration Passed to the Extension
------------------------------------------------

An Extension can prepend the configuration of any Bundle before the ``load()``
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/definitions.rst
Expand Up @@ -33,10 +33,10 @@ it to the container using::

$container->setDefinition($id, $definition);

Working with a definition
Working with a Definition
-------------------------

Creating a new definition
Creating a new Definition
~~~~~~~~~~~~~~~~~~~~~~~~~

If you need to create a new definition rather than manipulate one retrieved
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/introduction.rst
Expand Up @@ -160,7 +160,7 @@ like this::

$newsletterManager = $container->get('newsletter_manager');

Avoiding Your Code Becoming Dependent on the Container
Avoiding your Code Becoming Dependent on the Container
------------------------------------------------------

Whilst you can retrieve services from the container directly it is best
Expand All @@ -175,7 +175,7 @@ should be as few times as possible at the entry point to your application.

.. _components-dependency-injection-loading-config:

Setting Up the Container with Configuration Files
Setting up the Container with Configuration Files
-------------------------------------------------

As well as setting up the services using PHP as above you can also use
Expand Down

0 comments on commit 0fe1bfd

Please sign in to comment.