Skip to content

Commit

Permalink
Merge branch '2.4' into 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jul 2, 2014
2 parents fc872a9 + 2aea99d commit 071f583
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 37 deletions.
4 changes: 2 additions & 2 deletions book/templating.rst
Expand Up @@ -1523,9 +1523,9 @@ In many cases, you may want to allow a single controller to render multiple
different formats based on the "request format". For that reason, a common
pattern is to do the following::

public function indexAction()
public function indexAction(Request $request)
{
$format = $this->getRequest()->getRequestFormat();
$format = $request->getRequestFormat();

return $this->render('AcmeBlogBundle:Blog:index.'.$format.'.twig');
}
Expand Down
38 changes: 19 additions & 19 deletions contributing/documentation/standards.rst
Expand Up @@ -81,25 +81,6 @@ Configuration examples should show all supported formats using
* **Validation**: YAML, Annotations, XML, PHP
* **Doctrine Mapping**: Annotations, YAML, XML, PHP

Files and Directories
~~~~~~~~~~~~~~~~~~~~~

* When referencing directories, always add a trailing slash to avoid confusions
with regular files (e.g. *"execute the ``console`` script located at the ``app/``
directory"*).
* When referencing file extensions explicitly, you should include a leading dot
for every extension (e.g. "*XML files use the ``.xml`` extension*").
* When you list a Symfony file/directory hierarchy, use ``your-project/`` as the
top level directory. E.g.

.. code-block:: text
your-project/
├─ app/
├─ src/
├─ vendor/
└─ ...
Example
~~~~~~~

Expand Down Expand Up @@ -133,6 +114,25 @@ Example
In YAML you should put a space after ``{`` and before ``}`` (e.g. ``{ _controller: ... }``),
but this should not be done in Twig (e.g. ``{'hello' : 'value'}``).

Files and Directories
---------------------

* When referencing directories, always add a trailing slash to avoid confusions
with regular files (e.g. "execute the ``console`` script located at the ``app/``
directory").
* When referencing file extensions explicitly, you should include a leading dot
for every extension (e.g. "XML files use the ``.xml`` extension").
* When you list a Symfony file/directory hierarchy, use ``your-project/`` as the
top level directory. E.g.

.. code-block:: text
your-project/
├─ app/
├─ src/
├─ vendor/
└─ ...
Language Standards
------------------

Expand Down
27 changes: 14 additions & 13 deletions cookbook/configuration/override_dir_structure.rst
Expand Up @@ -10,18 +10,19 @@ directory structure is:

.. code-block:: text
app/
cache/
config/
logs/
...
src/
...
vendor/
...
web/
app.php
...
your-project/
├─ app/
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ ...
├─ src/
│ └─ ...
├─ vendor/
│ └─ ...
└─ web/
├─ app.php
└─ ...
.. _override-cache-dir:

Expand Down Expand Up @@ -94,7 +95,7 @@ may need to modify the paths inside these files::
You also need to change the ``extra.symfony-web-dir`` option in the ``composer.json``
file:

.. code-block:: json
.. code-block:: javascript
{
...
Expand Down
35 changes: 35 additions & 0 deletions reference/configuration/doctrine.rst
Expand Up @@ -411,3 +411,38 @@ Each connection is also accessible via the ``doctrine.dbal.[name]_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

Shortened Configuration Syntax
------------------------------

When you are only using one entity manager, all config options available
can be placed directly under ``doctrine.orm`` config level.

.. code-block:: yaml
doctrine:
orm:
# ...
query_cache_driver:
# ...
metadata_cache_driver:
# ...
result_cache_driver:
# ...
connection: ~
class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory
default_repository_class: Doctrine\ORM\EntityRepository
auto_mapping: false
hydrators:
# ...
mappings:
# ...
dql:
# ...
filters:
# ...
This shortened version is commonly used in other documentation sections.
Keep in mind that you can't use both syntaxes at the same time.

.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html
4 changes: 2 additions & 2 deletions reference/forms/types/options/pattern.rst.inc
Expand Up @@ -11,13 +11,13 @@ pattern
This adds an HTML5 ``pattern`` attribute to restrict the field input by a
given regular expression.

.. caution:
.. caution::

The ``pattern`` attribute provides client-side validation for convenience
purposes only and must not be used as a replacement for reliable
server-side validation.

.. note:
.. note::

When using validation constraints, this option is set automatically
for some constraints to match the server-side validation.
Expand Up @@ -7,6 +7,6 @@ This is the validation error message that's used if submitted POST form data
exceeds ``php.ini``'s ``post_max_size`` directive. The ``{{ max }}``
placeholder can be used to display the allowed size.

.. note:
.. note::

Validating the ``post_max_size`` only happens on the root form.

0 comments on commit 071f583

Please sign in to comment.