From 6e3bc9f29b58f8311d6d55f199202bb5f49a0652 Mon Sep 17 00:00:00 2001 From: daFish Date: Thu, 29 Nov 2012 16:25:30 +0100 Subject: [PATCH 001/106] Created paragraph for prototype customization. --- cookbook/form/form_collections.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 6871be7cdab..05263c39911 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -731,3 +731,11 @@ the relationship between the removed ``Tag`` and ``Task`` object. .. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html .. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ + +.. _cookbook-form-collections-custom-prototype + +Render a custom prototype +------------------------- + +Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. +Should you need to render a prototype for your own specific needs a From 931715a3a2a7058197bf393c279782b94082d918 Mon Sep 17 00:00:00 2001 From: daFish Date: Thu, 29 Nov 2012 16:48:42 +0100 Subject: [PATCH 002/106] Added twig-syntax for data-prototype. --- cookbook/form/form_collections.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 05263c39911..6c089be133c 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -739,3 +739,7 @@ Render a custom prototype Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. Should you need to render a prototype for your own specific needs a +But if you are in the situation were you need to have a complete custom prototype you can render it yourself: + + .. code-block:: html+jinja + data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" From f5c6876df271fc91115c6fe1481f893eecfe2ed2 Mon Sep 17 00:00:00 2001 From: daFish Date: Mon, 3 Dec 2012 15:33:31 +0100 Subject: [PATCH 003/106] Added reusing of prototype template for displaying items from collection. --- cookbook/form/form_collections.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 6c089be133c..4be38eb50ef 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -743,3 +743,13 @@ But if you are in the situation were you need to have a complete custom prototyp .. code-block:: html+jinja data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" + +The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can +also use this markup to render the contents of the collection when it already holds items: + +.. code-block:: html+jinja + {% for task in tasks %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %} + {% endfor %} + +This makes sure the displayed items are the same as the newly inserted from the prototype. From 83ae1062d9711f459f9b04e60f8ebaa2b121f046 Mon Sep 17 00:00:00 2001 From: daFish Date: Mon, 3 Dec 2012 15:38:07 +0100 Subject: [PATCH 004/106] Formatting. --- cookbook/form/form_collections.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 4be38eb50ef..78c082ba108 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -737,19 +737,22 @@ the relationship between the removed ``Tag`` and ``Task`` object. Render a custom prototype ------------------------- -Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. -Should you need to render a prototype for your own specific needs a -But if you are in the situation were you need to have a complete custom prototype you can render it yourself: +Most of the time the provided prototype will be sufficient for your needs +and does not need to be changed. But if you are in the situation were +you need to have a complete custom prototype you can render it yourself: .. code-block:: html+jinja data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" -The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can -also use this markup to render the contents of the collection when it already holds items: +The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the +markup used for the prototype. This way you can not only easily structure +your prototype-markup, you can also use this markup to render the +contents of the collection when it already holds items: .. code-block:: html+jinja {% for task in tasks %} {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %} {% endfor %} -This makes sure the displayed items are the same as the newly inserted from the prototype. +This makes sure the displayed items are the same as the newly inserted +from the prototype. From e42a5a5b7f65a073e66576d8a5846fb85c73583f Mon Sep 17 00:00:00 2001 From: daFish Date: Tue, 4 Dec 2012 13:42:00 +0100 Subject: [PATCH 005/106] Use double ticks for inline code. --- cookbook/form/form_collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 78c082ba108..4a934be3e09 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -744,7 +744,7 @@ you need to have a complete custom prototype you can render it yourself: .. code-block:: html+jinja data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" -The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the +The included ``AcmeTaskBundle:Task:prototypeTask.html.twig`` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can also use this markup to render the contents of the collection when it already holds items: From e222ee1eea6f28003b1d00c7464547c77e9cb134 Mon Sep 17 00:00:00 2001 From: daFish Date: Tue, 4 Dec 2012 14:58:45 +0100 Subject: [PATCH 006/106] Moved hyperlink to the bottom. Correctly formatted source code examples. --- cookbook/form/form_collections.rst | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 4a934be3e09..ddff2938167 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -729,9 +729,6 @@ the relationship between the removed ``Tag`` and ``Task`` object. updated (whether you're adding new tags or removing existing tags) on each Tag object itself. -.. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html -.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ - .. _cookbook-form-collections-custom-prototype Render a custom prototype @@ -741,8 +738,13 @@ Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. But if you are in the situation were you need to have a complete custom prototype you can render it yourself: - .. code-block:: html+jinja - data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" +.. code-block:: html+jinja + + data-prototype="{% filter escape %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' + with { 'form': form.task.get('prototype') } + %} + {% endfilter %}" The included ``AcmeTaskBundle:Task:prototypeTask.html.twig`` contains the markup used for the prototype. This way you can not only easily structure @@ -750,9 +752,15 @@ your prototype-markup, you can also use this markup to render the contents of the collection when it already holds items: .. code-block:: html+jinja + {% for task in tasks %} - {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' + with { 'form': form.task.vars.form } + %} {% endfor %} This makes sure the displayed items are the same as the newly inserted from the prototype. + +.. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html +.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From a4f53b55a3fdc59ad6f367f78641507623972958 Mon Sep 17 00:00:00 2001 From: daFish Date: Wed, 2 Jan 2013 16:32:13 +0100 Subject: [PATCH 007/106] Added PHP examples. Added example for prototype template. --- cookbook/form/form_collections.rst | 41 +++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index ddff2938167..a1432fc4215 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -740,15 +740,42 @@ you need to have a complete custom prototype you can render it yourself: .. code-block:: html+jinja + data-prototype="{% filter escape %} {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' - with { 'form': form.task.get('prototype') } + with { 'task': form.task.get('prototype') } %} {% endfilter %}" -The included ``AcmeTaskBundle:Task:prototypeTask.html.twig`` contains the -markup used for the prototype. This way you can not only easily structure -your prototype-markup, you can also use this markup to render the +.. code-block:: html+php + + + data-prototype="render( + 'AcmeTaskBundle:Task:prototypeTask.html.php', + array('task' => $form->task->get('prototype') + ); + + echo $view->escape($prototype); + ?>" + +To be not confused let's have a look how the prototype-template might look like. + +.. code-block:: html+jinja + + {{ form_widget(task.task) }} + {{ form_widget(task.dueDate) }} + + +.. code-block:: html+php + + widget($task->getTask()) ?> + widget($task->getDueDate()) ?> + + +The included template contains the markup used for the prototype. +This way you can not only easily structure your prototype-markup, +you can also use this markup to render the contents of the collection when it already holds items: .. code-block:: html+jinja @@ -759,6 +786,12 @@ contents of the collection when it already holds items: %} {% endfor %} +.. code-block:: html+php + + + render('AcmeTaskBundle:Task:prototypeTask.html.php', array('form' => $form->task->vars->form)); ?> + + This makes sure the displayed items are the same as the newly inserted from the prototype. From 52f17a3b3c952117ec1e7e71b2e628a510a6b6a7 Mon Sep 17 00:00:00 2001 From: daFish Date: Fri, 22 Aug 2014 12:35:52 +0200 Subject: [PATCH 008/106] Added missing closing paranthesis --- cookbook/form/form_collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index a1432fc4215..4277a835d2a 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -753,7 +753,7 @@ you need to have a complete custom prototype you can render it yourself: data-prototype="render( 'AcmeTaskBundle:Task:prototypeTask.html.php', - array('task' => $form->task->get('prototype') + array('task' => $form->task->get('prototype')) ); echo $view->escape($prototype); From 9ddfc58ff8cea3c509b5ef263c9e4aacebb5dbf4 Mon Sep 17 00:00:00 2001 From: daFish Date: Fri, 22 Aug 2014 13:42:42 +0200 Subject: [PATCH 009/106] Fixed code blocks syntax. --- cookbook/form/form_collections.rst | 85 ++++++++++++++++-------------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 4277a835d2a..a0c31d85e00 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -729,7 +729,7 @@ the relationship between the removed ``Tag`` and ``Task`` object. updated (whether you're adding new tags or removing existing tags) on each Tag object itself. -.. _cookbook-form-collections-custom-prototype +.. _cookbook-form-collections-custom-prototype: Render a custom prototype ------------------------- @@ -738,62 +738,67 @@ Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. But if you are in the situation were you need to have a complete custom prototype you can render it yourself: -.. code-block:: html+jinja +.. configuration-block:: + + .. code-block:: html+jinja - - data-prototype="{% filter escape %} - {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' - with { 'task': form.task.get('prototype') } - %} - {% endfilter %}" + + data-prototype="{% filter escape %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' + with { 'task': form.task.get('prototype') } + %} + {% endfilter %}" -.. code-block:: html+php + .. code-block:: html+php - - data-prototype="render( - 'AcmeTaskBundle:Task:prototypeTask.html.php', - array('task' => $form->task->get('prototype')) - ); + + data-prototype="render( + 'AcmeTaskBundle:Task:prototypeTask.html.php', + array('task' => $form->task->get('prototype')) + ); - echo $view->escape($prototype); - ?>" + echo $view->escape($prototype); + ?>" To be not confused let's have a look how the prototype-template might look like. -.. code-block:: html+jinja - - {{ form_widget(task.task) }} - {{ form_widget(task.dueDate) }} - +.. configuration-block:: + + .. code-block:: html+jinja -.. code-block:: html+php - - widget($task->getTask()) ?> - widget($task->getDueDate()) ?> - + + {{ form_widget(task.task) }} + {{ form_widget(task.dueDate) }} + + + .. code-block:: html+php + + + widget($task->getTask()) ?> + widget($task->getDueDate()) ?> + The included template contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can also use this markup to render the contents of the collection when it already holds items: -.. code-block:: html+jinja +.. configuration-block:: - {% for task in tasks %} - {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' - with { 'form': form.task.vars.form } - %} - {% endfor %} + .. code-block:: html+jinja -.. code-block:: html+php + {% for task in tasks %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' + with { 'form': form.task.vars.form } + %} + {% endfor %} - - render('AcmeTaskBundle:Task:prototypeTask.html.php', array('form' => $form->task->vars->form)); ?> - + .. code-block:: html+php + + + render('AcmeTaskBundle:Task:prototypeTask.html.php', array('form' => $form->task->vars->form)); ?> + This makes sure the displayed items are the same as the newly inserted from the prototype. - -.. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html -.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From 3272cfc1948ab26d679369171cc3be5ce30384e6 Mon Sep 17 00:00:00 2001 From: daFish Date: Fri, 22 Aug 2014 13:51:30 +0200 Subject: [PATCH 010/106] Readded missing link targets. --- cookbook/form/form_collections.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index a0c31d85e00..9571ab4b551 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -802,3 +802,6 @@ contents of the collection when it already holds items: This makes sure the displayed items are the same as the newly inserted from the prototype. + +.. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html +.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From c483a90ec3794db51e2e5bc44c100069124acf00 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Thu, 31 Jul 2014 23:06:46 +0200 Subject: [PATCH 011/106] Removed outdated translations from the official list --- contributing/documentation/translations.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/contributing/documentation/translations.rst b/contributing/documentation/translations.rst index c1c434ce35b..52e17828bf6 100644 --- a/contributing/documentation/translations.rst +++ b/contributing/documentation/translations.rst @@ -20,9 +20,7 @@ for. Here is the list of the official *master* repositories: * *French*: https://github.com/symfony-fr/symfony-docs-fr * *Italian*: https://github.com/garak/symfony-docs-it * *Japanese*: https://github.com/symfony-japan/symfony-docs-ja -* *Polish*: https://github.com/symfony-docs-pl/symfony-docs-pl * *Portuguese (Brazilian)*: https://github.com/andreia/symfony-docs-pt-BR -* *Spanish*: https://github.com/gitnacho/symfony-docs-es .. note:: From 9b0cef44903c7f83854756cfa4a607f1d61cd6fe Mon Sep 17 00:00:00 2001 From: giosh94mhz Date: Mon, 18 Aug 2014 18:10:42 +0200 Subject: [PATCH 012/106] Fix documentation for group_sequence_provider --- book/validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/validation.rst b/book/validation.rst index 6c58296c5ab..d3a39f33c22 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -1118,7 +1118,7 @@ provides a sequence of groups to be validated: # src/Acme/DemoBundle/Resources/config/validation.yml Acme\DemoBundle\Entity\User: - group_sequence_provider: ~ + group_sequence_provider: true .. code-block:: php-annotations From 30e993d17be8f754b0b998b760257a135d61f90d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 17 Aug 2014 08:45:09 +0200 Subject: [PATCH 013/106] document multiple recipients in XML configs Adds an example on how to configure multiple recipients in Monolog for sending log entries as e-mails. --- cookbook/logging/monolog_email.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cookbook/logging/monolog_email.rst b/cookbook/logging/monolog_email.rst index 7ce812c3672..739de0e2934 100644 --- a/cookbook/logging/monolog_email.rst +++ b/cookbook/logging/monolog_email.rst @@ -176,10 +176,18 @@ get logged on the server as well as the emails being sent: + level="debug"> + + error@example.com + + + + From 2c69be5bc633c557223da3115c270d88b6313fca Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 17 Aug 2014 20:19:07 +0200 Subject: [PATCH 014/106] tweaks for the web server configuration chapter --- .../web_server_configuration.rst | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/cookbook/configuration/web_server_configuration.rst b/cookbook/configuration/web_server_configuration.rst index 6bd96876195..9c9fcfb4af8 100644 --- a/cookbook/configuration/web_server_configuration.rst +++ b/cookbook/configuration/web_server_configuration.rst @@ -4,12 +4,28 @@ Configuring a Web Server ======================== -The web directory is the home of all of your application's public and static -files. Including images, stylesheets and JavaScript files. It is also where the -front controllers live. For more details, see the :ref:`the-web-directory`. +The preferred way to develop your Symfony2 application is to use +:doc:`PHP's internal web server `. However, +when using an older PHP version or when running the application in the production +environment, you'll need to use a fully-featured web server. This article +describes several ways to use Symfony with Apache2 or Nginx. -The web directory services as the document root when configuring your web -server. In the examples below, this directory is in ``/var/www/project/web/``. +When using Apache2, you can configure PHP as an +:ref:`Apache module ` or with FastCGI using +:ref:`PHP FPM `. FastCGI also is the preferred way +to use PHP :ref:`with Nginx `. + +.. sidebar:: The Web Directory + + The web directory is the home of all of your application's public and + static files, including images, stylesheets and JavaScript files. It is + also where the front controllers live. For more details, see the :ref:`the-web-directory`. + + The web directory services as the document root when configuring your + web server. In the examples below, the ``web/`` directory will be the + document root. This directory is ``/var/www/project/web/``. + +.. _web-server-apache-mod-php: Apache2 with mod_php/PHP-CGI ---------------------------- @@ -63,6 +79,8 @@ following configuration snippet: Require all granted +.. _web-server-apache-fpm: + Apache2 with PHP-FPM -------------------- @@ -164,6 +182,8 @@ instead: FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization +.. _web-server-nginx: + Nginx ----- From cb2ba28ce83f804b489a467a979e1cce1b01b370 Mon Sep 17 00:00:00 2001 From: Ahmed Siouani Date: Fri, 22 Aug 2014 13:59:12 +0200 Subject: [PATCH 015/106] Fixed minor typos. --- components/translation/introduction.rst | 8 ++++++++ reference/forms/types/options/inherit_data.rst.inc | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/translation/introduction.rst b/components/translation/introduction.rst index a0deba774b8..b482ffc458f 100644 --- a/components/translation/introduction.rst +++ b/components/translation/introduction.rst @@ -93,6 +93,14 @@ Loader too. The default loaders are: * :class:`Symfony\\Component\\Translation\\Loader\\YamlFileLoader` - to load catalogs from Yaml files (requires the :doc:`Yaml component`). +<<<<<<< HEAD +======= +.. versionadded:: 2.1 + The ``IcuDatFileLoader``, ``IcuResFileLoader``, ``IniFileLoader``, + ``MoFileLoader``, ``PoFileLoader`` and ``QtFileLoader`` were introduced + in Symfony 2.1. + +>>>>>>> Fixed minor typos. All file loaders require the :doc:`Config component `. At first, you should add one or more loaders to the ``Translator``:: diff --git a/reference/forms/types/options/inherit_data.rst.inc b/reference/forms/types/options/inherit_data.rst.inc index 3b789db9f25..9f5f1510ca8 100644 --- a/reference/forms/types/options/inherit_data.rst.inc +++ b/reference/forms/types/options/inherit_data.rst.inc @@ -8,5 +8,5 @@ inherit_data **type**: ``boolean`` **default**: ``false`` This option determines if the form will inherit data from its parent form. -This can be useful is you have a set of fields that are duplicated across +This can be useful if you have a set of fields that are duplicated across multiple forms. See :doc:`/cookbook/form/inherit_data_option`. From 0a4acc3aa8d925c6f4545e33e4d0ec2eb43a3d25 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 22 Aug 2014 14:48:15 -0400 Subject: [PATCH 016/106] Removing extra whitespace --- reference/forms/types/options/attr.rst.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/reference/forms/types/options/attr.rst.inc b/reference/forms/types/options/attr.rst.inc index eff44141f4e..03a13d4b9b6 100644 --- a/reference/forms/types/options/attr.rst.inc +++ b/reference/forms/types/options/attr.rst.inc @@ -10,6 +10,3 @@ 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'), )); - - - From ca43765a840589152ebb32436b7e4d09068e7a7e Mon Sep 17 00:00:00 2001 From: Peter Rehm Date: Wed, 20 Aug 2014 08:30:31 +0200 Subject: [PATCH 017/106] Added the schema_filter option to the reference --- reference/configuration/doctrine.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 40a291a2076..0390098bdab 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -21,6 +21,9 @@ Full default configuration some_custom_type: class: Acme\HelloBundle\MyCustomType commented: true + # If enabled all tables not prefixed with sf2_ will be ignored by the schema + # tool. This is for custom tables which should not be altered automatically. + #schema_filter: ^sf2_ connections: default: From 8e019f5d5167aa429b052c311ee1eda5e47eb6dc Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Fri, 22 Aug 2014 21:11:18 +0200 Subject: [PATCH 018/106] Added custom format page to translation component --- components/translation/custom_formats.rst | 112 ++++++++++++++++++++++ components/translation/index.rst | 1 + 2 files changed, 113 insertions(+) create mode 100644 components/translation/custom_formats.rst diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst new file mode 100644 index 00000000000..c7fda423d85 --- /dev/null +++ b/components/translation/custom_formats.rst @@ -0,0 +1,112 @@ +.. index:: + single: Translation; Custom formats + +Custom formats +============== + +Sometimes, you need to deal with custom formats for translation files. The +Translation component is flexible enough to support this, just creating a +loader (to load translations) and, optionally, a dumper (to dump translations). + +Let's imagine you have a custom format where translation messages are defined +using one line for each translation and parenthesis to wrap the key and the +message. A translation file would look like this: + + (welcome)(Bienvenido) + (goodbye)(Adios) + (hello)(Hola) + +To define a custom loader able to read this kind of files, you must create a +new class that implements the +:class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface` interface, +which defines a +:method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load` +method. In the loader, this method will get a filename and parse it to create an +array. Then, it will create the catalog that will be returned. + + use Symfony\Component\Translation\MessageCatalogue; + use Symfony\Component\Translation\Loader\LoaderInterface; + + class MyFormatLoader implements LoaderInterface + { + + public function load($resource, $locale, $domain = 'messages') + { + $messages = array(); + $lines = file($resource); + + foreach ($lines as $line) { + if (preg_match('/\(([^\)]+)\)\(([^\)]+)\)/', $line, $matches)) { + $messages[$matches[1]] = $matches[2]; + } + } + + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + return $catalogue; + } + + } + +Once created, it can be used as any other loader:: + + $translator = new Translator('es_ES'); + $translator->addLoader('my_format', new MyFormatLoader()); + + $translator->addResource('my_format', __DIR__.'/translations/messages.txt', 'es_ES'); + + echo $translator->trans('welcome'); + +It will print *"Bienvenido"*. + +It is also possible to create a custom dumper for your format. To do so, +a new class implementing the +DumperInterface +:class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` +interface must be created. +To write the dump contents into a file, extending the +:class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class +will save a few lines. + + use Symfony\Component\Translation\MessageCatalogue; + use Symfony\Component\Translation\Dumper\FileDumper; + + class MyFormatDumper extends FileDumper + { + + public function format(MessageCatalogue $messages, $domain = 'messages') + { + $output = ''; + + foreach ($messages->all($domain) as $source => $target) { + $output .= sprintf("(%s)(%s)\n", $source, $target); + } + + return $output; + } + + protected function getExtension() + { + return 'txt'; + } + } + +The :method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::format` +method creates the output string, that will be used by the +:method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::dump` method +of the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class to +create the file. The dumper can be used like any other +built-in dumper. In this example, the translation messages defined in the YAML file +are dumped into a text file with the custom format:: + + use Symfony\Component\Translation\Loader\YamlFileLoader; + use RaulFraile\Dumper\CustomDumper; + + include_once __DIR__. '/vendor/autoload.php'; + + $loader = new YamlFileLoader(); + $catalogue = $loader->load(__DIR__ . '/translations/messages.es_ES.yml' , 'es_ES'); + + $dumper = new CustomDumper(); + $dumper->dump($catalogue, array('path' => __DIR__.'/dumps')); diff --git a/components/translation/index.rst b/components/translation/index.rst index 3f87cbc1425..c50e43f2be7 100644 --- a/components/translation/index.rst +++ b/components/translation/index.rst @@ -6,3 +6,4 @@ Translation introduction usage + custom_formats From dd161e3fa19b64b1eb7952b62aebebc25f35e0d4 Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Fri, 22 Aug 2014 21:13:56 +0200 Subject: [PATCH 019/106] Link from introduction section --- components/translation/introduction.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/translation/introduction.rst b/components/translation/introduction.rst index b482ffc458f..b91e8a56dc9 100644 --- a/components/translation/introduction.rst +++ b/components/translation/introduction.rst @@ -62,11 +62,17 @@ The Translation component uses Loader classes to load catalogs. You can load multiple resources for the same locale, which will then be combined into one catalog. +<<<<<<< HEAD .. versionadded:: 2.4 The ``JsonFileLoader`` was introduced in Symfony 2.4. The component comes with some default Loaders and you can create your own Loader too. The default loaders are: +======= +The component comes with some default Loaders and you can +:doc:`create your own Loader too`. The +default loaders are: +>>>>>>> Link from introduction section * :class:`Symfony\\Component\\Translation\\Loader\\ArrayLoader` - to load catalogs from PHP arrays. From 20a338531ab127dc55786e273eff2e6542be5efe Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Fri, 22 Aug 2014 21:17:39 +0200 Subject: [PATCH 020/106] Small fixes --- components/translation/custom_formats.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index c7fda423d85..28e03c13ede 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -10,7 +10,7 @@ loader (to load translations) and, optionally, a dumper (to dump translations). Let's imagine you have a custom format where translation messages are defined using one line for each translation and parenthesis to wrap the key and the -message. A translation file would look like this: +message. A translation file would look like this:: (welcome)(Bienvenido) (goodbye)(Adios) @@ -22,14 +22,13 @@ new class that implements the which defines a :method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load` method. In the loader, this method will get a filename and parse it to create an -array. Then, it will create the catalog that will be returned. +array. Then, it will create the catalog that will be returned:: use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Loader\LoaderInterface; class MyFormatLoader implements LoaderInterface { - public function load($resource, $locale, $domain = 'messages') { $messages = array(); @@ -62,12 +61,11 @@ It will print *"Bienvenido"*. It is also possible to create a custom dumper for your format. To do so, a new class implementing the -DumperInterface :class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` interface must be created. To write the dump contents into a file, extending the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class -will save a few lines. +will save a few lines:: use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\FileDumper; From 3b105c7535a90766143bc6f766967d065024270f Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Fri, 22 Aug 2014 21:23:50 +0200 Subject: [PATCH 021/106] Cleanups --- components/translation/custom_formats.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index 28e03c13ede..8a1520e3a1e 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -99,12 +99,11 @@ built-in dumper. In this example, the translation messages defined in the YAML f are dumped into a text file with the custom format:: use Symfony\Component\Translation\Loader\YamlFileLoader; - use RaulFraile\Dumper\CustomDumper; include_once __DIR__. '/vendor/autoload.php'; $loader = new YamlFileLoader(); $catalogue = $loader->load(__DIR__ . '/translations/messages.es_ES.yml' , 'es_ES'); - $dumper = new CustomDumper(); + $dumper = new MyFormatDumper(); $dumper->dump($catalogue, array('path' => __DIR__.'/dumps')); From afd0365921796b73bc78d0a05765062bd11b89c2 Mon Sep 17 00:00:00 2001 From: Vyacheslav Pavlov Date: Sat, 23 Aug 2014 17:19:21 +0400 Subject: [PATCH 022/106] Fixed version for composer install --- quick_tour/the_big_picture.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 7ecba9e88dd..9ea176cdbd7 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -18,7 +18,11 @@ directory: .. code-block:: bash +<<<<<<< HEAD $ composer create-project symfony/framework-standard-edition myproject/ '~2.5' +======= + $ composer create-project symfony/framework-standard-edition myproject/ '~2.3' +>>>>>>> Fixed version for composer install .. note:: From f560f827c84c35d976f53af19879cf4faa491f18 Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Sat, 23 Aug 2014 22:15:35 +0200 Subject: [PATCH 023/106] Improvements based on comments --- components/map.rst.inc | 1 + components/translation/custom_formats.rst | 23 +++++++++++++++-------- components/translation/introduction.rst | 5 +++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/components/map.rst.inc b/components/map.rst.inc index fe243a501b3..f9eab711e07 100644 --- a/components/map.rst.inc +++ b/components/map.rst.inc @@ -141,6 +141,7 @@ * :doc:`/components/translation/introduction` * :doc:`/components/translation/usage` + * :doc:`/components/translation/custom_formats` * :doc:`/components/yaml/index` diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index 8a1520e3a1e..18ce1353e39 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -1,7 +1,7 @@ .. index:: single: Translation; Custom formats -Custom formats +Custom Formats ============== Sometimes, you need to deal with custom formats for translation files. The @@ -10,19 +10,23 @@ loader (to load translations) and, optionally, a dumper (to dump translations). Let's imagine you have a custom format where translation messages are defined using one line for each translation and parenthesis to wrap the key and the -message. A translation file would look like this:: +message. A translation file would look like this: + +.. code-block:: text (welcome)(Bienvenido) (goodbye)(Adios) (hello)(Hola) +Custom Loader +------------- + To define a custom loader able to read this kind of files, you must create a new class that implements the -:class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface` interface, -which defines a +:class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface`. The :method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load` -method. In the loader, this method will get a filename and parse it to create an -array. Then, it will create the catalog that will be returned:: +method will get a filename and parse it into an array. Then, it will +create the catalogue that will be returned:: use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Loader\LoaderInterface; @@ -59,8 +63,11 @@ Once created, it can be used as any other loader:: It will print *"Bienvenido"*. -It is also possible to create a custom dumper for your format. To do so, -a new class implementing the +Custom Dumper +------------- + +It is also possible to create a custom dumper for your format, useful when using +the extraction commands. To do so, a new class implementing the :class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` interface must be created. To write the dump contents into a file, extending the diff --git a/components/translation/introduction.rst b/components/translation/introduction.rst index b91e8a56dc9..a54b4056faf 100644 --- a/components/translation/introduction.rst +++ b/components/translation/introduction.rst @@ -62,6 +62,7 @@ The Translation component uses Loader classes to load catalogs. You can load multiple resources for the same locale, which will then be combined into one catalog. +<<<<<<< HEAD <<<<<<< HEAD .. versionadded:: 2.4 The ``JsonFileLoader`` was introduced in Symfony 2.4. @@ -71,6 +72,10 @@ Loader too. The default loaders are: ======= The component comes with some default Loaders and you can :doc:`create your own Loader too`. The +======= +The component comes with some default loaders and you can +:doc:`create your own Loader too `. The +>>>>>>> Improvements based on comments default loaders are: >>>>>>> Link from introduction section From 981739a8a27d869ed55dc3dacc72ddfaf40d194f Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Sun, 24 Aug 2014 08:16:49 +0200 Subject: [PATCH 024/106] Extra improvements based on comments --- components/translation/custom_formats.rst | 33 +++++++++++------------ components/translation/introduction.rst | 7 +++++ 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index 18ce1353e39..67bd358cc8a 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -5,28 +5,28 @@ Custom Formats ============== Sometimes, you need to deal with custom formats for translation files. The -Translation component is flexible enough to support this, just creating a +Translation component is flexible enough to support this. Just create a loader (to load translations) and, optionally, a dumper (to dump translations). -Let's imagine you have a custom format where translation messages are defined -using one line for each translation and parenthesis to wrap the key and the +Imagine that you have a custom format where translation messages are defined +using one line for each translation and parentheses to wrap the key and the message. A translation file would look like this: .. code-block:: text (welcome)(Bienvenido) - (goodbye)(Adios) + (goodbye)(Adiós) (hello)(Hola) Custom Loader ------------- -To define a custom loader able to read this kind of files, you must create a +To define a custom loader that is able to read this kind of files, you must create a new class that implements the :class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface`. The :method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load` method will get a filename and parse it into an array. Then, it will -create the catalogue that will be returned:: +create the catalog that will be returned:: use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Loader\LoaderInterface; @@ -54,6 +54,8 @@ create the catalogue that will be returned:: Once created, it can be used as any other loader:: + use Symfony\Component\Translation\Translator; + $translator = new Translator('es_ES'); $translator->addLoader('my_format', new MyFormatLoader()); @@ -66,10 +68,11 @@ It will print *"Bienvenido"*. Custom Dumper ------------- -It is also possible to create a custom dumper for your format, useful when using -the extraction commands. To do so, a new class implementing the +It is also possible to create a custom dumper for your format, which is +useful when using the extraction commands. To do so, a new class +implementing the :class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` -interface must be created. + must be created. To write the dump contents into a file, extending the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class will save a few lines:: @@ -79,8 +82,7 @@ will save a few lines:: class MyFormatDumper extends FileDumper { - - public function format(MessageCatalogue $messages, $domain = 'messages') + protected function format(MessageCatalogue $messages, $domain = 'messages') { $output = ''; @@ -100,15 +102,12 @@ will save a few lines:: The :method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::format` method creates the output string, that will be used by the :method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::dump` method -of the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class to -create the file. The dumper can be used like any other -built-in dumper. In this example, the translation messages defined in the YAML file -are dumped into a text file with the custom format:: +of the FileDumper class to create the file. The dumper can be used like any other +built-in dumper. In the following example, the translation messages defined in the +YAML file are dumped into a text file with the custom format:: use Symfony\Component\Translation\Loader\YamlFileLoader; - include_once __DIR__. '/vendor/autoload.php'; - $loader = new YamlFileLoader(); $catalogue = $loader->load(__DIR__ . '/translations/messages.es_ES.yml' , 'es_ES'); diff --git a/components/translation/introduction.rst b/components/translation/introduction.rst index a54b4056faf..f4a771efa23 100644 --- a/components/translation/introduction.rst +++ b/components/translation/introduction.rst @@ -62,6 +62,7 @@ The Translation component uses Loader classes to load catalogs. You can load multiple resources for the same locale, which will then be combined into one catalog. +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD .. versionadded:: 2.4 @@ -78,6 +79,9 @@ The component comes with some default loaders and you can >>>>>>> Improvements based on comments default loaders are: >>>>>>> Link from introduction section +======= +The component comes with some default loaders: +>>>>>>> Extra improvements based on comments * :class:`Symfony\\Component\\Translation\\Loader\\ArrayLoader` - to load catalogs from PHP arrays. @@ -114,6 +118,9 @@ default loaders are: >>>>>>> Fixed minor typos. All file loaders require the :doc:`Config component `. +You can also :doc:`create your own Loader `, +in case the format is not already supported by one of the default loaders. + At first, you should add one or more loaders to the ``Translator``:: // ... From d6de597f50c4b0a369b9eed3e68ad67df76b8b74 Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Sun, 24 Aug 2014 08:25:15 +0200 Subject: [PATCH 025/106] Fixed wrong indentation --- components/translation/custom_formats.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index 67bd358cc8a..4ea7574d768 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -72,7 +72,7 @@ It is also possible to create a custom dumper for your format, which is useful when using the extraction commands. To do so, a new class implementing the :class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` - must be created. +must be created. To write the dump contents into a file, extending the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class will save a few lines:: From fa24ac6fff0a6fdce04d1bc46bbe9e9395a13495 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Mon, 25 Aug 2014 12:14:01 +0200 Subject: [PATCH 026/106] Updated for CMF doc refactoring --- redirection_map | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/redirection_map b/redirection_map index e632d829662..1a6758a5560 100644 --- a/redirection_map +++ b/redirection_map @@ -22,3 +22,25 @@ /cookbook/console/generating_urls /cookbook/console/sending_emails /components/yaml /components/yaml/introduction /components/templating /components/templating/introduction +/cmf/reference/configuration/block /cmf/bundles/block/configuration +/cmf/reference/configuration/content /cmf/bundles/content/configuration +/cmf/reference/configuration/core /cmf/bundles/core/configuration +/cmf/reference/configuration/create /cmf/bundles/create/configuration +/cmf/reference/configuration/media /cmf/bundles/media/configuration +/cmf/reference/configuration/menu /cmf/bundles/menu/configuration +/cmf/reference/configuration/phpcr_odm /cmf/bundles/phpcr_odm/configuration +/cmf/reference/configuration/routing /cmf/bundles/routing/configuration +/cmf/reference/configuration/search /cmf/bundles/search/configuration +/cmf/reference/configuration/seo /cmf/bundles/seo/configuration +/cmf/reference/configuration/simple_cms /cmf/bundles/simple_cms/configuration +/cmf/reference/configuration/tree_browser /cmf/bundles/tree_browser/configuration +/cmf/cookbook/exposing_content_via_rest /cmf/bundles/content/exposing_content_via_rest +/cmf/cookbook/creating_a_cms/auto-routing /cmf/tutorial/auto-routing +/cmf/cookbook/creating_a_cms/conclusion /cmf/tutorial/conclusion +/cmf/cookbook/creating_a_cms/content-to-controllers /cmf/tutorial/content-to-controllers +/cmf/cookbook/creating_a_cms/getting-started /cmf/tutorial/getting-started +/cmf/cookbook/creating_a_cms/index /cmf/tutorial/index +/cmf/cookbook/creating_a_cms/introduction /cmf/tutorial/introduction +/cmf/cookbook/creating_a_cms/make-homepage /cmf/tutorial/make-homepage +/cmf/cookbook/creating_a_cms/sonata-admin /cmf/tutorial/sonata-admin +/cmf/cookbook/creating_a_cms/the-frontend /cmf/tutorial/the-frontend From 0a4d5c5bd9a7113b87838a12839cad9f63e82b97 Mon Sep 17 00:00:00 2001 From: Ronan Guilloux Date: Wed, 20 Aug 2014 16:19:44 +0200 Subject: [PATCH 027/106] Adding 'attr' option to the Textarea options list `attr` is a quite useful option, but not yet listed here. BTW, the `attr.rst.inc` file already includes an `attr` conf. example concerning textareas. --- reference/forms/types/textarea.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/textarea.rst b/reference/forms/types/textarea.rst index 71a4069b995..a75ffbb0f27 100644 --- a/reference/forms/types/textarea.rst +++ b/reference/forms/types/textarea.rst @@ -9,8 +9,9 @@ Renders a ``textarea`` HTML element. +-------------+------------------------------------------------------------------------+ | Rendered as | ``textarea`` tag | +-------------+------------------------------------------------------------------------+ -| Inherited | - `data`_ | -| options | - `disabled`_ | +| Inherited | - `attr`_ | +| options | - `data`_ | +| | - `disabled`_ | | | - `empty_data`_ | | | - `error_bubbling`_ | | | - `error_mapping`_ | @@ -32,6 +33,8 @@ Inherited Options These options inherit from the :doc:`form ` type: +.. include:: /reference/forms/types/options/attr.rst.inc + .. include:: /reference/forms/types/options/data.rst.inc .. include:: /reference/forms/types/options/disabled.rst.inc From f93cca0de9cee614d335baf48017408503a4b645 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 21 Aug 2014 23:13:59 +0200 Subject: [PATCH 028/106] [Reference] consistent & complete config examples --- reference/configuration/doctrine.rst | 57 ++-- reference/configuration/framework.rst | 59 +++- reference/configuration/swiftmailer.rst | 52 ++-- reference/constraints/All.rst | 10 +- reference/constraints/Blank.rst | 2 +- reference/constraints/Callback.rst | 27 ++ reference/constraints/Collection.rst | 15 +- reference/constraints/Country.rst | 4 +- reference/constraints/Currency.rst | 20 +- reference/constraints/Email.rst | 4 +- reference/constraints/EqualTo.rst | 24 +- reference/constraints/False.rst | 2 +- reference/constraints/GreaterThan.rst | 22 +- reference/constraints/GreaterThanOrEqual.rst | 22 +- reference/constraints/Iban.rst | 36 ++- reference/constraints/IdenticalTo.rst | 24 +- reference/constraints/Image.rst | 7 +- reference/constraints/Ip.rst | 8 +- reference/constraints/Isbn.rst | 20 ++ reference/constraints/Issn.rst | 18 +- reference/constraints/Language.rst | 10 +- reference/constraints/Length.rst | 20 +- reference/constraints/LessThan.rst | 22 +- reference/constraints/LessThanOrEqual.rst | 22 +- reference/constraints/Locale.rst | 10 +- reference/constraints/Luhn.rst | 4 +- reference/constraints/NotBlank.rst | 2 +- reference/constraints/NotEqualTo.rst | 24 +- reference/constraints/NotIdenticalTo.rst | 24 +- reference/constraints/NotNull.rst | 2 +- reference/constraints/Null.rst | 4 +- reference/constraints/Range.rst | 16 +- reference/constraints/Regex.rst | 14 +- reference/constraints/True.rst | 7 +- reference/constraints/Type.rst | 4 +- reference/constraints/UniqueEntity.rst | 4 +- reference/constraints/Url.rst | 10 +- reference/constraints/UserPassword.rst | 10 +- reference/constraints/Valid.rst | 10 +- reference/dic_tags.rst | 306 +++++++++++++++---- 40 files changed, 644 insertions(+), 314 deletions(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 0390098bdab..0c34d6cd7ab 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -359,32 +359,37 @@ The following block shows all possible configuration keys: .. code-block:: xml - - - - - - bar - string - Acme\HelloBundle\MyCustomType - - + + + + + + + bar + string + Acme\HelloBundle\MyCustomType + + + If you want to configure multiple connections in YAML, put them under the ``connections`` key and give them a unique name: diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 1353b62452d..204c91aecc2 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -104,21 +104,26 @@ have installed `PhpStormOpener`_ and use PHPstorm, you will do something like: .. code-block:: yaml + # app/config/config.yml framework: ide: "pstorm://%%f:%%l" .. code-block:: xml - - + + + - .. code-block:: php + // app/config/config.php $container->loadFromExtension('framework', array( 'ide' => 'pstorm://%%f:%%l', )); @@ -158,17 +163,26 @@ see :doc:`/cookbook/request/load_balancer_reverse_proxy`. .. code-block:: yaml + # app/config/config.yml framework: trusted_proxies: [192.0.0.1, 10.0.0.0/8] .. code-block:: xml - - - + + + + + + .. code-block:: php + // app/config/config.php $container->loadFromExtension('framework', array( 'trusted_proxies' => array('192.0.0.1', '10.0.0.0/8'), )); @@ -285,9 +299,17 @@ the value to ``null``: .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -373,15 +395,24 @@ Now, activate the ``assets_version`` option: .. code-block:: xml - - - + + + + + + twig + + .. code-block:: php // app/config/config.php $container->loadFromExtension('framework', array( - ..., + // ... 'templating' => array( 'engines' => array('twig'), 'assets_version' => 'v2', diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index 77304dff4f2..9295493eb68 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -200,29 +200,35 @@ Full default Configuration .. code-block:: xml - - - - - + + + + + + + + + Using multiple Mailers ---------------------- diff --git a/reference/constraints/All.rst b/reference/constraints/All.rst index 2e45602375d..5f5aa859a3d 100644 --- a/reference/constraints/All.rst +++ b/reference/constraints/All.rst @@ -24,7 +24,7 @@ entry in that array: .. code-block:: yaml - # src/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yml Acme\UserBundle\Entity\User: properties: favoriteColors: @@ -37,15 +37,15 @@ entry in that array: // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; - + class User { /** * @Assert\All({ * @Assert\NotBlank, - * @Assert\Length(min = "5") + * @Assert\Length(min = 5) * }) */ protected $favoriteColors = array(); @@ -77,7 +77,7 @@ entry in that array: // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index 85de8f59df0..5679aa5bf56 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -26,7 +26,7 @@ of an ``Author`` class were blank, you could do the following: .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: firstName: diff --git a/reference/constraints/Callback.rst b/reference/constraints/Callback.rst index 36b55e97910..b6e10f3086e 100644 --- a/reference/constraints/Callback.rst +++ b/reference/constraints/Callback.rst @@ -107,10 +107,17 @@ those errors should be attributed:: // ... private $firstName; +<<<<<<< HEAD public function validate(ExecutionContextInterface $context) { // somehow you have an array of "fake names" $fakeNames = array(/* ... */); +======= + public function isAuthorValid(ExecutionContextInterface $context) + { + // somehow you have an array of "fake names" + $fakeNames = array(); +>>>>>>> [Reference] consistent & complete config examples // check if the name is actually a fake name if (in_array($this->getFirstName(), $fakeNames)) { @@ -179,6 +186,7 @@ You can then use the following configuration to invoke this validator: .. code-block:: php-annotations +<<<<<<< HEAD // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; @@ -190,6 +198,16 @@ You can then use the following configuration to invoke this validator: class Author { } +======= + /** + * @Assert\Callback(methods={ + * { "Acme\BlogBundle\MyStaticValidatorClass", "isAuthorValid" } + * }) + */ + class Author + { + } +>>>>>>> [Reference] consistent & complete config examples .. code-block:: xml @@ -228,6 +246,7 @@ You can then use the following configuration to invoke this validator: .. note:: +<<<<<<< HEAD The Callback constraint does *not* support global callback functions nor is it possible to specify a global function or a :term:`service` method as callback. To validate using a service, you should @@ -246,6 +265,14 @@ constructor of the Callback constraint:: class Author { public static function loadValidatorMetadata(ClassMetadata $metadata) +======= + namespace Acme\BlogBundle; + + use Symfony\Component\Validator\ExecutionContextInterface; + use Acme\BlogBundle\Entity\Author; + + class MyStaticValidatorClass +>>>>>>> [Reference] consistent & complete config examples { $callback = function ($object, ExecutionContextInterface $context) { // ... diff --git a/reference/constraints/Collection.rst b/reference/constraints/Collection.rst index 0e21d2c8a0d..6f028e358e2 100644 --- a/reference/constraints/Collection.rst +++ b/reference/constraints/Collection.rst @@ -85,7 +85,7 @@ blank but is no longer than 100 characters in length, you would do the following * @Assert\NotBlank(), * @Assert\Length( * max = 100, - * maxMessage = "Your bio is too long!" + * maxMessage = "Your short bio is too long!" * ) * } * }, @@ -117,7 +117,7 @@ blank but is no longer than 100 characters in length, you would do the following - + @@ -146,7 +146,10 @@ blank but is no longer than 100 characters in length, you would do the following 'personal_email' => new Assert\Email(), 'lastName' => array( new Assert\NotBlank(), - new Assert\Length(array("max" => 100)), + new Assert\Length(array( + 'max' => 100, + 'maxMessage' => 'Your short bio is too long!', + )), ), ), 'allowMissingFields' => true, @@ -215,13 +218,11 @@ field is optional but must be a valid email if supplied, you can do the followin * @Assert\Collection( * fields={ * "personal_email" = @Assert\Required({@Assert\NotBlank, @Assert\Email}), - * "alternate_email" = @Assert\Optional(@Assert\Email), + * "alternate_email" = @Assert\Optional(@Assert\Email) * } * ) */ - protected $profileData = array( - 'personal_email', - ); + protected $profileData = array('personal_email'); } .. code-block:: xml diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index 86efb4636eb..f6dc5c10446 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -20,7 +20,7 @@ Basic Usage .. code-block:: yaml - # src/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yml Acme\UserBundle\Entity\User: properties: country: @@ -36,7 +36,7 @@ Basic Usage class User { /** - * @Assert\Country + * @Assert\Country() */ protected $country; } diff --git a/reference/constraints/Currency.rst b/reference/constraints/Currency.rst index 22709f469ba..553c2be4ec1 100644 --- a/reference/constraints/Currency.rst +++ b/reference/constraints/Currency.rst @@ -26,7 +26,7 @@ currency, you could do the following: .. code-block:: yaml - # src/EcommerceBundle/Resources/config/validation.yml + # src/Acme/EcommerceBundle/Resources/config/validation.yml Acme\EcommerceBundle\Entity\Order: properties: currency: @@ -50,11 +50,17 @@ currency, you could do the following: .. code-block:: xml - - - - - + + + + + + + + + .. code-block:: php @@ -82,4 +88,4 @@ message This is the message that will be shown if the value is not a valid currency. -.. _`3-letter ISO 4217`: http://en.wikipedia.org/wiki/ISO_4217 +.. _`3-letter ISO 4217`: http://en.wikipedia.org/wiki/ISO_4217 diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index 112620da68b..9df3332a749 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -24,7 +24,7 @@ Basic Usage .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: email: @@ -72,7 +72,7 @@ Basic Usage // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index 1079bd90430..c57fce55e11 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -8,7 +8,7 @@ Validates that a value is equal to another value, defined in the options. To force that a value is *not* equal, see :doc:`/reference/constraints/NotEqualTo`. .. caution:: - + This constraint compares using ``==``, so ``3`` and ``"3"`` are considered equal. Use :doc:`/reference/constraints/IdenticalTo` to compare with ``===``. @@ -34,7 +34,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is equal to .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -61,13 +61,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is equal to .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/False.rst b/reference/constraints/False.rst index f379d458ec4..b3d241881e7 100644 --- a/reference/constraints/False.rst +++ b/reference/constraints/False.rst @@ -41,7 +41,7 @@ method returns **false**: .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author getters: stateInvalid: diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index 80439900b26..2d773953bcd 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -30,7 +30,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is greater than .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -57,13 +57,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is greater than .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index 0dfe7072dc6..9d4cf37ecc5 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -29,7 +29,7 @@ or equal to ``18``, you could do the following: .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -56,13 +56,19 @@ or equal to ``18``, you could do the following: .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/Iban.rst b/reference/constraints/Iban.rst index a482903ace6..45a423e945c 100644 --- a/reference/constraints/Iban.rst +++ b/reference/constraints/Iban.rst @@ -36,22 +36,11 @@ will contain an International Bank Account Number. - Iban: message: This is not a valid International Bank Account Number (IBAN). - .. code-block:: xml - - - - - - - - - - .. code-block:: php-annotations // src/Acme/SubscriptionBundle/Entity/Transaction.php - namespace Acme\SubscriptionBundle\Entity\Transaction; - + namespace Acme\SubscriptionBundle\Entity; + use Symfony\Component\Validator\Constraints as Assert; class Transaction @@ -62,11 +51,28 @@ will contain an International Bank Account Number. protected $bankAccountNumber; } + .. code-block:: xml + + + + + + + + + + + + + + .. code-block:: php // src/Acme/SubscriptionBundle/Entity/Transaction.php - namespace Acme\SubscriptionBundle\Entity\Transaction; - + namespace Acme\SubscriptionBundle\Entity; + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index ea010607dd9..068035f31a9 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -9,7 +9,7 @@ To force that a value is *not* identical, see :doc:`/reference/constraints/NotIdenticalTo`. .. caution:: - + This constraint compares using ``===``, so ``3`` and ``"3"`` are *not* considered equal. Use :doc:`/reference/constraints/EqualTo` to compare with ``==``. @@ -35,7 +35,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is equal to .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -62,13 +62,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is equal to .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index f936c0da7f3..c4985169c24 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -92,7 +92,6 @@ it is between a certain size, add the following: maxWidth: 400 minHeight: 200 maxHeight: 400 - .. code-block:: php-annotations @@ -137,15 +136,17 @@ it is between a certain size, add the following: .. code-block:: php // src/Acme/BlogBundle/Entity/Author.php +<<<<<<< HEAD namespace Acme/BlogBundle/Entity +======= + namespace Acme\BlogBundle\Entity; +>>>>>>> [Reference] consistent & complete config examples use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; class Author { - // ... - public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('headshot', new Assert\Image(array( diff --git a/reference/constraints/Ip.rst b/reference/constraints/Ip.rst index 04b85403985..0cea9668340 100644 --- a/reference/constraints/Ip.rst +++ b/reference/constraints/Ip.rst @@ -23,7 +23,7 @@ Basic Usage .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: ipAddress: @@ -33,7 +33,7 @@ Basic Usage // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -63,10 +63,10 @@ Basic Usage // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; - + class Author { public static function loadValidatorMetadata(ClassMetadata $metadata) diff --git a/reference/constraints/Isbn.rst b/reference/constraints/Isbn.rst index fb0be64a49b..4292e8cf381 100644 --- a/reference/constraints/Isbn.rst +++ b/reference/constraints/Isbn.rst @@ -49,6 +49,8 @@ on an object that will contain an ISBN. .. code-block:: php-annotations // src/Acme/BookcaseBundle/Entity/Book.php + namespace Acme\BookcaseBundle\Entity; + use Symfony\Component\Validator\Constraints as Assert; class Book @@ -65,6 +67,7 @@ on an object that will contain an ISBN. .. code-block:: xml +<<<<<<< HEAD @@ -73,6 +76,23 @@ on an object that will contain an ISBN. +======= + + + + + + + + + + + + + +>>>>>>> [Reference] consistent & complete config examples .. code-block:: php diff --git a/reference/constraints/Issn.rst b/reference/constraints/Issn.rst index 20836159eca..0c200a73490 100644 --- a/reference/constraints/Issn.rst +++ b/reference/constraints/Issn.rst @@ -25,7 +25,7 @@ Basic Usage .. code-block:: yaml - # src/JournalBundle/Resources/config/validation.yml + # src/Acme/JournalBundle/Resources/config/validation.yml Acme\JournalBundle\Entity\Journal: properties: issn: @@ -49,11 +49,17 @@ Basic Usage .. code-block:: xml - - - - - + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/Language.rst b/reference/constraints/Language.rst index b8a87fbd500..617d554a508 100644 --- a/reference/constraints/Language.rst +++ b/reference/constraints/Language.rst @@ -21,7 +21,7 @@ Basic Usage .. code-block:: yaml - # src/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yml Acme\UserBundle\Entity\User: properties: preferredLanguage: @@ -31,13 +31,13 @@ Basic Usage // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; - + class User { /** - * @Assert\Language + * @Assert\Language() */ protected $preferredLanguage; } @@ -61,7 +61,7 @@ Basic Usage // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/Length.rst b/reference/constraints/Length.rst index edc065635da..6c1023c15aa 100644 --- a/reference/constraints/Length.rst +++ b/reference/constraints/Length.rst @@ -35,8 +35,8 @@ To verify that the ``firstName`` field length of a class is between "2" and - Length: min: 2 max: 50 - minMessage: "Your first name must be at least {{ limit }} characters length" - maxMessage: "Your first name cannot be longer than {{ limit }} characters length" + minMessage: "Your first name must be at least {{ limit }} characters long" + maxMessage: "Your first name cannot be longer than {{ limit }} characters long" .. code-block:: php-annotations @@ -49,10 +49,10 @@ To verify that the ``firstName`` field length of a class is between "2" and { /** * @Assert\Length( - * min = "2", - * max = "50", - * minMessage = "Your first name must be at least {{ limit }} characters length", - * maxMessage = "Your first name cannot be longer than {{ limit }} characters length" + * min = 2, + * max = 50, + * minMessage = "Your first name must be at least {{ limit }} characters long", + * maxMessage = "Your first name cannot be longer than {{ limit }} characters long" * ) */ protected $firstName; @@ -71,8 +71,8 @@ To verify that the ``firstName`` field length of a class is between "2" and - - + + @@ -93,8 +93,8 @@ To verify that the ``firstName`` field length of a class is between "2" and $metadata->addPropertyConstraint('firstName', new Assert\Length(array( 'min' => 2, 'max' => 50, - 'minMessage' => 'Your first name must be at least {{ limit }} characters length', - 'maxMessage' => 'Your first name cannot be longer than {{ limit }} characters length', + 'minMessage' => 'Your first name must be at least {{ limit }} characters long', + 'maxMessage' => 'Your first name cannot be longer than {{ limit }} characters long', ))); } } diff --git a/reference/constraints/LessThan.rst b/reference/constraints/LessThan.rst index 849b157bc0a..ea5be3c6675 100644 --- a/reference/constraints/LessThan.rst +++ b/reference/constraints/LessThan.rst @@ -30,7 +30,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is less than .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -57,13 +57,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is less than .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/LessThanOrEqual.rst b/reference/constraints/LessThanOrEqual.rst index d706ac20693..a936ee76ba8 100644 --- a/reference/constraints/LessThanOrEqual.rst +++ b/reference/constraints/LessThanOrEqual.rst @@ -29,7 +29,7 @@ equal to ``80``, you could do the following: .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -56,13 +56,19 @@ equal to ``80``, you could do the following: .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/Locale.rst b/reference/constraints/Locale.rst index 9bb4f1a35ca..cf411c11ecb 100644 --- a/reference/constraints/Locale.rst +++ b/reference/constraints/Locale.rst @@ -24,7 +24,7 @@ Basic Usage .. code-block:: yaml - # src/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yml Acme\UserBundle\Entity\User: properties: locale: @@ -34,13 +34,13 @@ Basic Usage // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class User { /** - * @Assert\Locale + * @Assert\Locale() */ protected $locale; } @@ -64,10 +64,10 @@ Basic Usage // src/Acme/UserBundle/Entity/User.php namespace Acme\UserBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; - + class User { public static function loadValidatorMetadata(ClassMetadata $metadata) diff --git a/reference/constraints/Luhn.rst b/reference/constraints/Luhn.rst index 70ca0912888..0dca2831300 100644 --- a/reference/constraints/Luhn.rst +++ b/reference/constraints/Luhn.rst @@ -35,7 +35,7 @@ will contain a credit card number. .. code-block:: php-annotations // src/Acme/SubscriptionBundle/Entity/Transaction.php - namespace Acme\SubscriptionBundle\Entity\Transaction; + namespace Acme\SubscriptionBundle\Entity; use Symfony\Component\Validator\Constraints as Assert; @@ -67,7 +67,7 @@ will contain a credit card number. .. code-block:: php // src/Acme/SubscriptionBundle/Entity/Transaction.php - namespace Acme\SubscriptionBundle\Entity\Transaction; + namespace Acme\SubscriptionBundle\Entity; use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/NotBlank.rst b/reference/constraints/NotBlank.rst index 2138b7d4186..8de6034b48c 100644 --- a/reference/constraints/NotBlank.rst +++ b/reference/constraints/NotBlank.rst @@ -25,7 +25,7 @@ were not blank, you could do the following: .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: firstName: diff --git a/reference/constraints/NotEqualTo.rst b/reference/constraints/NotEqualTo.rst index 0e2e9f7593d..1ea36a08994 100644 --- a/reference/constraints/NotEqualTo.rst +++ b/reference/constraints/NotEqualTo.rst @@ -9,7 +9,7 @@ options. To force that a value is equal, see :doc:`/reference/constraints/EqualTo`. .. caution:: - + This constraint compares using ``!=``, so ``3`` and ``"3"`` are considered equal. Use :doc:`/reference/constraints/NotIdenticalTo` to compare with ``!==``. @@ -35,7 +35,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is not equal to .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -62,13 +62,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is not equal to .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/NotIdenticalTo.rst b/reference/constraints/NotIdenticalTo.rst index 9a70d41c571..63e6b0462dd 100644 --- a/reference/constraints/NotIdenticalTo.rst +++ b/reference/constraints/NotIdenticalTo.rst @@ -9,7 +9,7 @@ options. To force that a value is identical, see :doc:`/reference/constraints/IdenticalTo`. .. caution:: - + This constraint compares using ``!==``, so ``3`` and ``"3"`` are considered not equal. Use :doc:`/reference/constraints/NotEqualTo` to compare with ``!=``. @@ -35,7 +35,7 @@ If you want to ensure that the ``age`` of a ``Person`` class is *not* equal to .. code-block:: yaml - # src/SocialBundle/Resources/config/validation.yml + # src/Acme/SocialBundle/Resources/config/validation.yml Acme\SocialBundle\Entity\Person: properties: age: @@ -62,13 +62,19 @@ If you want to ensure that the ``age`` of a ``Person`` class is *not* equal to .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php diff --git a/reference/constraints/NotNull.rst b/reference/constraints/NotNull.rst index 7b581a8c3d0..668aa5dfd1b 100644 --- a/reference/constraints/NotNull.rst +++ b/reference/constraints/NotNull.rst @@ -25,7 +25,7 @@ were not strictly equal to ``null``, you would: .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: firstName: diff --git a/reference/constraints/Null.rst b/reference/constraints/Null.rst index 730b60862c0..38baf3d1929 100644 --- a/reference/constraints/Null.rst +++ b/reference/constraints/Null.rst @@ -35,7 +35,7 @@ of an ``Author`` class exactly equal to ``null``, you could do the following: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -65,7 +65,7 @@ of an ``Author`` class exactly equal to ``null``, you could do the following: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/Range.rst b/reference/constraints/Range.rst index 1c46d7778fa..03781307ff2 100644 --- a/reference/constraints/Range.rst +++ b/reference/constraints/Range.rst @@ -34,8 +34,8 @@ the following: - Range: min: 120 max: 180 - minMessage: You must be at least 120cm tall to enter - maxMessage: You cannot be taller than 180cm to enter + minMessage: You must be at least {{ limit }}cm tall to enter + maxMessage: You cannot be taller than {{ limit }}cm to enter .. code-block:: php-annotations @@ -50,8 +50,8 @@ the following: * @Assert\Range( * min = 120, * max = 180, - * minMessage = "You must be at least 120cm tall to enter", - * maxMessage = "You cannot be taller than 180cm to enter" + * minMessage = "You must be at least {{ limit }}cm tall to enter", + * maxMessage = "You cannot be taller than {{ limit }}cm to enter" * ) */ protected $height; @@ -70,8 +70,8 @@ the following: - - + + @@ -92,8 +92,8 @@ the following: $metadata->addPropertyConstraint('height', new Assert\Range(array( 'min' => 120, 'max' => 180, - 'minMessage' => 'You must be at least 120cm tall to enter', - 'maxMessage' => 'You cannot be taller than 180cm to enter', + 'minMessage' => 'You must be at least {{ limit }}cm tall to enter', + 'maxMessage' => 'You cannot be taller than {{ limit }}cm to enter', ))); } } diff --git a/reference/constraints/Regex.rst b/reference/constraints/Regex.rst index 4f1e588ab17..489f01675b9 100644 --- a/reference/constraints/Regex.rst +++ b/reference/constraints/Regex.rst @@ -38,7 +38,7 @@ characters at the beginning of your string: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -70,7 +70,7 @@ characters at the beginning of your string: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; @@ -106,7 +106,7 @@ message: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -186,8 +186,8 @@ pattern. This means that the delimiters are removed (e.g. ``/[a-z]+/`` becomes ` However, there are some other incompatibilities between both patterns which 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: +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: .. configuration-block:: @@ -205,7 +205,7 @@ specify the HTML5 compatible pattern in the ``htmlPattern`` option: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -241,7 +241,7 @@ specify the HTML5 compatible pattern in the ``htmlPattern`` option: // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/True.rst b/reference/constraints/True.rst index b284d3dbb2a..8edef81ad93 100644 --- a/reference/constraints/True.rst +++ b/reference/constraints/True.rst @@ -50,7 +50,8 @@ Then you can constrain this method with ``True``. Acme\BlogBundle\Entity\Author: getters: tokenValid: - - 'True': { message: "The token is invalid." } + - 'True': + message: The token is invalid. .. code-block:: php-annotations @@ -96,11 +97,11 @@ Then you can constrain this method with ``True``. use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints\True; - + class Author { protected $token; - + public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addGetterConstraint('tokenValid', new True(array( diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index 1980b083c38..629ca6a9431 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -23,7 +23,7 @@ Basic Usage .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: age: @@ -65,7 +65,7 @@ Basic Usage .. code-block:: php - + // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index dd751890fb9..c622244a0e4 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -42,7 +42,7 @@ table: .. code-block:: php-annotations - // Acme/UserBundle/Entity/User.php + // Acme/UserBundle/Entity/Author.php namespace Acme\UserBundle\Entity; use Symfony\Component\Validator\Constraints as Assert; @@ -79,7 +79,6 @@ table: - @@ -104,7 +103,6 @@ table: { $metadata->addConstraint(new UniqueEntity(array( 'fields' => 'email', - 'message' => 'This email already exists.', ))); $metadata->addPropertyConstraint('email', new Assert\Email()); diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index c6f45583a73..42ea1f1da2c 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -21,7 +21,7 @@ Basic Usage .. code-block:: yaml - # src/BlogBundle/Resources/config/validation.yml + # src/Acme/BlogBundle/Resources/config/validation.yml Acme\BlogBundle\Entity\Author: properties: bioUrl: @@ -31,7 +31,7 @@ Basic Usage // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Constraints as Assert; class Author @@ -61,10 +61,10 @@ Basic Usage // src/Acme/BlogBundle/Entity/Author.php namespace Acme\BlogBundle\Entity; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; - + class Author { public static function loadValidatorMetadata(ClassMetadata $metadata) @@ -72,7 +72,7 @@ Basic Usage $metadata->addPropertyConstraint('bioUrl', new Assert\Url()); } } - + Options ------- diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index 1383172aaed..dee677b1d78 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -32,7 +32,7 @@ password: .. code-block:: yaml - # src/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yml Acme\UserBundle\Form\Model\ChangePassword: properties: oldPassword: @@ -58,15 +58,17 @@ password: .. code-block:: xml - + - - + + + + diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 669ae84b32f..407c5339cbc 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -85,7 +85,7 @@ an ``Address`` instance in the ``$address`` property. /** * @Assert\NotBlank - * @Assert\Length(max = "5") + * @Assert\Length(max = 5) */ protected $zipCode; } @@ -93,11 +93,13 @@ an ``Address`` instance in the ``$address`` property. // src/Acme/HelloBundle/Entity/Author.php namespace Acme\HelloBundle\Entity; + use Symfony\Component\Validator\Constraints as Assert; + class Author { /** * @Assert\NotBlank - * @Assert\Length(min = "4") + * @Assert\Length(min = 4) */ protected $firstName; @@ -159,9 +161,7 @@ an ``Address`` instance in the ``$address`` property. { $metadata->addPropertyConstraint('street', new Assert\NotBlank()); $metadata->addPropertyConstraint('zipCode', new Assert\NotBlank()); - $metadata->addPropertyConstraint( - 'zipCode', - new Assert\Length(array("max" => 5))); + $metadata->addPropertyConstraint('zipCode', new Assert\Length(array("max" => 5))); } } diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 18fce432bff..0e4de98e90c 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -128,9 +128,17 @@ And then register it as a tagged service: .. code-block:: xml - - + + + + + + + + .. code-block:: php @@ -179,9 +187,17 @@ Second, define a service: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php @@ -331,9 +347,20 @@ the ``form.type_extension`` tag: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -403,9 +430,17 @@ Then register this class and tag it with ``kernel.cache_clearer``: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php @@ -466,9 +501,17 @@ To register your warmer with Symfony, give it the ``kernel.cache_warmer`` tag: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php @@ -611,9 +654,20 @@ configuration, and tag it with ``kernel.event_subscriber``: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -666,16 +720,24 @@ channel when injecting the logger in a service. .. code-block:: xml - - - - + + + + + + + + + + .. code-block:: php $definition = new Definition('Fully\Qualified\Loader\Class\Name', array(new Reference('logger')); $definition->addTag('monolog.logger', array('channel' => 'acme')); - $container->register('my_service', $definition); + $container->setDefinition('my_service', $definition); .. tip:: @@ -712,15 +774,24 @@ You can add a processor globally: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php - $definition = new Definition('Monolog\Processor\IntrospectionProcessor'); - $definition->addTag('monolog.processor'); - $container->register('my_service', $definition); + $container + ->register('my_service', 'Monolog\Processor\IntrospectionProcessor') + ->addTag('monolog.processor') + ; .. tip:: @@ -742,15 +813,24 @@ attribute: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php - $definition = new Definition('Monolog\Processor\IntrospectionProcessor'); - $definition->addTag('monolog.processor', array('handler' => 'firephp'); - $container->register('my_service', $definition); + $container + ->register('my_service', 'Monolog\Processor\IntrospectionProcessor') + ->addTag('monolog.processor', array('handler' => 'firephp')) + ; You can also add a processor for a specific logging channel by using the ``channel`` attribute. This will register the processor only for the ``security`` logging @@ -768,15 +848,24 @@ channel used in the Security component: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php - $definition = new Definition('Monolog\Processor\IntrospectionProcessor'); - $definition->addTag('monolog.processor', array('channel' => 'security'); - $container->register('my_service', $definition); + $container + ->register('my_service', 'Monolog\Processor\IntrospectionProcessor') + ->addTag('monolog.processor', array('channel' => 'security')) + ; .. note:: @@ -803,9 +892,20 @@ of your configuration, and tag it with ``routing.loader``: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -910,9 +1010,20 @@ templates): .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -970,9 +1081,20 @@ Now, register your loader as a service and tag it with ``translation.loader``: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -1051,10 +1173,20 @@ option: ``alias``, which defines the name of the extractor:: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -1102,10 +1234,20 @@ This is the name that's used to determine which dumper should be used. .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -1137,9 +1279,20 @@ configuration, and tag it with ``twig.extension``: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php @@ -1170,9 +1323,17 @@ also have to be added as regular services: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php @@ -1203,9 +1364,20 @@ the new loader and tag it with ``twig.loader``: .. code-block:: xml - - - + + + + + + + + + + .. code-block:: php From acf5d288fee8846f2e2f8d7c375b5d85a7e9926f Mon Sep 17 00:00:00 2001 From: gerryvdm Date: Fri, 22 Aug 2014 17:21:40 +0200 Subject: [PATCH 029/106] Update voters.rst Corrected the service name to be injected0 --- cookbook/security/voters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 1760cb43db7..e27f922a700 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -32,7 +32,7 @@ access, not to grant access. Creating a custom Voter ----------------------- -To blacklist a user based on its IP, you can use the ``request`` service +To blacklist a user based on its IP, you can use the ``request_stack`` service and compare the IP address against a set of blacklisted IP addresses: .. code-block:: php From cdf21341b939b7c00b4b2bb41227b3f42b67aee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ma=C5=82olepszy?= Date: Mon, 25 Aug 2014 22:52:51 +0200 Subject: [PATCH 030/106] fixes environment/application mistake --- cookbook/configuration/environments.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index f5042ee17f8..d4884e2223a 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -153,7 +153,7 @@ used by each is explicitly set:: // ... -As you can see, the ``prod`` key specifies that this environment will run +As you can see, the ``prod`` key specifies that this application will run in the ``prod`` environment. A Symfony2 application can be executed in any environment by using this code and changing the environment string. From 4bb0f65d3b509bd556140c2c8ce7c105d291cb98 Mon Sep 17 00:00:00 2001 From: Raul Fraile Date: Tue, 26 Aug 2014 20:44:11 +0200 Subject: [PATCH 031/106] Improved custom formats article based on comments --- components/translation/custom_formats.rst | 31 +++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index 4ea7574d768..a212b7b1910 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -1,8 +1,8 @@ .. index:: - single: Translation; Custom formats + single: Translation; Adding Custom Format Support -Custom Formats -============== +Adding Custom Format Support +============================ Sometimes, you need to deal with custom formats for translation files. The Translation component is flexible enough to support this. Just create a @@ -14,12 +14,12 @@ message. A translation file would look like this: .. code-block:: text - (welcome)(Bienvenido) - (goodbye)(Adiós) - (hello)(Hola) + (welcome)(accueil) + (goodbye)(au revoir) + (hello)(bonjour) -Custom Loader -------------- +Creating a Custom Loader +------------------------ To define a custom loader that is able to read this kind of files, you must create a new class that implements the @@ -56,24 +56,23 @@ Once created, it can be used as any other loader:: use Symfony\Component\Translation\Translator; - $translator = new Translator('es_ES'); + $translator = new Translator('fr_FR'); $translator->addLoader('my_format', new MyFormatLoader()); - $translator->addResource('my_format', __DIR__.'/translations/messages.txt', 'es_ES'); + $translator->addResource('my_format', __DIR__.'/translations/messages.txt', 'fr_FR'); echo $translator->trans('welcome'); -It will print *"Bienvenido"*. +It will print *"accueil"*. -Custom Dumper -------------- +Creating a Custom Dumper +------------------------ It is also possible to create a custom dumper for your format, which is useful when using the extraction commands. To do so, a new class implementing the :class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` -must be created. -To write the dump contents into a file, extending the +must be created. To write the dump contents into a file, extending the :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class will save a few lines:: @@ -109,7 +108,7 @@ YAML file are dumped into a text file with the custom format:: use Symfony\Component\Translation\Loader\YamlFileLoader; $loader = new YamlFileLoader(); - $catalogue = $loader->load(__DIR__ . '/translations/messages.es_ES.yml' , 'es_ES'); + $catalogue = $loader->load(__DIR__ . '/translations/messages.fr_FR.yml' , 'fr_FR'); $dumper = new MyFormatDumper(); $dumper->dump($catalogue, array('path' => __DIR__.'/dumps')); From 93ae9406d27d0cf145c7f969b2b3fd0ca0ddadb5 Mon Sep 17 00:00:00 2001 From: Jason Bouffard Date: Tue, 26 Aug 2014 20:15:09 -0400 Subject: [PATCH 032/106] Added note about exporting SYMFONY_ENV --- cookbook/deployment/tools.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbook/deployment/tools.rst b/cookbook/deployment/tools.rst index 58cc3bd6cfc..9f7e50616e0 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -106,6 +106,12 @@ as you normally do: ensures that development packages are not installed in the production environment. +.. caution:: + + If you get a "class not found" error during this step, you may need to + run ``export SYMFONY_ENV=prod`` before running this command so that + the ``post-install-cmd`` scripts run in the ``prod`` environment. + D) Clear your Symfony Cache ~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f3b942e318feb6b1f054d38c949f40a401de134a Mon Sep 17 00:00:00 2001 From: Ariel Ferrandini Date: Tue, 26 Aug 2014 12:04:34 +0200 Subject: [PATCH 033/106] New service to simplify password encoding --- book/security.rst | 35 +++++++++++++++-- .../custom_password_authenticator.rst | 38 ++++++++----------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/book/security.rst b/book/security.rst index 97df4d813fa..ad9a9af5e70 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1567,23 +1567,36 @@ is available by calling the PHP function :phpfunction:`hash_algos`. Determining the Hashed Password ............................... +.. versionadded:: 2.6 + The ``security.password_encoder`` service was introduced in Symfony 2.6. + If you're storing users in the database and you have some sort of registration form for users, you'll need to be able to determine the hashed password so that you can set it on your user before inserting it. No matter what algorithm you configure for your user object, the hashed password can always be determined in the following way from a controller:: - $factory = $this->get('security.encoder_factory'); $user = new Acme\UserBundle\Entity\User(); + $plainPassword = 'ryanpass'; + $encoded = $this->container->get('security.password_encoder') + ->encodePassword($user, $plainPassword); - $encoder = $factory->getEncoder($user); - $password = $encoder->encodePassword('ryanpass', $user->getSalt()); - $user->setPassword($password); + $user->setPassword($encoded); In order for this to work, just make sure that you have the encoder for your user class (e.g. ``Acme\UserBundle\Entity\User``) configured under the ``encoders`` key in ``app/config/security.yml``. +.. sidebar:: Get the User Encoder + + In some cases, you need a specific encoder for a given user (e.g. ``Acme\UserBundle\Entity\User``). + You can use the ``EncoderFactory`` to get this encoder:: + + $factory = $this->get('security.encoder_factory'); + $user = new Acme\UserBundle\Entity\User(); + + $encoder = $factory->getEncoder($user); + .. caution:: When you allow a user to submit a plaintext password (e.g. registration @@ -1591,6 +1604,20 @@ key in ``app/config/security.yml``. that the password is 4096 characters or less. Read more details in :ref:`How to implement a simple Registration Form `. +Validating a Plaintext Password +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes you want to check if a plain password is valid for a given user:: + + // a user instance of some class which implements Symfony\Component\Security\Core\User\UserInterface + $user = ...; + + // the password that should be checked + $plainPassword = ...; + + $isValidPassword = $this->container->get('security.password_encoder') + ->isPasswordValid($user, $plainPassword); + Retrieving the User Object ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cookbook/security/custom_password_authenticator.rst b/cookbook/security/custom_password_authenticator.rst index 288d0e65a6f..6894a5043c2 100644 --- a/cookbook/security/custom_password_authenticator.rst +++ b/cookbook/security/custom_password_authenticator.rst @@ -8,6 +8,7 @@ Imagine you want to allow access to your website only between 2pm and 4pm UTC. Before Symfony 2.4, you had to create a custom token, factory, listener and provider. In this entry, you'll learn how to do this for a login form (i.e. where your user submits their username and password). +Before Symfony 2.6, you had to use the password encoder to authenticate the user password. The Password Authenticator -------------------------- @@ -15,6 +16,9 @@ The Password Authenticator .. versionadded:: 2.4 The ``SimpleFormAuthenticatorInterface`` interface was introduced in Symfony 2.4. +.. versionadded:: 2.6 + The ``UserPasswordEncoderInterface`` interface was introduced in Symfony 2.6. + First, create a new class that implements :class:`Symfony\\Component\\Security\\Core\\Authentication\\SimpleFormAuthenticatorInterface`. Eventually, this will allow you to create custom logic for authenticating @@ -27,18 +31,18 @@ the user:: use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; - use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; + use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; use Symfony\Component\Security\Core\User\UserProviderInterface; class TimeAuthenticator implements SimpleFormAuthenticatorInterface { - private $encoderFactory; + private $encoder; - public function __construct(EncoderFactoryInterface $encoderFactory) + public function __construct(UserPasswordEncoderInterface $encoder) { - $this->encoderFactory = $encoderFactory; + $this->encoder = $encoder; } public function authenticateToken(TokenInterface $token, UserProviderInterface $userProvider, $providerKey) @@ -49,12 +53,7 @@ the user:: throw new AuthenticationException('Invalid username or password'); } - $encoder = $this->encoderFactory->getEncoder($user); - $passwordValid = $encoder->isPasswordValid( - $user->getPassword(), - $token->getCredentials(), - $user->getSalt() - ); + $passwordValid = $this->encoder->isPasswordValid($user, $token->getCredentials()); if ($passwordValid) { $currentHour = date('G'); @@ -127,17 +126,12 @@ Ultimately, your job is to return a *new* token object that is "authenticated" (i.e. it has at least 1 role set on it) and which has the ``User`` object inside of it. -Inside this method, an encoder is needed to check the password's validity:: +Inside this method, the password encoder is needed to check the password's validity:: - $encoder = $this->encoderFactory->getEncoder($user); - $passwordValid = $encoder->isPasswordValid( - $user->getPassword(), - $token->getCredentials(), - $user->getSalt() - ); + $passwordValid = $this->encoder->isPasswordValid($user, $token->getCredentials()); -This is a service that is already available in Symfony and the password algorithm -is configured in the security configuration (e.g. ``security.yml``) under +This is a service that is already available in Symfony and it uses the password algorithm +that is configured in the security configuration (e.g. ``security.yml``) under the ``encoders`` key. Below, you'll see how to inject that into the ``TimeAuthenticator``. .. _cookbook-security-password-authenticator-config: @@ -157,7 +151,7 @@ Now, configure your ``TimeAuthenticator`` as a service: time_authenticator: class: Acme\HelloBundle\Security\TimeAuthenticator - arguments: ["@security.encoder_factory"] + arguments: ["@security.password_encoder"] .. code-block:: xml @@ -173,7 +167,7 @@ Now, configure your ``TimeAuthenticator`` as a service: - + @@ -188,7 +182,7 @@ Now, configure your ``TimeAuthenticator`` as a service: $container->setDefinition('time_authenticator', new Definition( 'Acme\HelloBundle\Security\TimeAuthenticator', - array(new Reference('security.encoder_factory')) + array(new Reference('security.password_encoder')) )); Then, activate it in the ``firewalls`` section of the security configuration From 819c53ca74942d0dac06d37efde6847cbff47471 Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Wed, 27 Aug 2014 16:16:55 +0200 Subject: [PATCH 034/106] Route description correction. The actual route is '/random/{limit}' and not '/number/{limit}'. --- book/page_creation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index da550fa60e4..fd6889868d0 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -231,7 +231,7 @@ the new route that defines the URL of the page that you're about to create: The routing consists of two basic pieces: the ``path``, which is the URL that this route will match, and a ``defaults`` array, which specifies the controller that should be executed. The placeholder syntax in the path -(``{limit}``) is a wildcard. It means that ``/number/10``, ``/number/327`` +(``{limit}``) is a wildcard. It means that ``/random/10``, ``/random/327`` or any other similar URL will match this route. The ``{limit}`` placeholder parameter will also be passed to the controller so that you can use its value to generate the proper random number. From 9f6590bd7b4ebc923f615c6d287cf583d2e6159b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 30 Aug 2014 21:41:01 +0200 Subject: [PATCH 035/106] add link to form testing chapter in test section --- cookbook/map.rst.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbook/map.rst.inc b/cookbook/map.rst.inc index d73382b762c..539c1217538 100644 --- a/cookbook/map.rst.inc +++ b/cookbook/map.rst.inc @@ -197,6 +197,7 @@ * :doc:`/cookbook/testing/doctrine` * :doc:`/cookbook/testing/bootstrap` * (email) :doc:`/cookbook/email/testing` + * (form) :doc:`/cookbook/form/unit_testing` * :doc:`/cookbook/validation/index` From 1fd5af429139a348a976e7434f4bec1b61850b28 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Sun, 24 Aug 2014 19:00:02 +0200 Subject: [PATCH 036/106] Link to FOSHttpCacheBundle --- cookbook/cache/varnish.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 03c0b690381..abbd56e6962 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -91,10 +91,18 @@ Symfony2 adds automatically: Cache Invalidation ------------------ -You should never need to invalidate cached data because invalidation is already -taken into account natively in the HTTP cache models (see :ref:`http-cache-invalidation`). +If you want to cache content that changes frequently and still serve +the most recent version to users, you need to invalidate that content. +While `cache invalidation`_ allows you to purge content from your +proxy before it has expired, it adds complexity to your caching setup. -Still, Varnish can be configured to accept a special HTTP ``PURGE`` method +.. tip:: + + The open source `FOSHttpCacheBundle`_ takes the pain out of cache + invalidation by helping you to organize your caching and + invalidation setup. + +Varnish can be configured to accept a special HTTP ``PURGE`` method that will invalidate the cache for a given resource: .. code-block:: text @@ -232,3 +240,5 @@ absolute URLs: .. _`Edge Architecture`: http://www.w3.org/TR/edge-arch .. _`GZIP and Varnish`: https://www.varnish-cache.org/docs/3.0/phk/gzip.html .. _`Surrogate-Capability Header`: http://www.w3.org/TR/edge-arch +.. _`cache invalidation`: http://tools.ietf.org/html/rfc2616#section-13.10 +.. _`FOSHttpCacheBundle`: http://foshttpcachebundle.readthedocs.org/ From 44e8ae0f742747cf076e7bef5049158f6c371a58 Mon Sep 17 00:00:00 2001 From: Matthias Althaus Date: Thu, 28 Aug 2014 11:33:44 +0200 Subject: [PATCH 037/106] Update datetime.rst Fixed "the the" typo. --- reference/forms/types/datetime.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 7b0d0e089f5..d5621098db9 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -74,8 +74,8 @@ format **type**: ``string`` **default**: ``Symfony\Component\Form\Extension\Core\Type\DateTimeType::HTML5_FORMAT`` -If the ``widget`` option is set to ``single_text``, this option specifies the -the format of the input, i.e. how Symfony will interpret the given input +If the ``widget`` option is set to ``single_text``, this option specifies + the format of the input, i.e. how Symfony will interpret the given input as a datetime string. It defaults to the `RFC 3339`_ format which is used by the HTML5 ``datetime`` field. Keeping the default value will cause the field to be rendered as an ``input`` field with ``type="datetime"``. From d41ed6c0d251b19dcf8fb04cda61e04db75ba182 Mon Sep 17 00:00:00 2001 From: Matthias Althaus Date: Fri, 29 Aug 2014 10:17:15 +0200 Subject: [PATCH 038/106] Update datetime.rst --- reference/forms/types/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index d5621098db9..fc58493207f 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -75,7 +75,7 @@ format **type**: ``string`` **default**: ``Symfony\Component\Form\Extension\Core\Type\DateTimeType::HTML5_FORMAT`` If the ``widget`` option is set to ``single_text``, this option specifies - the format of the input, i.e. how Symfony will interpret the given input +the format of the input, i.e. how Symfony will interpret the given input as a datetime string. It defaults to the `RFC 3339`_ format which is used by the HTML5 ``datetime`` field. Keeping the default value will cause the field to be rendered as an ``input`` field with ``type="datetime"``. From 1a001c7f28fdccf79c364faebbe6d485e645e790 Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Thu, 28 Aug 2014 11:48:57 +0200 Subject: [PATCH 039/106] Update home of DoctrineExtensions. As you can read in the 2014-03-20 DoctrineExtensions update: https://github.com/Atlantic18/DoctrineExtensions/blob/master/README.md#latest-updates > > DoctrineExtensions has new home on github under an unbrella of ORM designer organization. > --- cookbook/doctrine/common_extensions.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cookbook/doctrine/common_extensions.rst b/cookbook/doctrine/common_extensions.rst index 32ede55465a..8f6719745a6 100644 --- a/cookbook/doctrine/common_extensions.rst +++ b/cookbook/doctrine/common_extensions.rst @@ -22,12 +22,12 @@ To do this, you have two options: #. Implement this services directly by following the documentation for integration with Symfony2: `Install Gedmo Doctrine2 extensions in Symfony2`_ -.. _`DoctrineExtensions`: https://github.com/l3pp4rd/DoctrineExtensions +.. _`DoctrineExtensions`: https://github.com/Atlantic18/DoctrineExtensions .. _`StofDoctrineExtensionsBundle`: https://github.com/stof/StofDoctrineExtensionsBundle -.. _`Sluggable`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/sluggable.md -.. _`Translatable`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/translatable.md -.. _`Timestampable`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/timestampable.md -.. _`Loggable`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/loggable.md -.. _`Tree`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/tree.md -.. _`Sortable`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/sortable.md -.. _`Install Gedmo Doctrine2 extensions in Symfony2`: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/symfony2.md +.. _`Sluggable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/sluggable.md +.. _`Translatable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/translatable.md +.. _`Timestampable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/timestampable.md +.. _`Loggable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/loggable.md +.. _`Tree`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md +.. _`Sortable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/sortable.md +.. _`Install Gedmo Doctrine2 extensions in Symfony2`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/symfony2.md From 4ea3f8dbac16812403c7d626a959357a82169cb4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 5 Sep 2014 11:36:30 +0200 Subject: [PATCH 040/106] Moved 'contributing' images to their own directory --- contributing/community/releases.rst | 2 +- contributing/documentation/overview.rst | 2 +- .../docs-pull-request-change-base.png | Bin 0 -> 5849 bytes images/contributing/release-process.jpg | Bin 0 -> 69131 bytes 4 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 images/contributing/docs-pull-request-change-base.png create mode 100644 images/contributing/release-process.jpg diff --git a/contributing/community/releases.rst b/contributing/community/releases.rst index 6c953c83f85..39325e9ed67 100644 --- a/contributing/community/releases.rst +++ b/contributing/community/releases.rst @@ -77,7 +77,7 @@ Schedule Below is the schedule for the first few versions that use this release model: -.. image:: /images/release-process.jpg +.. image:: /images/contributing/release-process.jpg :align: center * **Yellow** represents the Development phase diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 8796557e56d..f52bdb2228d 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -61,7 +61,7 @@ If you have made your changes based on the 2.3 branch then you need to change the base branch to be 2.3 on the preview page by clicking the ``edit`` button on the top left: -.. image:: /images/docs-pull-request-change-base.png +.. image:: /images/contributing/docs-pull-request-change-base.png :align: center .. note:: diff --git a/images/contributing/docs-pull-request-change-base.png b/images/contributing/docs-pull-request-change-base.png new file mode 100644 index 0000000000000000000000000000000000000000..d824e8ef1bc507beaf51bf95fbee20093dc44dff GIT binary patch literal 5849 zcmZ9QcQ{;I*TBcgobIxA-tg_d0_IlR-MQEx+$VhIJ0000orKbwd003MR_FaSsh`kT` zIhJ7`IBw4%a)9z-#!c)1&rViN767P<16^6*W5+C3PoJp)0Nz{xKwt;}aDf#CZU6x8 z4*-BIa{xdh1pv6^lHR2C2mqkfS5lDG@ig6q!rbN*Xl(+tugB$f0swW*G$CS0PipCX z;zFZHI)+~Lyuf9x_i`=+Rj!}e z-eZjgpD$V^kfXQ)jZEn-1-x(o6$?-ykcbk8O$P5>EC2zf{zHJBwU+>X5%L2vKK{2@ z(~dG6_;1k$E?yz*(ws^hA8YDwyFusvyKlHP>OXw=)%*Y51%AA^xY*k(55Ji92P^F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Oq8Am^InPwQ&+e&!fb6m= zTOb1LP4_{xqXYHE;p#A7{idAd@C{oPz=KygbcvB7df6`cw6axZSk@O`xU&*ViW=E>AM|fW7wme_AO(BeZu-Q}fPGK~-&YK&if-uTaUf!Y1s z^q`T<8W{$6({aVd&I!#YOE@%McaB8MaJ2O66(oBzBP*UosH^B~`ifvp{irOX9jn!G zI2v*;{fl`F_2k`$m_^-3k2&NG>RSPVzJ1h^NEawX$T5j<@il#zv=H3YU%*i3)Ne>+ z*py?NMy#{(9mkd3mDF;rm*j=85ltjCFMq?GgP)cyo}dbLb2i}66LUBmZu6w|bcW-0z2T6MnDo2J0#aG$@mce6+#0DCDtQCBFJGk^Jin!3@6 literal 0 HcmV?d00001 diff --git a/images/contributing/release-process.jpg b/images/contributing/release-process.jpg new file mode 100644 index 0000000000000000000000000000000000000000..28c58b3fdadd16b86393d96a460254b8e9666c9e GIT binary patch literal 69131 zcmd42bzGHA(*S%C2M`45l5UXh?hufWl$NeTNQ;!H2-4jth;)~Lgwi4nBA|ePq|(xS z*EwK4_x-%@_x`?rzCG93ot>STotd4T-E)cOAI@h1Y$bU`c>n6xYgbOL>=Kzp}_)`iJRTk1u7!jrus3nrUjhmaZFb9XD zE4!(MlbI#ExswBjm#H%c7ds~hAS&VIY-(IE$#`wLlg^|kELX1(DPlZ#( zS;o@F_NKRsrKY#4mbtgRxsU~;ggCmWm#~+EvxB9ZDV3K4)X`PgON1+SVLC+k_7CDF<$E8>FLSt$;0mCV$H!NBqYSa$<4vd%?47ix!!klGxcI~bfpC) zpi{wR$XdFZyVyFr**ZC1%CZC<|4Z0khQUVQmVxY4RHCr1u)2+tn-i#&i>Hnw*`eZQ=elJ5 zljIklJk-?HM%~uyC-2YxFMcq9F8O~B{UrS*L&gc}fJN*d(FR7~1rCg2FrGPnMLpR0wQnpP!Oh|V+ZE^YsP&36GA8O8 zYVwM=6&dyLoDgbbBbaMgYjp~k`J{9UDfC!KP7yv1NVQTK`ETyh~3$|Th zw6ON?vO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rdg3GSX4VWz+Q zx0WkayoZLvp@WIkketHLevFd$%%|4fHKEiMKX-~|Ji!liJ|L&PTS^K5r3=4%dadPM zS&MMg{4~hOoBb(@va%2L6`rB-g{5VE@v%w1yX=AUYnmf>$Vi{%4@QW@_TT-%+Bmc) zjU1XMm;@>lV4s`@6=MM7z9+fqAbq-ii;mj9s%LV+?7dcN+Kj#cSH7+I?n!p}+x%|U zz|%7{6hLdg?I;Pj%{hK{@L%}%6;KtjVceS8%Q&(Ei0`3mLH{pkh&Xn0%u>e0gBx>P X-Trt@gB{7|jJFKt@iH#{>*4 Date: Fri, 5 Sep 2014 10:49:06 +0200 Subject: [PATCH 041/106] fix name of the Yaml component The component name that is used in the code as well as in the issue tracker used by the symfony/symfony repository is Yaml (instead of YAML). Therefore, this should also be the name being used in the documentation. --- .../dependency_injection/introduction.rst | 2 +- components/yaml/introduction.rst | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/components/dependency_injection/introduction.rst b/components/dependency_injection/introduction.rst index 50d5d2d19c5..e58e6409726 100644 --- a/components/dependency_injection/introduction.rst +++ b/components/dependency_injection/introduction.rst @@ -209,7 +209,7 @@ Loading a YAML config file:: .. note:: If you want to load YAML config files then you will also need to install - :doc:`The YAML component `. + :doc:`the Yaml component `. If you *do* want to use PHP to create the services then you can move this into a separate config file and load it in a similar way:: diff --git a/components/yaml/introduction.rst b/components/yaml/introduction.rst index bfc0c7f102e..0ebcd7156a5 100644 --- a/components/yaml/introduction.rst +++ b/components/yaml/introduction.rst @@ -2,15 +2,15 @@ single: Yaml single: Components; Yaml -The YAML Component +The Yaml Component ================== - The YAML Component loads and dumps YAML files. + The Yaml component loads and dumps YAML files. What is It? ----------- -The Symfony2 YAML Component parses YAML strings to convert them to PHP arrays. +The Symfony2 Yaml component parses YAML strings to convert them to PHP arrays. It is also able to convert PHP arrays to YAML strings. `YAML`_, *YAML Ain't Markup Language*, is a human friendly data serialization @@ -18,7 +18,7 @@ standard for all programming languages. YAML is a great format for your configuration files. YAML files are as expressive as XML files and as readable as INI files. -The Symfony2 YAML Component implements the YAML 1.2 version of the +The Symfony2 Yaml component implements the YAML 1.2 version of the specification. .. tip:: @@ -40,8 +40,9 @@ Why? Fast ~~~~ -One of the goal of Symfony YAML is to find the right balance between speed and -features. It supports just the needed feature to handle configuration files. +One of the goals of the Symfony Yaml component is to find the right balance +between speed and features. It supports just the needed features to handle +configuration files. Real Parser ~~~~~~~~~~~ @@ -75,10 +76,10 @@ Full Merge Key Support Full support for references, aliases, and full merge key. Don't repeat yourself by referencing common configuration bits. -Using the Symfony2 YAML Component +Using the Symfony2 Yaml Component --------------------------------- -The Symfony2 YAML Component is very simple and consists of two main classes: +The Symfony2 Yaml component is very simple and consists of two main classes: one parses YAML strings (:class:`Symfony\\Component\\Yaml\\Parser`), and the other dumps a PHP array to a YAML string (:class:`Symfony\\Component\\Yaml\\Dumper`). From 4238aada690f0d7b854012b91ad324bf79781434 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 5 Sep 2014 13:39:04 +0200 Subject: [PATCH 042/106] replace "Symfony2" with "Symfony" --- book/controller.rst | 36 ++++---- book/doctrine.rst | 2 +- book/forms.rst | 20 ++--- book/from_flat_php_to_symfony2.rst | 84 +++++++++--------- book/http_cache.rst | 85 ++++++++++--------- book/http_fundamentals.rst | 64 ++++++++------ book/installation.rst | 30 ++++--- book/internals.rst | 30 +++---- book/page_creation.rst | 64 +++++++------- book/performance.rst | 16 ++-- book/propel.rst | 10 +-- book/routing.rst | 16 ++-- book/security.rst | 20 ++--- book/service_container.rst | 44 +++++----- book/stable_api.rst | 8 +- book/templating.rst | 38 ++++----- book/testing.rst | 10 +-- book/translation.rst | 40 ++++----- book/validation.rst | 14 +-- components/class_loader/class_loader.rst | 2 +- components/class_loader/introduction.rst | 4 + components/console/helpers/dialoghelper.rst | 2 +- components/console/introduction.rst | 2 +- .../dependency_injection/compilation.rst | 4 +- components/dependency_injection/factories.rst | 2 +- .../dependency_injection/parentservices.rst | 2 +- components/dependency_injection/workflow.rst | 2 +- components/event_dispatcher/introduction.rst | 6 +- components/form/introduction.rst | 8 +- components/http_foundation/introduction.rst | 6 +- .../http_foundation/session_configuration.rst | 16 ++-- .../http_foundation/session_testing.rst | 2 +- components/http_foundation/sessions.rst | 12 +-- .../http_foundation/trusting_proxies.rst | 2 +- components/http_kernel/introduction.rst | 16 ++-- components/intl.rst | 2 +- components/templating/introduction.rst | 2 +- components/translation/introduction.rst | 4 +- components/translation/usage.rst | 66 +++++++------- components/using_components.rst | 8 +- components/yaml/introduction.rst | 19 ++++- conf.py | 2 +- contributing/code/bugs.rst | 4 +- contributing/code/conventions.rst | 2 +- contributing/code/license.rst | 8 +- contributing/code/patches.rst | 14 +-- contributing/code/standards.rst | 12 +-- contributing/code/tests.rst | 14 +-- contributing/documentation/format.rst | 4 +- contributing/documentation/license.rst | 8 +- contributing/documentation/overview.rst | 10 +-- contributing/documentation/translations.rst | 4 +- cookbook/assetic/uglifyjs.rst | 2 +- cookbook/cache/varnish.rst | 24 +++--- cookbook/configuration/apache_router.rst | 6 +- .../configuration_organization.rst | 2 +- cookbook/configuration/environments.rst | 18 ++-- .../configuration/external_parameters.rst | 8 +- .../front_controllers_and_kernel.rst | 10 +-- .../configuration/pdo_session_storage.rst | 4 +- .../web_server_configuration.rst | 2 +- cookbook/console/console_command.rst | 4 +- cookbook/controller/error_pages.rst | 8 +- cookbook/controller/service.rst | 2 +- cookbook/deployment/azure-website.rst | 6 +- cookbook/deployment/heroku.rst | 44 +++++----- cookbook/deployment/tools.rst | 30 ++++--- cookbook/doctrine/common_extensions.rst | 2 +- cookbook/doctrine/dbal.rst | 6 +- cookbook/doctrine/file_uploads.rst | 2 +- .../doctrine/multiple_entity_managers.rst | 2 +- cookbook/email/dev_environment.rst | 2 +- cookbook/email/email.rst | 2 +- cookbook/email/spool.rst | 2 +- cookbook/email/testing.rst | 4 +- .../event_dispatcher/before_after_filters.rst | 2 +- cookbook/logging/channels_handlers.rst | 2 +- cookbook/logging/monolog.rst | 2 +- cookbook/profiler/data_collector.rst | 4 +- cookbook/profiler/matchers.rst | 2 +- cookbook/routing/method_parameters.rst | 4 +- cookbook/routing/redirect_trailing_slash.rst | 2 +- cookbook/security/acl.rst | 4 +- cookbook/security/acl_advanced.rst | 8 +- .../custom_authentication_provider.rst | 6 +- cookbook/security/form_login.rst | 2 +- cookbook/security/securing_services.rst | 2 +- cookbook/security/voters.rst | 4 +- cookbook/security/voters_data_permission.rst | 4 +- cookbook/templating/PHP.rst | 16 ++-- cookbook/templating/namespaced_paths.rst | 2 +- cookbook/testing/profiling.rst | 2 +- cookbook/validation/custom_constraint.rst | 8 +- cookbook/web_services/php_soap_extension.rst | 6 +- cookbook/workflow/new_project_git.rst | 18 ++-- cookbook/workflow/new_project_svn.rst | 22 ++--- glossary.rst | 18 ++-- index.rst | 14 +-- quick_tour/the_architecture.rst | 24 +++--- quick_tour/the_big_picture.rst | 70 ++++++++------- quick_tour/the_controller.rst | 18 ++-- quick_tour/the_view.rst | 10 +-- reference/configuration/doctrine.rst | 4 +- reference/configuration/framework.rst | 2 +- reference/configuration/security.rst | 2 +- reference/constraints.rst | 4 +- reference/dic_tags.rst | 6 +- reference/forms/types.rst | 4 +- reference/map.rst.inc | 2 +- reference/requirements.rst | 10 ++- reference/twig_reference.rst | 16 ++-- 111 files changed, 749 insertions(+), 671 deletions(-) diff --git a/book/controller.rst b/book/controller.rst index 8e0db4b8bc7..17902efcf9e 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -5,13 +5,13 @@ Controller ========== A controller is a PHP function you create that takes information from the -HTTP request and constructs and returns an HTTP response (as a Symfony2 +HTTP request and constructs and returns an HTTP response (as a Symfony ``Response`` object). The response could be an HTML page, an XML document, a serialized JSON array, an image, a redirect, a 404 error or anything else you can dream up. The controller contains whatever arbitrary logic *your application* needs to render the content of a page. -See how simple this is by looking at a Symfony2 controller in action. +See how simple this is by looking at a Symfony controller in action. The following controller would render a page that simply prints ``Hello world!``:: use Symfony\Component\HttpFoundation\Response; @@ -50,7 +50,7 @@ common examples: Requests, Controller, Response Lifecycle ---------------------------------------- -Every request handled by a Symfony2 project goes through the same simple lifecycle. +Every request handled by a Symfony project goes through the same simple lifecycle. The framework takes care of the repetitive tasks and ultimately executes a controller, which houses your custom application code: @@ -87,7 +87,7 @@ A Simple Controller ------------------- While a controller can be any PHP callable (a function, method on an object, -or a ``Closure``), in Symfony2, a controller is usually a single method inside +or a ``Closure``), in Symfony, a controller is usually a single method inside a controller object. Controllers are also called *actions*. .. code-block:: php @@ -117,7 +117,7 @@ a controller object. Controllers are also called *actions*. This controller is pretty straightforward: -* *line 4*: Symfony2 takes advantage of PHP 5.3 namespace functionality to +* *line 4*: Symfony takes advantage of PHP 5.3 namespace functionality to namespace the entire controller class. The ``use`` keyword imports the ``Response`` class, which the controller must return. @@ -185,8 +185,8 @@ controller and passes in ``ryan`` for the ``$name`` variable. Creating a "page" means simply creating a controller method and associated route. Notice the syntax used to refer to the controller: ``AcmeHelloBundle:Hello:index``. -Symfony2 uses a flexible string notation to refer to different controllers. -This is the most common syntax and tells Symfony2 to look for a controller +Symfony uses a flexible string notation to refer to different controllers. +This is the most common syntax and tells Symfony to look for a controller class called ``HelloController`` inside a bundle named ``AcmeHelloBundle``. The method ``indexAction()`` is then executed. @@ -232,7 +232,7 @@ passed to that method:: The controller has a single argument, ``$name``, which corresponds to the ``{name}`` parameter from the matched route (``ryan`` in the example). In -fact, when executing your controller, Symfony2 matches each argument of +fact, when executing your controller, Symfony matches each argument of the controller with a parameter from the matched route. Take the following example: @@ -369,7 +369,7 @@ Use it! See :doc:`/cookbook/templating/render_without_controller`. The Base Controller Class ------------------------- -For convenience, Symfony2 comes with a base ``Controller`` class that assists +For convenience, Symfony comes with a base ``Controller`` class that assists with some of the most common controller tasks and gives your controller class access to any resource it might need. By extending this ``Controller`` class, you can take advantage of several helper methods. @@ -393,7 +393,7 @@ Add the ``use`` statement atop the ``Controller`` class and then modify the This doesn't actually change anything about how your controller works. In the next section, you'll learn about the helper methods that the base controller -class makes available. These methods are just shortcuts to using core Symfony2 +class makes available. These methods are just shortcuts to using core Symfony functionality that's available to you with or without the use of the base ``Controller`` class. A great way to see the core functionality in action is to look in the @@ -427,7 +427,7 @@ Common Controller Tasks Though a controller can do virtually anything, most controllers will perform the same basic tasks over and over again. These tasks, such as redirecting, forwarding, rendering templates and accessing core services, are very easy -to manage in Symfony2. +to manage in Symfony. .. index:: single: Controller; Redirecting @@ -501,15 +501,15 @@ look something like the following:: } And just like when creating a controller for a route, the order of the arguments -to ``fancyAction`` doesn't matter. Symfony2 matches the index key names +to ``fancyAction`` doesn't matter. Symfony matches the index key names (e.g. ``name``) with the method argument names (e.g. ``$name``). If you -change the order of the arguments, Symfony2 will still pass the correct +change the order of the arguments, Symfony will still pass the correct value to each variable. .. tip:: Like other base ``Controller`` methods, the ``forward`` method is just - a shortcut for core Symfony2 functionality. A forward can be accomplished + a shortcut for core Symfony functionality. A forward can be accomplished directly by duplicating the current request. When this :ref:`sub request ` is executed via the ``http_kernel`` service the ``HttpKernel`` returns a ``Response`` object:: @@ -603,7 +603,7 @@ The Symfony templating engine is explained in great detail in the Accessing other Services ~~~~~~~~~~~~~~~~~~~~~~~~ -When extending the base controller class, you can access any Symfony2 service +When extending the base controller class, you can access any Symfony service via the ``get()`` method. Here are several common services you might need:: $templating = $this->get('templating'); @@ -648,7 +648,7 @@ The ``createNotFoundException()`` method creates a special ``NotFoundHttpExcepti object, which ultimately triggers a 404 HTTP response inside Symfony. Of course, you're free to throw any ``Exception`` class in your controller - -Symfony2 will automatically return a 500 HTTP response code. +Symfony will automatically return a 500 HTTP response code. .. code-block:: php @@ -666,9 +666,9 @@ Both of these error pages can be customized. For details, read the Managing the Session -------------------- -Symfony2 provides a nice session object that you can use to store information +Symfony provides a nice session object that you can use to store information about the user (be it a real person using a browser, a bot, or a web service) -between requests. By default, Symfony2 stores the attributes in a cookie +between requests. By default, Symfony stores the attributes in a cookie by using the native PHP sessions. Storing and retrieving information from the session can be easily achieved diff --git a/book/doctrine.rst b/book/doctrine.rst index 996dcdbee9f..39a07663ad0 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -125,7 +125,7 @@ for you: .. sidebar:: Setting up the Database to be UTF8 - One mistake even seasoned developers make when starting a Symfony2 project + One mistake even seasoned developers make when starting a Symfony project is forgetting to setup default charset and collation on their database, ending up with latin type collations, which are default for most databases. They might even remember to do it the very first time, but forget that diff --git a/book/forms.rst b/book/forms.rst index 9d5a7ce543f..b6f4ddbfd4d 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -5,14 +5,14 @@ Forms ===== Dealing with HTML forms is one of the most common - and challenging - tasks for -a web developer. Symfony2 integrates a Form component that makes dealing with +a web developer. Symfony integrates a Form component that makes dealing with forms easy. In this chapter, you'll build a complex form from the ground-up, learning the most important features of the form library along the way. .. note:: The Symfony Form component is a standalone library that can be used outside - of Symfony2 projects. For more information, see the `Symfony2 Form component`_ + of Symfony projects. For more information, see the `Symfony Form component`_ on GitHub. .. index:: @@ -80,7 +80,7 @@ Building the Form ~~~~~~~~~~~~~~~~~ Now that you've created a ``Task`` class, the next step is to create and -render the actual HTML form. In Symfony2, this is done by building a form +render the actual HTML form. In Symfony, this is done by building a form object and then rendering it in a template. For now, this can all be done from inside a controller:: @@ -119,7 +119,7 @@ from inside a controller:: how to build your form in a standalone class, which is recommended as your form becomes reusable. -Creating a form requires relatively little code because Symfony2 form objects +Creating a form requires relatively little code because Symfony form objects are built with a "form builder". The form builder's purpose is to allow you to write simple form "recipes", and have it do all the heavy-lifting of actually building the form. @@ -136,7 +136,7 @@ the server. Support for submit buttons was introduced in Symfony 2.3. Before that, you had to add buttons to the form's HTML manually. -Symfony2 comes with many built-in types that will be discussed shortly +Symfony comes with many built-in types that will be discussed shortly (see :ref:`book-forms-type-reference`). .. index:: @@ -318,7 +318,7 @@ Form Validation --------------- In the previous section, you learned how a form can be submitted with valid -or invalid data. In Symfony2, validation is applied to the underlying object +or invalid data. In Symfony, validation is applied to the underlying object (e.g. ``Task``). In other words, the question isn't whether the "form" is valid, but whether or not the ``$task`` object is valid after the form has applied the submitted data to it. Calling ``$form->isValid()`` is a shortcut @@ -441,7 +441,7 @@ corresponding errors printed out with the form. 'attr' => array('novalidate' => 'novalidate'), )) ?> -Validation is a very powerful feature of Symfony2 and has its own +Validation is a very powerful feature of Symfony and has its own :doc:`dedicated chapter `. .. index:: @@ -982,9 +982,9 @@ to the ``form()`` or the ``form_start()`` helper: .. note:: - If the form's method is not GET or POST, but PUT, PATCH or DELETE, Symfony2 + If the form's method is not GET or POST, but PUT, PATCH or DELETE, Symfony will insert a hidden field with the name ``_method`` that stores this method. - The form will be submitted in a normal POST request, but Symfony2's router + The form will be submitted in a normal POST request, but Symfony's router is capable of detecting the ``_method`` parameter and will interpret it as a PUT, PATCH or DELETE request. Read the cookbook chapter ":doc:`/cookbook/routing/method_parameters`" for more information. @@ -1901,7 +1901,7 @@ Learn more from the Cookbook * :doc:`/cookbook/form/dynamic_form_modification` * :doc:`/cookbook/form/data_transformers` -.. _`Symfony2 Form component`: https://github.com/symfony/Form +.. _`Symfony Form component`: https://github.com/symfony/Form .. _`DateTime`: http://php.net/manual/en/class.datetime.php .. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig .. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig diff --git a/book/from_flat_php_to_symfony2.rst b/book/from_flat_php_to_symfony2.rst index 565a57fd565..107ff0c22ed 100644 --- a/book/from_flat_php_to_symfony2.rst +++ b/book/from_flat_php_to_symfony2.rst @@ -1,11 +1,13 @@ -Symfony2 versus Flat PHP -======================== +.. _symfony2-versus-flat-php: -**Why is Symfony2 better than just opening up a file and writing flat PHP?** +Symfony versus Flat PHP +======================= + +**Why is Symfony better than just opening up a file and writing flat PHP?** If you've never used a PHP framework, aren't familiar with the MVC philosophy, -or just wonder what all the *hype* is around Symfony2, this chapter is for -you. Instead of *telling* you that Symfony2 allows you to develop faster and +or just wonder what all the *hype* is around Symfony, this chapter is for +you. Instead of *telling* you that Symfony allows you to develop faster and better software than with flat PHP, you'll see for yourself. In this chapter, you'll write a simple application in flat PHP, and then @@ -13,7 +15,7 @@ refactor it to be more organized. You'll travel through time, seeing the decisions behind why web development has evolved over the past several years to where it is now. -By the end, you'll see how Symfony2 can rescue you from mundane tasks and +By the end, you'll see how Symfony can rescue you from mundane tasks and let you take back control of your code. A Simple Blog in Flat PHP @@ -72,7 +74,7 @@ to maintain. There are several problems that need to be addressed: .. note:: Another problem not mentioned here is the fact that the database is - tied to MySQL. Though not covered here, Symfony2 fully integrates `Doctrine`_, + tied to MySQL. Though not covered here, Symfony fully integrates `Doctrine`_, a library dedicated to database abstraction and mapping. Isolating the Presentation @@ -244,7 +246,7 @@ the layout: You've now introduced a methodology that allows for the reuse of the layout. Unfortunately, to accomplish this, you're forced to use a few ugly -PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony2 +PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony uses a Templating component that allows this to be accomplished cleanly and easily. You'll see it in action shortly. @@ -396,14 +398,14 @@ As a front controller, ``index.php`` has taken on an entirely new role, one that includes loading the core libraries and routing the application so that one of the two controllers (the ``list_action()`` and ``show_action()`` functions) is called. In reality, the front controller is beginning to look and -act a lot like Symfony2's mechanism for handling and routing requests. +act a lot like Symfony's mechanism for handling and routing requests. .. tip:: Another advantage of a front controller is flexible URLs. Notice that the URL to the blog post show page could be changed from ``/show`` to ``/read`` by changing code in only one location. Before, an entire file needed to - be renamed. In Symfony2, URLs are even more flexible. + be renamed. In Symfony, URLs are even more flexible. By now, the application has evolved from a single PHP file into a structure that is organized and allows for code reuse. You should be happier, but far @@ -415,10 +417,12 @@ routing, calling controllers, templates, etc.). More time will need to be spent to handle form submissions, input validation, logging and security. Why should you have to reinvent solutions to all these routine problems? -Add a Touch of Symfony2 -~~~~~~~~~~~~~~~~~~~~~~~ +.. _add-a-touch-of-symfony2: + +Add a Touch of Symfony +~~~~~~~~~~~~~~~~~~~~~~ -Symfony2 to the rescue. Before actually using Symfony2, you need to download +Symfony to the rescue. Before actually using Symfony, you need to download it. This can be done by using Composer, which takes care of downloading the correct version and all its dependencies and provides an autoloader. An autoloader is a tool that makes it possible to start using PHP classes @@ -450,7 +454,7 @@ which takes care of autoloading for all the files in the Symfony Framework as we the files mentioned in the autoload section of your ``composer.json``. Core to Symfony's philosophy is the idea that an application's main job is -to interpret each request and return a response. To this end, Symfony2 provides +to interpret each request and return a response. To this end, Symfony provides both a :class:`Symfony\\Component\\HttpFoundation\\Request` and a :class:`Symfony\\Component\\HttpFoundation\\Response` class. These classes are object-oriented representations of the raw HTTP request being processed and @@ -485,7 +489,7 @@ the HTTP response being returned. Use them to improve the blog: The controllers are now responsible for returning a ``Response`` object. To make this easier, you can add a new ``render_template()`` function, which, -incidentally, acts quite a bit like the Symfony2 templating engine: +incidentally, acts quite a bit like the Symfony templating engine: .. code-block:: php @@ -519,7 +523,7 @@ incidentally, acts quite a bit like the Symfony2 templating engine: return $html; } -By bringing in a small part of Symfony2, the application is more flexible and +By bringing in a small part of Symfony, the application is more flexible and reliable. The ``Request`` provides a dependable way to access information about the HTTP request. Specifically, the ``getPathInfo()`` method returns a cleaned URI (always returning ``/show`` and never ``/index.php/show``). @@ -531,8 +535,10 @@ allowing HTTP headers and content to be added via an object-oriented interface. And while the responses in this application are simple, this flexibility will pay dividends as your application grows. -The Sample Application in Symfony2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _the-sample-application-in-symfony2: + +The Sample Application in Symfony +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The blog has come a *long* way, but it still contains a lot of code for such a simple application. Along the way, you've made a simple routing @@ -541,8 +547,8 @@ templates. If, for some reason, you needed to continue building this "framework" from scratch, you could at least use Symfony's standalone `Routing`_ and `Templating`_ components, which already solve these problems. -Instead of re-solving common problems, you can let Symfony2 take care of -them for you. Here's the same sample application, now built in Symfony2:: +Instead of re-solving common problems, you can let Symfony take care of +them for you. Here's the same sample application, now built in Symfony:: // src/Acme/BlogBundle/Controller/BlogController.php namespace Acme\BlogBundle\Controller; @@ -632,7 +638,7 @@ The layout is nearly identical: The show template is left as an exercise, as it should be trivial to create based on the list template. -When Symfony2's engine (called the ``Kernel``) boots up, it needs a map so +When Symfony's engine (called the ``Kernel``) boots up, it needs a map so that it knows which controllers to execute based on the request information. A routing configuration map provides this information in a readable format: @@ -647,9 +653,9 @@ A routing configuration map provides this information in a readable format: path: /blog/show/{id} defaults: { _controller: AcmeBlogBundle:Blog:show } -Now that Symfony2 is handling all the mundane tasks, the front controller +Now that Symfony is handling all the mundane tasks, the front controller is dead simple. And since it does so little, you'll never have to touch -it once it's created (and if you use a Symfony2 distribution, you won't +it once it's created (and if you use a Symfony distribution, you won't even need to create it!):: // web/app.php @@ -661,21 +667,23 @@ even need to create it!):: $kernel = new AppKernel('prod', false); $kernel->handle(Request::createFromGlobals())->send(); -The front controller's only job is to initialize Symfony2's engine (``Kernel``) -and pass it a ``Request`` object to handle. Symfony2's core then uses the +The front controller's only job is to initialize Symfony's engine (``Kernel``) +and pass it a ``Request`` object to handle. Symfony's core then uses the routing map to determine which controller to call. Just like before, the controller method is responsible for returning the final ``Response`` object. There's really not much else to it. -For a visual representation of how Symfony2 handles each request, see the +For a visual representation of how Symfony handles each request, see the :ref:`request flow diagram `. -Where Symfony2 Delivers -~~~~~~~~~~~~~~~~~~~~~~~ +.. _where-symfony2-delivers: + +Where Symfony Delivers +~~~~~~~~~~~~~~~~~~~~~~ In the upcoming chapters, you'll learn more about how each piece of Symfony works and the recommended organization of a project. For now, have a look -at how migrating the blog from flat PHP to Symfony2 has improved life: +at how migrating the blog from flat PHP to Symfony has improved life: * Your application now has **clear and consistently organized code** (though Symfony doesn't force you into this). This promotes **reusability** and @@ -685,26 +693,26 @@ at how migrating the blog from flat PHP to Symfony2 has improved life: to develop or maintain low-level utilities** such as :ref:`autoloading `, :doc:`routing `, or rendering :doc:`controllers `; -* Symfony2 gives you **access to open source tools** such as Doctrine and the +* Symfony gives you **access to open source tools** such as Doctrine and the Templating, Security, Form, Validation and Translation components (to name a few); * The application now enjoys **fully-flexible URLs** thanks to the Routing component; -* Symfony2's HTTP-centric architecture gives you access to powerful tools - such as **HTTP caching** powered by **Symfony2's internal HTTP cache** or +* Symfony's HTTP-centric architecture gives you access to powerful tools + such as **HTTP caching** powered by **Symfony's internal HTTP cache** or more powerful tools such as `Varnish`_. This is covered in a later chapter all about :doc:`caching `. -And perhaps best of all, by using Symfony2, you now have access to a whole -set of **high-quality open source tools developed by the Symfony2 community**! -A good selection of Symfony2 community tools can be found on `KnpBundles.com`_. +And perhaps best of all, by using Symfony, you now have access to a whole +set of **high-quality open source tools developed by the Symfony community**! +A good selection of Symfony community tools can be found on `KnpBundles.com`_. Better Templates ---------------- -If you choose to use it, Symfony2 comes standard with a templating engine +If you choose to use it, Symfony comes standard with a templating engine called `Twig`_ that makes templates faster to write and easier to read. It means that the sample application could contain even less code! Take, for example, the list template written in Twig: @@ -744,8 +752,8 @@ The corresponding ``layout.html.twig`` template is also easier to write: -Twig is well-supported in Symfony2. And while PHP templates will always -be supported in Symfony2, the many advantages of Twig will continue to +Twig is well-supported in Symfony. And while PHP templates will always +be supported in Symfony, the many advantages of Twig will continue to be discussed. For more information, see the :doc:`templating chapter `. Learn more from the Cookbook diff --git a/book/http_cache.rst b/book/http_cache.rst index dc77604fd63..766f9303a9d 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -8,7 +8,7 @@ The nature of rich web applications means that they're dynamic. No matter how efficient your application, each request will always contain more overhead than serving a static file. -And for most Web applications, that's fine. Symfony2 is lightning fast, and +And for most Web applications, that's fine. Symfony is lightning fast, and unless you're doing some serious heavy-lifting, each request will come back quickly without putting too much stress on your server. @@ -22,28 +22,28 @@ Caching on the Shoulders of Giants The most effective way to improve performance of an application is to cache the full output of a page and then bypass the application entirely on each subsequent request. Of course, this isn't always possible for highly dynamic -websites, or is it? In this chapter, you'll see how the Symfony2 cache +websites, or is it? In this chapter, you'll see how the Symfony cache system works and why this is the best possible approach. -The Symfony2 cache system is different because it relies on the simplicity +The Symfony cache system is different because it relies on the simplicity and power of the HTTP cache as defined in the :term:`HTTP specification`. -Instead of reinventing a caching methodology, Symfony2 embraces the standard +Instead of reinventing a caching methodology, Symfony embraces the standard that defines basic communication on the Web. Once you understand the fundamental HTTP validation and expiration caching models, you'll be ready to master -the Symfony2 cache system. +the Symfony cache system. -For the purposes of learning how to cache with Symfony2, the +For the purposes of learning how to cache with Symfony, the subject is covered in four steps: #. A :ref:`gateway cache `, or reverse proxy, is an independent layer that sits in front of your application. The reverse proxy caches responses as they're returned from your application and answers - requests with cached responses before they hit your application. Symfony2 + requests with cached responses before they hit your application. Symfony provides its own reverse proxy, but any reverse proxy can be used. #. :ref:`HTTP cache ` headers are used to communicate with the gateway cache and any other caches between your - application and the client. Symfony2 provides sensible defaults and a + application and the client. Symfony provides sensible defaults and a powerful interface for interacting with the cache headers. #. HTTP :ref:`expiration and validation ` @@ -85,7 +85,7 @@ the cache sends the cached response to the client, ignoring your application entirely. This type of cache is known as a HTTP gateway cache and many exist such -as `Varnish`_, `Squid in reverse proxy mode`_, and the Symfony2 reverse proxy. +as `Varnish`_, `Squid in reverse proxy mode`_, and the Symfony reverse proxy. .. index:: single: Cache; Types of @@ -126,16 +126,17 @@ the first two cache types. These caches are outside of your control but follow the HTTP cache directions set in the response. .. index:: - single: Cache; Symfony2 reverse proxy + single: Cache; Symfony reverse proxy .. _`symfony-gateway-cache`: +.. _symfony2-reverse-proxy: -Symfony2 Reverse Proxy -~~~~~~~~~~~~~~~~~~~~~~ +Symfony Reverse Proxy +~~~~~~~~~~~~~~~~~~~~~ -Symfony2 comes with a reverse proxy (also called a gateway cache) written +Symfony comes with a reverse proxy (also called a gateway cache) written in PHP. Enable it and cacheable responses from your application will start -to be cached right away. Installing it is just as easy. Each new Symfony2 +to be cached right away. Installing it is just as easy. Each new Symfony application comes with a pre-configured caching kernel (``AppCache``) that wraps the default one (``AppKernel``). The caching Kernel *is* the reverse proxy. @@ -234,28 +235,28 @@ Here is a list of the main options: error is encountered (default: ``60``). This setting is overridden by the ``stale-if-error`` HTTP ``Cache-Control`` extension (see RFC 5861). -If ``debug`` is ``true``, Symfony2 automatically adds a ``X-Symfony-Cache`` +If ``debug`` is ``true``, Symfony automatically adds a ``X-Symfony-Cache`` header to the response containing useful information about cache hits and misses. .. sidebar:: Changing from one Reverse Proxy to another - The Symfony2 reverse proxy is a great tool to use when developing your + The Symfony reverse proxy is a great tool to use when developing your website or when you deploy your website to a shared host where you cannot install anything beyond PHP code. But being written in PHP, it cannot be as fast as a proxy written in C. That's why it is highly recommended you use Varnish or Squid on your production servers if possible. The good news is that the switch from one proxy server to another is easy and transparent as no code modification is needed in your application. Start - easy with the Symfony2 reverse proxy and upgrade later to Varnish when + easy with the Symfony reverse proxy and upgrade later to Varnish when your traffic increases. - For more information on using Varnish with Symfony2, see the + For more information on using Varnish with Symfony, see the :doc:`How to use Varnish ` cookbook chapter. .. note:: - The performance of the Symfony2 reverse proxy is independent of the + The performance of the Symfony reverse proxy is independent of the complexity of the application. That's because the application kernel is only booted when the request needs to be forwarded to it. @@ -349,7 +350,7 @@ To handle this situation, every response may be set to be public or private: for a single user and must not be cached by a shared cache. Symfony conservatively defaults each response to be private. To take advantage -of shared caches (like the Symfony2 reverse proxy), the response will need +of shared caches (like the Symfony reverse proxy), the response will need to be explicitly set as public. .. index:: @@ -381,7 +382,7 @@ HTTP 1.1 allows caching anything by default unless there is an explicit have a cookie, an authorization header, use a non-safe method (i.e. PUT, POST, DELETE), or when responses have a redirect status code. -Symfony2 automatically sets a sensible and conservative ``Cache-Control`` +Symfony automatically sets a sensible and conservative ``Cache-Control`` header when none is set by the developer by following these rules: * If no cache header is defined (``Cache-Control``, ``Expires``, ``ETag`` @@ -392,7 +393,7 @@ header when none is set by the developer by following these rules: its value is set to ``private, must-revalidate``; * But if at least one ``Cache-Control`` directive is set, and no ``public`` or - ``private`` directives have been explicitly added, Symfony2 adds the + ``private`` directives have been explicitly added, Symfony adds the ``private`` directive automatically (except when ``s-maxage`` is set). .. _http-expiration-validation: @@ -595,7 +596,7 @@ doing so much work. .. tip:: - Symfony2 also supports weak ETags by passing ``true`` as the second + Symfony also supports weak ETags by passing ``true`` as the second argument to the :method:`Symfony\\Component\\HttpFoundation\\Response::setETag` method. @@ -766,7 +767,7 @@ at some interval (the expiration) to verify that the content is still valid. .. tip:: You can also define HTTP caching headers for expiration and validation by using - annotations. See the + annotations. See the :doc:`FrameworkExtraBundle documentation `. .. index:: @@ -809,13 +810,13 @@ Using Edge Side Includes Gateway caches are a great way to make your website perform better. But they have one limitation: they can only cache whole pages. If you can't cache whole pages or if parts of a page has "more" dynamic parts, you are out of -luck. Fortunately, Symfony2 provides a solution for these cases, based on a +luck. Fortunately, Symfony provides a solution for these cases, based on a technology called `ESI`_, or Edge Side Includes. Akamai wrote this specification almost 10 years ago, and it allows specific parts of a page to have a different caching strategy than the main page. The ESI specification describes tags you can embed in your pages to communicate -with the gateway cache. Only one tag is implemented in Symfony2, ``include``, +with the gateway cache. Only one tag is implemented in Symfony, ``include``, as this is the only useful one outside of Akamai context: .. code-block:: html @@ -848,10 +849,12 @@ page and sends the final content to the client. All of this happens transparently at the gateway cache level (i.e. outside of your application). As you'll see, if you choose to take advantage of ESI -tags, Symfony2 makes the process of including them almost effortless. +tags, Symfony makes the process of including them almost effortless. -Using ESI in Symfony2 -~~~~~~~~~~~~~~~~~~~~~ +.. _using-esi-in-symfony2: + +Using ESI in Symfony +~~~~~~~~~~~~~~~~~~~~ First, to use ESI, be sure to enable it in your application configuration: @@ -909,7 +912,7 @@ This is done via the ``render`` helper (See :ref:`templating-embedding-controlle for more details). As the embedded content comes from another page (or controller for that -matter), Symfony2 uses the standard ``render`` helper to configure ESI tags: +matter), Symfony uses the standard ``render`` helper to configure ESI tags: .. configuration-block:: @@ -934,24 +937,24 @@ matter), Symfony2 uses the standard ``render`` helper to configure ESI tags: ) ?> By using the ``esi`` renderer (via the ``render_esi`` Twig function), you -tell Symfony2 that the action should be rendered as an ESI tag. You might be +tell Symfony that the action should be rendered as an ESI tag. You might be wondering why you would want to use a helper instead of just writing the ESI tag yourself. That's because using a helper makes your application work even if there is no gateway cache installed. When using the default ``render`` function (or setting the renderer to -``inline``), Symfony2 merges the included page content into the main one +``inline``), Symfony merges the included page content into the main one before sending the response to the client. But if you use the ``esi`` renderer -(i.e. call ``render_esi``), *and* if Symfony2 detects that it's talking to a +(i.e. call ``render_esi``), *and* if Symfony detects that it's talking to a gateway cache that supports ESI, it generates an ESI include tag. But if there -is no gateway cache or if it does not support ESI, Symfony2 will just merge +is no gateway cache or if it does not support ESI, Symfony will just merge the included page content within the main one as it would have done if you had used ``render``. .. note:: - Symfony2 detects if a gateway cache supports ESI via another Akamai - specification that is supported out of the box by the Symfony2 reverse + Symfony detects if a gateway cache supports ESI via another Akamai + specification that is supported out of the box by the Symfony reverse proxy. The embedded action can now specify its own caching rules, entirely independent @@ -971,7 +974,7 @@ component cache will only last for 60 seconds. When using a controller reference, the ESI tag should reference the embedded action as an accessible URL so the gateway cache can fetch it independently of -the rest of the page. Symfony2 takes care of generating a unique URL for any +the rest of the page. Symfony takes care of generating a unique URL for any controller reference and it is able to route them properly thanks to the :class:`Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener` that must be enabled in your configuration: @@ -1062,7 +1065,7 @@ Actually, all reverse proxies provide ways to purge cached data, but you should avoid them as much as possible. The most standard way is to purge the cache for a given URL by requesting it with the special ``PURGE`` HTTP method. -Here is how you can configure the Symfony2 reverse proxy to support the +Here is how you can configure the Symfony reverse proxy to support the ``PURGE`` HTTP method:: // app/AppCache.php @@ -1102,10 +1105,10 @@ Here is how you can configure the Symfony2 reverse proxy to support the Summary ------- -Symfony2 was designed to follow the proven rules of the road: HTTP. Caching -is no exception. Mastering the Symfony2 cache system means becoming familiar +Symfony was designed to follow the proven rules of the road: HTTP. Caching +is no exception. Mastering the Symfony cache system means becoming familiar with the HTTP cache models and using them effectively. This means that, instead -of relying only on Symfony2 documentation and code examples, you have access +of relying only on Symfony documentation and code examples, you have access to a world of knowledge related to HTTP caching and gateway caches such as Varnish. diff --git a/book/http_fundamentals.rst b/book/http_fundamentals.rst index 8db213faa9b..50a7eadd91f 100644 --- a/book/http_fundamentals.rst +++ b/book/http_fundamentals.rst @@ -1,21 +1,23 @@ .. index:: - single: Symfony2 Fundamentals + single: Symfony Fundamentals -Symfony2 and HTTP Fundamentals -============================== +.. _symfony2-and-http-fundamentals: -Congratulations! By learning about Symfony2, you're well on your way towards +Symfony and HTTP Fundamentals +============================= + +Congratulations! By learning about Symfony, you're well on your way towards being a more *productive*, *well-rounded* and *popular* web developer (actually, -you're on your own for the last part). Symfony2 is built to get back to +you're on your own for the last part). Symfony is built to get back to basics: to develop tools that let you develop faster and build more robust applications, while staying out of your way. Symfony is built on the best ideas from many technologies: the tools and concepts you're about to learn represent the efforts of thousands of people, over many years. In other words, you're not just learning "Symfony", you're learning the fundamentals of the web, development best practices, and how to use many amazing new PHP libraries, -inside or independently of Symfony2. So, get ready. +inside or independently of Symfony. So, get ready. -True to the Symfony2 philosophy, this chapter begins by explaining the fundamental +True to the Symfony philosophy, this chapter begins by explaining the fundamental concept common to web development: HTTP. Regardless of your background or preferred programming language, this chapter is a **must-read** for everyone. @@ -35,8 +37,8 @@ HTTP is the term used to describe this simple text-based language. And no matter how you develop on the web, the goal of your server is *always* to understand simple text requests, and return simple text responses. -Symfony2 is built from the ground-up around that reality. Whether you realize -it or not, HTTP is something you use everyday. With Symfony2, you'll learn +Symfony is built from the ground-up around that reality. Whether you realize +it or not, HTTP is something you use everyday. With Symfony, you'll learn how to master it. .. index:: @@ -173,7 +175,7 @@ Symfony is architected to match this reality. while browsing is the `Live HTTP Headers`_ extension for Firefox. .. index:: - single: Symfony2 Fundamentals; Requests and responses + single: Symfony Fundamentals; Requests and responses Requests and Responses in PHP ----------------------------- @@ -264,7 +266,7 @@ the user is connecting via a secured connection (i.e. HTTPS). The Request class also has a public ``attributes`` property, which holds special data related to how the application works internally. For the - Symfony2 framework, the ``attributes`` holds the values returned by the + Symfony framework, the ``attributes`` holds the values returned by the matched route, like ``_controller``, ``id`` (if you have an ``{id}`` wildcard), and even the name of the matched route (``_route``). The ``attributes`` property exists entirely to be a place where you can @@ -393,7 +395,7 @@ the same simple pattern for every request: .. figure:: /images/request-flow.png :align: center - :alt: Symfony2 request flow + :alt: Symfony request flow Incoming requests are interpreted by the routing and passed to controller functions that return ``Response`` objects. @@ -491,8 +493,10 @@ template file. This frees up the controller to worry only about the hard stuff: interacting with the database, handling submitted data, or sending email messages. -Symfony2: Build your App, not your Tools. ------------------------------------------ +.. _symfony2-build-your-app-not-your-tools: + +Symfony: Build your App, not your Tools. +---------------------------------------- You now know that the goal of any app is to interpret each incoming request and create an appropriate response. As an application grows, it becomes more @@ -503,18 +507,20 @@ emails, validating user input and handling security. The good news is that none of these problems is unique. Symfony provides a framework full of tools that allow you to build your application, not your -tools. With Symfony2, nothing is imposed on you: you're free to use the full +tools. With Symfony, nothing is imposed on you: you're free to use the full Symfony framework, or just one piece of Symfony all by itself. .. index:: - single: Symfony2 Components + single: Symfony Components -Standalone Tools: The Symfony2 *Components* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _standalone-tools-the-symfony2-components: -So what *is* Symfony2? First, Symfony2 is a collection of over twenty independent +Standalone Tools: The Symfony *Components* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +So what *is* Symfony? First, Symfony is a collection of over twenty independent libraries that can be used inside *any* PHP project. These libraries, called -the *Symfony2 Components*, contain something useful for almost any situation, +the *Symfony Components*, contain something useful for almost any situation, regardless of how your project is developed. To name a few: * :doc:`HttpFoundation ` - Contains @@ -546,16 +552,18 @@ regardless of how your project is developed. To name a few: * `Translation`_ - A framework for translating strings in your application. Each and every one of these components is decoupled and can be used in *any* -PHP project, regardless of whether or not you use the Symfony2 framework. +PHP project, regardless of whether or not you use the Symfony framework. Every part is made to be used if needed and replaced when necessary. -The Full Solution: The Symfony2 *Framework* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _the-full-solution-the-symfony2-framework: + +The Full Solution: The Symfony *Framework* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -So then, what *is* the Symfony2 *Framework*? The *Symfony2 Framework* is +So then, what *is* the Symfony *Framework*? The *Symfony Framework* is a PHP library that accomplishes two distinct tasks: -#. Provides a selection of components (i.e. the Symfony2 Components) and +#. Provides a selection of components (i.e. the Symfony Components) and third-party libraries (e.g. `Swift Mailer`_ for sending emails); #. Provides sensible configuration and a "glue" library that ties all of these @@ -563,12 +571,12 @@ a PHP library that accomplishes two distinct tasks: The goal of the framework is to integrate many independent tools in order to provide a consistent experience for the developer. Even the framework -itself is a Symfony2 bundle (i.e. a plugin) that can be configured or replaced +itself is a Symfony bundle (i.e. a plugin) that can be configured or replaced entirely. -Symfony2 provides a powerful set of tools for rapidly developing web applications +Symfony provides a powerful set of tools for rapidly developing web applications without imposing on your application. Normal users can quickly start development -by using a Symfony2 distribution, which provides a project skeleton with +by using a Symfony distribution, which provides a project skeleton with sensible defaults. For more advanced users, the sky is the limit. .. _`xkcd`: http://xkcd.com/ diff --git a/book/installation.rst b/book/installation.rst index 2ad27b8d8ac..560c4852bb0 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -14,30 +14,32 @@ developing in immediately. If you're looking for instructions on how best to create a new project and store it via source control, see `Using Source Control`_. -Installing a Symfony2 Distribution ----------------------------------- +.. _installing-a-symfony2-distribution: + +Installing a Symfony Distribution +--------------------------------- .. tip:: First, check that you have installed and configured a Web server (such - as Apache) with PHP. For more information on Symfony2 requirements, see the + as Apache) with PHP. For more information on Symfony requirements, see the :doc:`requirements reference `. -Symfony2 packages "distributions", which are fully-functional applications -that include the Symfony2 core libraries, a selection of useful bundles, a +Symfony packages "distributions", which are fully-functional applications +that include the Symfony core libraries, a selection of useful bundles, a sensible directory structure and some default configuration. When you download -a Symfony2 distribution, you're downloading a functional application skeleton +a Symfony distribution, you're downloading a functional application skeleton that can be used immediately to begin developing your application. -Start by visiting the Symfony2 download page at `http://symfony.com/download`_. +Start by visiting the Symfony download page at `http://symfony.com/download`_. On this page, you'll see the *Symfony Standard Edition*, which is the main -Symfony2 distribution. There are 2 ways to get your project started: +Symfony distribution. There are 2 ways to get your project started: Option 1) Composer ~~~~~~~~~~~~~~~~~~ `Composer`_ is a dependency management library for PHP, which you can use -to download the Symfony2 Standard Edition. +to download the Symfony Standard Edition. Start by `downloading Composer`_ anywhere onto your local computer. If you have curl installed, it's as easy as: @@ -119,7 +121,7 @@ next section. information. All public files and the front controller that handles incoming requests in -a Symfony2 application live in the ``Symfony/web/`` directory. So, assuming +a Symfony application live in the ``Symfony/web/`` directory. So, assuming you unpacked the archive into your web server's or virtual host's document root, your application's URLs will start with ``http://localhost/Symfony/web/``. @@ -202,7 +204,7 @@ At this point, all of the needed third-party libraries now live in the ``vendor/ directory. You also have a default application setup in ``app/`` and some sample code inside the ``src/`` directory. -Symfony2 comes with a visual server configuration tester to help make sure +Symfony comes with a visual server configuration tester to help make sure your Web server and PHP are configured to use Symfony. Use the following URL to check your configuration: @@ -282,13 +284,13 @@ If there are any issues, correct them now before moving on. and Group values). When everything is fine, click on "Go to the Welcome page" to request your -first "real" Symfony2 webpage: +first "real" Symfony webpage: .. code-block:: text http://localhost/app_dev.php/ -Symfony2 should welcome and congratulate you for your hard work so far! +Symfony should welcome and congratulate you for your hard work so far! .. image:: /images/quick_tour/welcome.png @@ -307,7 +309,7 @@ Symfony2 should welcome and congratulate you for your hard work so far! Beginning Development --------------------- -Now that you have a fully-functional Symfony2 application, you can begin +Now that you have a fully-functional Symfony application, you can begin development! Your distribution may contain some sample code - check the ``README.md`` file included with the distribution (open it as a text file) to learn about what sample code was included with your distribution. diff --git a/book/internals.rst b/book/internals.rst index 939b0f56839..1bd8db4699f 100644 --- a/book/internals.rst +++ b/book/internals.rst @@ -4,19 +4,19 @@ Internals ========= -Looks like you want to understand how Symfony2 works and how to extend it. +Looks like you want to understand how Symfony works and how to extend it. That makes me very happy! This section is an in-depth explanation of the -Symfony2 internals. +Symfony internals. .. note:: - You only need to read this section if you want to understand how Symfony2 - works behind the scenes, or if you want to extend Symfony2. + You only need to read this section if you want to understand how Symfony + works behind the scenes, or if you want to extend Symfony. Overview -------- -The Symfony2 code is made of several independent layers. Each layer is built +The Symfony code is made of several independent layers. Each layer is built on top of the previous one. .. tip:: @@ -81,11 +81,11 @@ Kernel ------ The :class:`Symfony\\Component\\HttpKernel\\HttpKernel` class is the central -class of Symfony2 and is responsible for handling client requests. Its main +class of Symfony and is responsible for handling client requests. Its main goal is to "convert" a :class:`Symfony\\Component\\HttpFoundation\\Request` object to a :class:`Symfony\\Component\\HttpFoundation\\Response` object. -Every Symfony2 Kernel implements +Every Symfony Kernel implements :class:`Symfony\\Component\\HttpKernel\\HttpKernelInterface`:: function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) @@ -129,11 +129,11 @@ the Request attributes. .. sidebar:: Matching Controller Method Arguments from Request Attributes - For each method argument, Symfony2 tries to get the value of a Request + For each method argument, Symfony tries to get the value of a Request attribute with the same name. If it is not defined, the argument default value is used if defined:: - // Symfony2 will look for an 'id' attribute (mandatory) + // Symfony will look for an 'id' attribute (mandatory) // and an 'admin' one (optional) public function showAction($id, $admin = true) { @@ -245,7 +245,7 @@ add the following code at the beginning of your listener method:: .. tip:: - If you are not yet familiar with the Symfony2 EventDispatcher, read the + If you are not yet familiar with the Symfony EventDispatcher, read the :doc:`EventDispatcher component documentation ` section first. @@ -471,15 +471,15 @@ see the :doc:`EventDispatcher component documentation handle(Request::createFromGlobals())->send(); The front controller file (``app.php`` in this example) is the actual PHP -file that's executed when using a Symfony2 application and its job is to +file that's executed when using a Symfony application and its job is to use a Kernel class, ``AppKernel``, to bootstrap the application. .. tip:: @@ -606,9 +608,9 @@ The Bundle System ----------------- A bundle is similar to a plugin in other software, but even better. The key -difference is that *everything* is a bundle in Symfony2, including both the +difference is that *everything* is a bundle in Symfony, including both the core framework functionality and the code written for your application. -Bundles are first-class citizens in Symfony2. This gives you the flexibility +Bundles are first-class citizens in Symfony. This gives you the flexibility to use pre-built features packaged in `third-party bundles`_ or to distribute your own bundles. It makes it easy to pick and choose which features to enable in your application and to optimize them the way you want. @@ -724,7 +726,7 @@ generating a basic bundle skeleton: $ php app/console generate:bundle --namespace=Acme/TestBundle The bundle skeleton generates with a basic controller, template and routing -resource that can be customized. You'll learn more about Symfony2's command-line +resource that can be customized. You'll learn more about Symfony's command-line tools later. .. tip:: @@ -738,7 +740,7 @@ Bundle Directory Structure The directory structure of a bundle is simple and flexible. By default, the bundle system follows a set of conventions that help to keep code consistent -between all Symfony2 bundles. Take a look at ``AcmeDemoBundle``, as it contains +between all Symfony bundles. Take a look at ``AcmeDemoBundle``, as it contains some of the most common elements of a bundle: * ``Controller/`` contains the controllers of the bundle (e.g. ``RandomController.php``); @@ -860,7 +862,7 @@ routing, templating, and other core systems. For now, don't worry about the specific configuration options in each section. The configuration file ships with sensible defaults. As you read more and -explore each part of Symfony2, you'll learn about the specific configuration +explore each part of Symfony, you'll learn about the specific configuration options of each feature. .. sidebar:: Configuration Formats @@ -915,7 +917,7 @@ rebuilt on each request in the ``dev`` environment (for the developer's convenie but cached in the ``prod`` environment. All environments live together on the same machine and execute the same application. -A Symfony2 project generally begins with three environments (``dev``, ``test`` +A Symfony project generally begins with three environments (``dev``, ``test`` and ``prod``), though creating new environments is easy. You can view your application in different environments simply by changing the front controller in your browser. To see the application in the ``dev`` environment, access @@ -1043,7 +1045,7 @@ just pieces of it between environments. Summary ------- -Congratulations! You've now seen every fundamental aspect of Symfony2 and have +Congratulations! You've now seen every fundamental aspect of Symfony and have hopefully discovered how easy and flexible it can be. And while there are *a lot* of features still to come, be sure to keep the following basic points in mind: @@ -1056,7 +1058,7 @@ in mind: and ``vendor/`` (third-party code) (there's also a ``bin/`` directory that's used to help updated vendor libraries); -* Each feature in Symfony2 (including the Symfony2 framework core) is organized +* Each feature in Symfony (including the Symfony framework core) is organized into a *bundle*, which is a structured set of files for that feature; * The **configuration** for each bundle lives in the ``Resources/config`` @@ -1069,7 +1071,7 @@ in mind: ``app.php`` and ``app_dev.php``) and loads a different configuration file. From here, each chapter will introduce you to more and more powerful tools -and advanced concepts. The more you know about Symfony2, the more you'll +and advanced concepts. The more you know about Symfony, the more you'll appreciate the flexibility of its architecture and the power it gives you to rapidly develop applications. diff --git a/book/performance.rst b/book/performance.rst index 47fdb482c78..b2e21a42610 100644 --- a/book/performance.rst +++ b/book/performance.rst @@ -4,7 +4,7 @@ Performance =========== -Symfony2 is fast, right out of the box. Of course, if you really need speed, +Symfony is fast, right out of the box. Of course, if you really need speed, there are many ways that you can make Symfony even faster. In this chapter, you'll explore many of the most common and powerful ways to make your Symfony application even faster. @@ -21,7 +21,7 @@ the need to constantly recompile the PHP source code. There are a number of `byte code caches`_ available, some of which are open source. The most widely used byte code cache is probably `APC`_ -Using a byte code cache really has no downside, and Symfony2 has been architected +Using a byte code cache really has no downside, and Symfony has been architected to perform really well in this type of environment. Further Optimizations @@ -45,7 +45,7 @@ your ``php.ini`` configuration. Use Composer's Class Map Functionality -------------------------------------- -By default, the Symfony2 standard edition uses Composer's autoloader +By default, the Symfony standard edition uses Composer's autoloader in the `autoload.php`_ file. This autoloader is easy to use, as it will automatically find any new classes that you've placed in the registered directories. @@ -105,16 +105,16 @@ For more details, see :doc:`/components/class_loader/cache_class_loader`. Use Bootstrap Files ------------------- -To ensure optimal flexibility and code reuse, Symfony2 applications leverage +To ensure optimal flexibility and code reuse, Symfony applications leverage a variety of classes and 3rd party components. But loading all of these classes from separate files on each request can result in some overhead. To reduce -this overhead, the Symfony2 Standard Edition provides a script to generate +this overhead, the Symfony Standard Edition provides a script to generate a so-called `bootstrap file`_, consisting of multiple classes definitions in a single file. By including this file (which contains a copy of many of the core classes), Symfony no longer needs to include any of the source files containing those classes. This will reduce disc IO quite a bit. -If you're using the Symfony2 Standard Edition, then you're probably already +If you're using the Symfony Standard Edition, then you're probably already using the bootstrap file. To be sure, open your front controller (usually ``app.php``) and check to make sure that the following line exists:: @@ -123,11 +123,11 @@ using the bootstrap file. To be sure, open your front controller (usually Note that there are two disadvantages when using a bootstrap file: * the file needs to be regenerated whenever any of the original sources change - (i.e. when you update the Symfony2 source or vendor libraries); + (i.e. when you update the Symfony source or vendor libraries); * when debugging, one will need to place break points inside the bootstrap file. -If you're using Symfony2 Standard Edition, the bootstrap file is automatically +If you're using the Symfony Standard Edition, the bootstrap file is automatically rebuilt after updating the vendor libraries via the ``php composer.phar install`` command. diff --git a/book/propel.rst b/book/propel.rst index b48b5f3a5a1..79377a03526 100644 --- a/book/propel.rst +++ b/book/propel.rst @@ -5,7 +5,7 @@ Databases and Propel ==================== One of the most common and challenging tasks for any application -involves persisting and reading information to and from a database. Symfony2 +involves persisting and reading information to and from a database. Symfony does not come integrated with any ORMs but the Propel integration is easy. To install Propel, read `Working With Symfony2`_ on the Propel documentation. @@ -60,7 +60,7 @@ configuration file (``config.yml``): password: "%database_password%" dsn: "%database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%" -Now that Propel knows about your database, Symfony2 can create the database for +Now that Propel knows about your database, Symfony can create the database for you: .. code-block:: bash @@ -81,7 +81,7 @@ generated by Propel contain some business logic. .. note:: - For people who use Symfony2 with Doctrine2, **models** are equivalent to + For people who use Symfony with Doctrine2, **models** are equivalent to **entities**. Suppose you're building an application where products need to be displayed. @@ -272,7 +272,7 @@ from cheapest to most expensive. From inside a controller, do the following:: ->find(); In one line, you get your products in a powerful oriented object way. No need -to waste your time with SQL or whatever, Symfony2 offers fully object oriented +to waste your time with SQL or whatever, Symfony offers fully object oriented programming and Propel respects the same philosophy by providing an awesome abstraction layer. @@ -479,7 +479,7 @@ Propel provides the following hooks: Behaviors --------- -All bundled behaviors in Propel are working with Symfony2. To get more +All bundled behaviors in Propel are working with Symfony. To get more information about how to use Propel behaviors, look at the `Behaviors reference section`_. diff --git a/book/routing.rst b/book/routing.rst index 8e4ef310375..3b82cb3033a 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -13,7 +13,7 @@ URL of a page from ``/blog`` to ``/news``? How many links should you need to hunt down and update to make the change? If you're using Symfony's router, the change is simple. -The Symfony2 router lets you define creative URLs that you map to different +The Symfony router lets you define creative URLs that you map to different areas of your application. By the end of this chapter, you'll be able to: * Create complex routes that map to controllers @@ -102,7 +102,7 @@ Congratulations! You've just created your first route and connected it to a controller. Now, when you visit ``/blog/my-post``, the ``showAction`` controller will be executed and the ``$slug`` variable will be equal to ``my-post``. -This is the goal of the Symfony2 router: to map the URL of a request to a +This is the goal of the Symfony router: to map the URL of a request to a controller. Along the way, you'll learn all sorts of tricks that make mapping even the most complex URLs easy. @@ -121,22 +121,22 @@ else. Take the following HTTP request for example: GET /blog/my-blog-post -The goal of the Symfony2 routing system is to parse this URL and determine +The goal of the Symfony routing system is to parse this URL and determine which controller should be executed. The whole process looks like this: -#. The request is handled by the Symfony2 front controller (e.g. ``app.php``); +#. The request is handled by the Symfony front controller (e.g. ``app.php``); -#. The Symfony2 core (i.e. Kernel) asks the router to inspect the request; +#. The Symfony core (i.e. Kernel) asks the router to inspect the request; #. The router matches the incoming URL to a specific route and returns information about the route, including the controller that should be executed; -#. The Symfony2 Kernel executes the controller, which ultimately returns +#. The Symfony Kernel executes the controller, which ultimately returns a ``Response`` object. .. figure:: /images/request-flow.png :align: center - :alt: Symfony2 request flow + :alt: Symfony request flow The routing layer is a tool that translates the incoming URL into a specific controller to execute. @@ -240,7 +240,7 @@ A basic route consists of just two parts: the ``path`` to match and a return $collection; This route matches the homepage (``/``) and maps it to the ``AcmeDemoBundle:Main:homepage`` -controller. The ``_controller`` string is translated by Symfony2 into an +controller. The ``_controller`` string is translated by Symfony into an actual PHP function and executed. That process will be explained shortly in the :ref:`controller-string-syntax` section. diff --git a/book/security.rst b/book/security.rst index ad9a9af5e70..6875de64152 100644 --- a/book/security.rst +++ b/book/security.rst @@ -275,7 +275,7 @@ the request flow is always the same: .. tip:: - You'll also learn later how *anything* can be secured in Symfony2, including + You'll also learn later how *anything* can be secured in Symfony, including specific controllers, objects, or even PHP methods. .. _book-security-form-login: @@ -810,7 +810,7 @@ You can define as many URL patterns as you need - each is a regular expression. Understanding how ``access_control`` Works ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For each incoming request, Symfony2 checks each ``access_control`` entry +For each incoming request, Symfony checks each ``access_control`` entry to find *one* that matches the current request. As soon as it finds a matching ``access_control`` entry, it stops - only the **first** matching ``access_control`` is used to enforce access. @@ -826,7 +826,7 @@ things: 1. Matching Options ................... -Symfony2 creates an instance of :class:`Symfony\\Component\\HttpFoundation\\RequestMatcher` +Symfony creates an instance of :class:`Symfony\\Component\\HttpFoundation\\RequestMatcher` for each ``access_control`` entry, which determines whether or not a given access control should be used on this request. The following ``access_control`` options are used for matching: @@ -938,7 +938,7 @@ will match any ``ip``, ``host`` or ``method``: 2. Access Enforcement ..................... -Once Symfony2 has decided which ``access_control`` entry matches (if any), +Once Symfony has decided which ``access_control`` entry matches (if any), it then *enforces* access restrictions based on the ``roles`` and ``requires_channel`` options: @@ -1248,10 +1248,10 @@ During authentication, the user submits a set of credentials (usually a username and password). The job of the authentication system is to match those credentials against some pool of users. So where does this list of users come from? -In Symfony2, users can come from anywhere - a configuration file, a database +In Symfony, users can come from anywhere - a configuration file, a database table, a web service, or anything else you can dream up. Anything that provides one or more users to the authentication system is known as a "user provider". -Symfony2 comes standard with the two most common user providers: one that +Symfony comes standard with the two most common user providers: one that loads users from a configuration file and one that loads users from a database table. @@ -1825,7 +1825,7 @@ doesn't need to be defined anywhere - you can just start using it. .. note:: All roles **must** begin with the ``ROLE_`` prefix to be managed by - Symfony2. If you define your own roles with a dedicated ``Role`` class + Symfony. If you define your own roles with a dedicated ``Role`` class (more advanced), don't use the ``ROLE_`` prefix. .. _book-security-role-hierarchy: @@ -2198,12 +2198,12 @@ more information on configuring the logout, see the Stateless Authentication ------------------------ -By default, Symfony2 relies on a cookie (the Session) to persist the security +By default, Symfony relies on a cookie (the Session) to persist the security context of the user. But if you use certificates or HTTP authentication for instance, persistence is not needed as credentials are available for each request. In that case, and if you don't need to store anything else between requests, you can activate the stateless authentication (which means that no -cookie will be ever created by Symfony2): +cookie will be ever created by Symfony): .. configuration-block:: @@ -2244,7 +2244,7 @@ cookie will be ever created by Symfony2): .. note:: - If you use a form login, Symfony2 will create a cookie even if you set + If you use a form login, Symfony will create a cookie even if you set ``stateless`` to ``true``. Utilities diff --git a/book/service_container.rst b/book/service_container.rst index f03793e54a4..34120f60ee7 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -12,15 +12,15 @@ your product inventory, or another object that processes data from a third-party API. The point is that a modern application does many things and is organized into many objects that handle each task. -This chapter is about a special PHP object in Symfony2 that helps +This chapter is about a special PHP object in Symfony that helps you instantiate, organize and retrieve the many objects of your application. This object, called a service container, will allow you to standardize and centralize the way objects are constructed in your application. The container makes your life easier, is super fast, and emphasizes an architecture that -promotes reusable and decoupled code. Since all core Symfony2 classes +promotes reusable and decoupled code. Since all core Symfony classes use the container, you'll learn how to extend, configure and use any object -in Symfony2. In large part, the service container is the biggest contributor -to the speed and extensibility of Symfony2. +in Symfony. In large part, the service container is the biggest contributor +to the speed and extensibility of Symfony. Finally, configuring and using the service container is easy. By the end of this chapter, you'll be comfortable creating your own objects via the @@ -61,7 +61,7 @@ application into a series of services. Since each service does just one job, you can easily access each service and use its functionality wherever you need it. Each service can also be more easily tested and configured since it's separated from the other functionality in your application. This idea -is called `service-oriented architecture`_ and is not unique to Symfony2 +is called `service-oriented architecture`_ and is not unique to Symfony or even PHP. Structuring your application around a set of independent service classes is a well-known and trusted object-oriented best-practice. These skills are key to being a good developer in almost any language. @@ -107,7 +107,7 @@ be specified in YAML, XML or PHP: .. note:: - When Symfony2 initializes, it builds the service container using the + When Symfony initializes, it builds the service container using the application configuration (``app/config/config.yml`` by default). The exact file that's loaded is dictated by the ``AppKernel::registerContainerConfiguration()`` method, which loads an environment-specific configuration file (e.g. @@ -115,7 +115,7 @@ be specified in YAML, XML or PHP: for ``prod``). An instance of the ``Acme\HelloBundle\Mailer`` object is now available via -the service container. The container is available in any traditional Symfony2 +the service container. The container is available in any traditional Symfony controller where you can access the services of the container via the ``get()`` shortcut method:: @@ -266,13 +266,13 @@ Importing other Container Configuration Resources In this section, service configuration files are referred to as *resources*. This is to highlight the fact that, while most configuration resources - will be files (e.g. YAML, XML, PHP), Symfony2 is so flexible that configuration + will be files (e.g. YAML, XML, PHP), Symfony is so flexible that configuration could be loaded from anywhere (e.g. a database or even via an external web service). The service container is built using a single configuration resource (``app/config/config.yml`` by default). All other service configuration -(including the core Symfony2 and third-party bundle configuration) must +(including the core Symfony and third-party bundle configuration) must be imported from inside this file in one way or another. This gives you absolute flexibility over the services in your application. @@ -393,10 +393,10 @@ directory. Importing Configuration via Container Extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When developing in Symfony2, you'll most commonly use the ``imports`` directive +When developing in Symfony, you'll most commonly use the ``imports`` directive to import container configuration from the bundles you've created specifically for your application. Third-party bundle container configuration, including -Symfony2 core services, are usually loaded using another method that's more +Symfony core services, are usually loaded using another method that's more flexible and easy to configure in your application. Here's how it works. Internally, each bundle defines its services very much @@ -419,7 +419,7 @@ In other words, a service container extension configures the services for a bundle on your behalf. And as you'll see in a moment, the extension provides a sensible, high-level interface for configuring the bundle. -Take the FrameworkBundle - the core Symfony2 framework bundle - as an +Take the FrameworkBundle - the core Symfony framework bundle - as an example. The presence of the following code in your application configuration invokes the service container extension inside the FrameworkBundle: @@ -471,8 +471,8 @@ When the configuration is parsed, the container looks for an extension that can handle the ``framework`` configuration directive. The extension in question, which lives in the FrameworkBundle, is invoked and the service configuration for the FrameworkBundle is loaded. If you remove the ``framework`` key -from your application configuration file entirely, the core Symfony2 services -won't be loaded. The point is that you're in control: the Symfony2 framework +from your application configuration file entirely, the core Symfony services +won't be loaded. The point is that you're in control: the Symfony framework doesn't contain any magic or perform any actions that you don't have control over. @@ -827,7 +827,7 @@ Injecting the dependency by the setter method just needs a change of syntax: .. note:: The approaches presented in this section are called "constructor injection" - and "setter injection". The Symfony2 service container also supports + and "setter injection". The Symfony service container also supports "property injection". .. _book-container-request-stack: @@ -1005,12 +1005,12 @@ allow for an optional dependency:: Core Symfony and Third-Party Bundle Services -------------------------------------------- -Since Symfony2 and all third-party bundles configure and retrieve their services +Since Symfony and all third-party bundles configure and retrieve their services via the container, you can easily access them or even use them in your own -services. To keep things simple, Symfony2 by default does not require that -controllers be defined as services. Furthermore Symfony2 injects the entire +services. To keep things simple, Symfony by default does not require that +controllers be defined as services. Furthermore, Symfony injects the entire service container into your controller. For example, to handle the storage of -information on a user's session, Symfony2 provides a ``session`` service, +information on a user's session, Symfony provides a ``session`` service, which you can access inside a standard controller as follows:: public function indexAction($bar) @@ -1021,13 +1021,13 @@ which you can access inside a standard controller as follows:: // ... } -In Symfony2, you'll constantly use services provided by the Symfony core or +In Symfony, you'll constantly use services provided by the Symfony core or other third-party bundles to perform tasks such as rendering templates (``templating``), sending emails (``mailer``), or accessing information on the request (``request``). You can take this a step further by using these services inside services that you've created for your application. Beginning by modifying the ``NewsletterManager`` -to use the real Symfony2 ``mailer`` service (instead of the pretend ``my_mailer``). +to use the real Symfony ``mailer`` service (instead of the pretend ``my_mailer``). Also pass the templating engine service to the ``NewsletterManager`` so that it can generate the email content via a template:: @@ -1153,7 +1153,7 @@ the bundle knows that the ``foo.twig.extension`` service should be registered as a Twig extension with Twig. In other words, Twig finds all services tagged with ``twig.extension`` and automatically registers them as extensions. -Tags, then, are a way to tell Symfony2 or other third-party bundles that +Tags, then, are a way to tell Symfony or other third-party bundles that your service should be registered or used in some special way by the bundle. For a list of all the tags available in the core Symfony Framework, check diff --git a/book/stable_api.rst b/book/stable_api.rst index 23f7d7b7741..56d0bcb7d4d 100644 --- a/book/stable_api.rst +++ b/book/stable_api.rst @@ -1,10 +1,12 @@ .. index:: single: Stable API -The Symfony2 Stable API -======================= +.. _the-symfony2-stable-api: -The Symfony2 stable API is a subset of all Symfony2 published public methods +The Symfony Stable API +====================== + +The Symfony stable API is a subset of all Symfony published public methods (components and core bundles) that share the following properties: * The namespace and class name won't change; diff --git a/book/templating.rst b/book/templating.rst index 01610c936fa..f7c9f098bde 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -5,7 +5,7 @@ Creating and Using Templates ============================ As you know, the :doc:`controller ` is responsible for -handling each request that comes into a Symfony2 application. In reality, +handling each request that comes into a Symfony application. In reality, the controller delegates most of the heavy work to other places so that code can be tested and reused. When a controller needs to generate HTML, CSS or any other content, it hands the work off to the templating engine. @@ -53,7 +53,7 @@ template - a text file parsed by PHP that contains a mix of text and PHP code: .. index:: Twig; Introduction -But Symfony2 packages an even more powerful templating language called `Twig`_. +But Symfony packages an even more powerful templating language called `Twig`_. Twig allows you to write concise, readable templates that are more friendly to web designers and, in several ways, more powerful than PHP templates: @@ -178,7 +178,7 @@ Template Inheritance and Layouts -------------------------------- More often than not, templates in a project share common elements, like the -header, footer, sidebar or more. In Symfony2, this problem is thought about +header, footer, sidebar or more. In Symfony, this problem is thought about differently: a template can be decorated by another one. This works exactly the same as PHP classes: template inheritance allows you to build a base "layout" template that contains all the common elements of your site @@ -332,7 +332,7 @@ tag in a parent template is always used by default. You can use as many levels of inheritance as you want. In the next section, a common three-level inheritance model will be explained along with how templates -are organized inside a Symfony2 project. +are organized inside a Symfony project. When working with template inheritance, here are some tips to keep in mind: @@ -384,7 +384,7 @@ By default, templates can live in two different locations: ``Resources/views`` directory (and subdirectories). The majority of templates will live inside a bundle. -Symfony2 uses a **bundle**:**controller**:**template** string syntax for +Symfony uses a **bundle**:**controller**:**template** string syntax for templates. This allows for several different types of templates, each which lives in a specific location: @@ -438,11 +438,11 @@ that specify the *format* and *engine* for that template. * **AcmeBlogBundle:Blog:index.css.twig** - CSS format, Twig engine -By default, any Symfony2 template can be written in either Twig or PHP, and +By default, any Symfony template can be written in either Twig or PHP, and the last part of the extension (e.g. ``.twig`` or ``.php``) specifies which of these two *engines* should be used. The first part of the extension, (e.g. ``.html``, ``.css``, etc) is the final format that the template will -generate. Unlike the engine, which determines how Symfony2 parses the template, +generate. Unlike the engine, which determines how Symfony parses the template, this is simply an organizational tactic used in case the same resource needs to be rendered as HTML (``index.html.twig``), XML (``index.xml.twig``), or any other format. For more information, read the :ref:`template-formats` @@ -466,7 +466,7 @@ this section, you'll learn about a large group of tools available to help perform the most common template tasks such as including other templates, linking to pages and including images. -Symfony2 comes bundled with several specialized Twig tags and functions that +Symfony comes bundled with several specialized Twig tags and functions that ease the work of the template designer. In PHP, the templating system provides an extensible *helper* system that provides useful features in a template context. @@ -667,7 +667,7 @@ Asynchronous Content with hinclude.js Controllers can be embedded asynchronously using the hinclude.js_ JavaScript library. As the embedded content comes from another page (or controller for that matter), -Symfony2 uses a version of the standard ``render`` function to configure ``hinclude`` +Symfony uses a version of the standard ``render`` function to configure ``hinclude`` tags: .. configuration-block:: @@ -972,7 +972,7 @@ Linking to Assets Templates also commonly refer to images, JavaScript, stylesheets and other assets. Of course you could hard-code the path to these assets (e.g. ``/images/logo.png``), -but Symfony2 provides a more dynamic option via the ``asset`` Twig function: +but Symfony provides a more dynamic option via the ``asset`` Twig function: .. configuration-block:: @@ -1124,7 +1124,7 @@ stylesheets. Global Template Variables ------------------------- -During each request, Symfony2 will set a global template variable ``app`` +During each request, Symfony will set a global template variable ``app`` in both Twig and PHP template engines by default. The ``app`` variable is a :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables` instance which will give you access to some application specific variables @@ -1166,7 +1166,7 @@ automatically: Configuring and Using the ``templating`` Service ------------------------------------------------ -The heart of the template system in Symfony2 is the templating ``Engine``. +The heart of the template system in Symfony is the templating ``Engine``. This special object is responsible for rendering templates and returning their content. When you render a template in a controller, for example, you're actually using the templating engine service. For example:: @@ -1185,7 +1185,7 @@ is equivalent to:: .. _template-configuration: The templating engine (or "service") is preconfigured to work automatically -inside Symfony2. It can, of course, be configured further in the application +inside Symfony. It can, of course, be configured further in the application configuration file: .. configuration-block:: @@ -1242,7 +1242,7 @@ Several configuration options are available and are covered in the Overriding Bundle Templates --------------------------- -The Symfony2 community prides itself on creating and maintaining high quality +The Symfony community prides itself on creating and maintaining high quality bundles (see `KnpBundles.com`_) for a large number of different features. Once you use a third-party bundle, you'll likely need to override and customize one or more of its templates. @@ -1264,7 +1264,7 @@ customize the markup specifically for your application. By digging into the ); } -When the ``AcmeBlogBundle:Blog:index.html.twig`` is rendered, Symfony2 actually +When the ``AcmeBlogBundle:Blog:index.html.twig`` is rendered, Symfony actually looks in two different locations for the template: #. ``app/Resources/AcmeBlogBundle/views/Blog/index.html.twig`` @@ -1282,7 +1282,7 @@ to create it). You're now free to customize the template. This logic also applies to base bundle templates. Suppose also that each template in ``AcmeBlogBundle`` inherits from a base template called -``AcmeBlogBundle::layout.html.twig``. Just as before, Symfony2 will look in +``AcmeBlogBundle::layout.html.twig``. Just as before, Symfony will look in the following two places for the template: #. ``app/Resources/AcmeBlogBundle/views/layout.html.twig`` @@ -1292,7 +1292,7 @@ Once again, to override the template, just copy it from the bundle to ``app/Resources/AcmeBlogBundle/views/layout.html.twig``. You're now free to customize this copy as you see fit. -If you take a step back, you'll see that Symfony2 always starts by looking in +If you take a step back, you'll see that Symfony always starts by looking in the ``app/Resources/{BUNDLE_NAME}/views/`` directory for a template. If the template doesn't exist there, it continues by checking inside the ``Resources/views`` directory of the bundle itself. This means that all bundle @@ -1312,7 +1312,7 @@ subdirectory. Overriding Core Templates ~~~~~~~~~~~~~~~~~~~~~~~~~ -Since the Symfony2 framework itself is just a bundle, core templates can be +Since the Symfony framework itself is just a bundle, core templates can be overridden in the same way. For example, the core TwigBundle contains a number of different "exception" and "error" templates that can be overridden by copying each from the ``Resources/views/Exception`` directory of the @@ -1594,7 +1594,7 @@ the most common tasks. Overall, the topic of templating should be thought of as a powerful tool that's at your disposal. In some cases, you may not need to render a template, -and in Symfony2, that's absolutely fine. +and in Symfony, that's absolutely fine. Learn more from the Cookbook ---------------------------- diff --git a/book/testing.rst b/book/testing.rst index a86230f710a..f870ac58272 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -11,13 +11,13 @@ using both functional and unit tests. The PHPUnit Testing Framework ----------------------------- -Symfony2 integrates with an independent library - called PHPUnit - to give +Symfony integrates with an independent library - called PHPUnit - to give you a rich testing framework. This chapter won't cover PHPUnit itself, but it has its own excellent `documentation`_. .. note:: - Symfony2 works with PHPUnit 3.5.11 or later, though version 3.6.4 is + Symfony works with PHPUnit 3.5.11 or later, though version 3.6.4 is needed to test the Symfony core code itself. Each test - whether it's a unit test or a functional test - is a PHP class @@ -47,7 +47,7 @@ Unit Tests A unit test is usually a test against a specific PHP class. If you want to test the overall behavior of your application, see the section about `Functional Tests`_. -Writing Symfony2 unit tests is no different than writing standard PHPUnit +Writing Symfony unit tests is no different than writing standard PHPUnit unit tests. Suppose, for example, that you have an *incredibly* simple class called ``Calculator`` in the ``Utility/`` directory of your bundle:: @@ -129,7 +129,7 @@ directory of your bundle. If you want to test the pages handled by your ``DemoController`` class, start by creating a new ``DemoControllerTest.php`` file that extends a special ``WebTestCase`` class. -For example, the Symfony2 Standard Edition provides a simple functional test +For example, the Symfony Standard Edition provides a simple functional test for its ``DemoController`` (`DemoControllerTest`_) that reads as follows:: // src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php @@ -320,7 +320,7 @@ Working with the Test Client ----------------------------- The Test Client simulates an HTTP client like a browser and makes requests -into your Symfony2 application:: +into your Symfony application:: $crawler = $client->request('GET', '/hello/Fabien'); diff --git a/book/translation.rst b/book/translation.rst index e6f957198bc..8abe3c8da2c 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -27,7 +27,7 @@ into the language of the user:: *country* code (e.g. ``fr_FR`` for French/France) is recommended. In this chapter, you'll learn how to use the Translation component in the -Symfony2 framework. You can read the +Symfony framework. You can read the :doc:`Translation component documentation ` to learn even more. Overall, the process has several steps: @@ -105,16 +105,16 @@ for example, that you're translating a simple message from inside a controller:: public function indexAction() { - $translated = $this->get('translator')->trans('Symfony2 is great'); + $translated = $this->get('translator')->trans('Symfony is great'); return new Response($translated); } .. _book-translation-resources: -When this code is executed, Symfony2 will attempt to translate the message -"Symfony2 is great" based on the ``locale`` of the user. For this to work, -you need to tell Symfony2 how to translate the message via a "translation +When this code is executed, Symfony will attempt to translate the message +"Symfony is great" based on the ``locale`` of the user. For this to work, +you need to tell Symfony how to translate the message via a "translation resource", which is usually a file that contains a collection of translations for a given locale. This "dictionary" of translations can be created in several different formats, XLIFF being the recommended format: @@ -129,8 +129,8 @@ different formats, XLIFF being the recommended format: - Symfony2 is great - J'aime Symfony2 + Symfony is great + J'aime Symfony @@ -139,26 +139,26 @@ different formats, XLIFF being the recommended format: .. code-block:: yaml # messages.fr.yml - Symfony2 is great: J'aime Symfony2 + Symfony is great: J'aime Symfony .. code-block:: php // messages.fr.php return array( - 'Symfony2 is great' => 'J\'aime Symfony2', + 'Symfony is great' => 'J\'aime Symfony', ); For information on where these files should be located, see :ref:`book-translation-resource-locations`. Now, if the language of the user's locale is French (e.g. ``fr_FR`` or ``fr_BE``), -the message will be translated into ``J'aime Symfony2``. You can also translate +the message will be translated into ``J'aime Symfony``. You can also translate the message inside your :ref:`templates `. The Translation Process ~~~~~~~~~~~~~~~~~~~~~~~ -To actually translate the message, Symfony2 uses a simple process: +To actually translate the message, Symfony uses a simple process: * The ``locale`` of the current user, which is stored on the request is determined; @@ -171,7 +171,7 @@ To actually translate the message, Symfony2 uses a simple process: * If the message is located in the catalog, the translation is returned. If not, the translator returns the original message. -When using the ``trans()`` method, Symfony2 looks for the exact string inside +When using the ``trans()`` method, Symfony looks for the exact string inside the appropriate message catalog and returns it (if it exists). Message Placeholders @@ -215,7 +215,7 @@ in the Translation component documentation. Translations in Templates ------------------------- -Most of the time, translation occurs in templates. Symfony2 provides native +Most of the time, translation occurs in templates. Symfony provides native support for both Twig and PHP templates. .. _book-translation-tags: @@ -223,7 +223,7 @@ support for both Twig and PHP templates. Twig Templates ~~~~~~~~~~~~~~ -Symfony2 provides specialized Twig tags (``trans`` and ``transchoice``) to +Symfony provides specialized Twig tags (``trans`` and ``transchoice``) to help with message translation of *static blocks of text*: .. code-block:: jinja @@ -315,7 +315,7 @@ The translator service is accessible in PHP templates through the .. code-block:: html+php - trans('Symfony2 is great') ?> + trans('Symfony is great') ?> transChoice( '{0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples', @@ -328,7 +328,7 @@ The translator service is accessible in PHP templates through the Translation Resource/File Names and Locations --------------------------------------------- -Symfony2 looks for message files (i.e. translations) in the following locations: +Symfony looks for message files (i.e. translations) in the following locations: * the ``app/Resources/translations`` directory; @@ -352,7 +352,7 @@ must be named according to the following path: ``domain.locale.loader``: * **locale**: The locale that the translations are for (e.g. ``en_GB``, ``en``, etc); -* **loader**: How Symfony2 should load and parse the file (e.g. ``xliff``, +* **loader**: How Symfony should load and parse the file (e.g. ``xliff``, ``php``, ``yml``, etc). The loader can be the name of any registered loader. By default, Symfony @@ -388,7 +388,7 @@ Fallback Translation Locales ---------------------------- Imagine that the user's locale is ``fr_FR`` and that you're translating the -key ``Symfony2 is great``. To find the French translation, Symfony actually +key ``Symfony is great``. To find the French translation, Symfony actually checks translation resources for several different locales: 1. First, Symfony looks for the translation in a ``fr_FR`` translation resource @@ -828,7 +828,7 @@ or only the missing messages, by using the ``--only-unused`` or ``--only-missing Summary ------- -With the Symfony2 Translation component, creating an internationalized application +With the Symfony Translation component, creating an internationalized application no longer needs to be a painful process and boils down to just a few basic steps: @@ -838,7 +838,7 @@ steps: (learn about this in :doc:`/components/translation/usage`); * Translate each message into multiple locales by creating translation message - files. Symfony2 discovers and processes each file because its name follows + files. Symfony discovers and processes each file because its name follows a specific convention; * Manage the user's locale, which is stored on the request, but can also diff --git a/book/validation.rst b/book/validation.rst index d3a39f33c22..4ccb264fe8a 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -8,7 +8,7 @@ Validation is a very common task in web applications. Data entered in forms needs to be validated. Data also needs to be validated before it is written into a database or passed to a web service. -Symfony2 ships with a `Validator`_ component that makes this task easy and +Symfony ships with a `Validator`_ component that makes this task easy and transparent. This component is based on the `JSR303 Bean Validation specification`_. @@ -253,7 +253,7 @@ For more information, see the :doc:`Forms ` chapter. Configuration ------------- -The Symfony2 validator is enabled by default, but you must explicitly enable +The Symfony validator is enabled by default, but you must explicitly enable annotations if you're using the annotation method to specify your constraints: .. configuration-block:: @@ -302,14 +302,14 @@ to its class and then pass it to the ``validator`` service. Behind the scenes, a constraint is simply a PHP object that makes an assertive statement. In real life, a constraint could be: "The cake must not be burned". -In Symfony2, constraints are similar: they are assertions that a condition +In Symfony, constraints are similar: they are assertions that a condition is true. Given a value, a constraint will tell you whether or not that value adheres to the rules of the constraint. Supported Constraints ~~~~~~~~~~~~~~~~~~~~~ -Symfony2 packages a large number of the most commonly-needed constraints: +Symfony packages a large number of the most commonly-needed constraints: .. include:: /reference/constraints/map.rst.inc @@ -502,7 +502,7 @@ to use, but the second allows you to specify more complex validation rules. Properties ~~~~~~~~~~ -Validating class properties is the most basic validation technique. Symfony2 +Validating class properties is the most basic validation technique. Symfony allows you to validate private, protected or public properties. The next listing shows you how to configure the ``$firstName`` property of an ``Author`` class to have at least 3 characters. @@ -581,7 +581,7 @@ class to have at least 3 characters. Getters ~~~~~~~ -Constraints can also be applied to the return value of a method. Symfony2 +Constraints can also be applied to the return value of a method. Symfony allows you to add a constraint to any public method whose name starts with "get", "is" or "has". In this guide, these types of methods are referred to as "getters". @@ -1220,7 +1220,7 @@ which holds the error message on its ``getMessage`` method. Final Thoughts -------------- -The Symfony2 ``validator`` is a powerful tool that can be leveraged to +The Symfony ``validator`` is a powerful tool that can be leveraged to guarantee that the data of any object is "valid". The power behind validation lies in "constraints", which are rules that you can apply to properties or getter methods of your object. And while you'll most commonly use the validation diff --git a/components/class_loader/class_loader.rst b/components/class_loader/class_loader.rst index 198f25d168a..246ee38a68a 100644 --- a/components/class_loader/class_loader.rst +++ b/components/class_loader/class_loader.rst @@ -36,7 +36,7 @@ is straightforward:: .. note:: - The autoloader is automatically registered in a Symfony2 application (see + The autoloader is automatically registered in a Symfony application (see ``app/autoload.php``). Use the :method:`Symfony\\Component\\ClassLoader\\ClassLoader::addPrefix` or diff --git a/components/class_loader/introduction.rst b/components/class_loader/introduction.rst index 8e529c0ac52..a49c2c9c8d7 100644 --- a/components/class_loader/introduction.rst +++ b/components/class_loader/introduction.rst @@ -12,7 +12,11 @@ Usage Whenever you reference a class that has not been required or included yet, PHP uses the `autoloading mechanism`_ to delegate the loading of a file defining +<<<<<<< HEAD the class. Symfony2 provides three autoloaders, which are able to load your classes: +======= +the class. Symfony provides two autoloaders, which are able to load your classes: +>>>>>>> replace "Symfony2" with "Symfony" * :doc:`/components/class_loader/class_loader`: loads classes that follow the `PSR-0` class naming standard; diff --git a/components/console/helpers/dialoghelper.rst b/components/console/helpers/dialoghelper.rst index cda8d8e934f..8b0730ee3e5 100644 --- a/components/console/helpers/dialoghelper.rst +++ b/components/console/helpers/dialoghelper.rst @@ -103,7 +103,7 @@ Validating the Answer --------------------- You can even validate the answer. For instance, in the last example you asked -for the bundle name. Following the Symfony2 naming conventions, it should +for the bundle name. Following the Symfony naming conventions, it should be suffixed with ``Bundle``. You can validate that by using the :method:`Symfony\\Component\\Console\\Helper\\DialogHelper::askAndValidate` method:: diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 80213da7aec..e28e9f9bc67 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -414,7 +414,7 @@ tools capable of helping you with different tasks: Testing Commands ---------------- -Symfony2 provides several tools to help you test your commands. The most +Symfony provides several tools to help you test your commands. The most useful one is the :class:`Symfony\\Component\\Console\\Tester\\CommandTester` class. It uses special input and output classes to ease testing without a real console:: diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index aef48199af1..da9adee4f83 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -207,7 +207,7 @@ The XML version of the config would then look like this: .. note:: - In the Symfony2 full stack framework there is a base Extension class which + In the Symfony full stack framework there is a base Extension class which implements these methods as well as a shortcut method for processing the configuration. See :doc:`/cookbook/bundles/extension` for more details. @@ -298,7 +298,7 @@ method is called by implementing :class:`Symfony\\Component\\DependencyInjection } For more details, see :doc:`/cookbook/bundles/prepend_extension`, which is -specific to the Symfony2 Framework, but contains more details about this feature. +specific to the Symfony Framework, but contains more details about this feature. Creating a Compiler Pass ------------------------ diff --git a/components/dependency_injection/factories.rst b/components/dependency_injection/factories.rst index 0682a00e624..9f74efa50d5 100644 --- a/components/dependency_injection/factories.rst +++ b/components/dependency_injection/factories.rst @@ -4,7 +4,7 @@ Using a Factory to Create Services ================================== -Symfony2's Service Container provides a powerful way of controlling the +Symfony's Service Container provides a powerful way of controlling the creation of objects, allowing you to specify arguments passed to the constructor as well as calling methods and setting parameters. Sometimes, however, this will not provide you with everything you need to construct your objects. diff --git a/components/dependency_injection/parentservices.rst b/components/dependency_injection/parentservices.rst index d8d53cffdbd..3158738fa15 100644 --- a/components/dependency_injection/parentservices.rst +++ b/components/dependency_injection/parentservices.rst @@ -190,7 +190,7 @@ and:: // ... } -In a similar fashion, the Symfony2 service container also supports extending +In a similar fashion, the Symfony service container also supports extending services in the configuration so you can also reduce the repetition by specifying a parent for a service. diff --git a/components/dependency_injection/workflow.rst b/components/dependency_injection/workflow.rst index 2373ec5f4dc..f769fefd1a1 100644 --- a/components/dependency_injection/workflow.rst +++ b/components/dependency_injection/workflow.rst @@ -8,7 +8,7 @@ In the preceding pages of this section, there has been little to say about where the various files and classes should be located. This is because this depends on the application, library or framework in which you want to use the container. Looking at how the container is configured and built in the -Symfony2 full stack framework will help you see how this all fits together, +Symfony full stack framework will help you see how this all fits together, whether you are using the full stack framework or looking to use the service container in another application. diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 61de74a97b4..23a74e338ab 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -24,20 +24,20 @@ or after a method is executed, without interfering with other plugins. This is not an easy problem to solve with single inheritance, and multiple inheritance (were it possible with PHP) has its own drawbacks. -The Symfony2 EventDispatcher component implements the `Mediator`_ pattern in +The Symfony EventDispatcher component implements the `Mediator`_ pattern in a simple and effective way to make all these things possible and to make your projects truly extensible. Take a simple example from :doc:`/components/http_kernel/introduction`. Once a ``Response`` object has been created, it may be useful to allow other elements in the system to modify it (e.g. add some cache headers) before it's actually -used. To make this possible, the Symfony2 kernel throws an event - +used. To make this possible, the Symfony kernel throws an event - ``kernel.response``. Here's how it works: * A *listener* (PHP object) tells a central *dispatcher* object that it wants to listen to the ``kernel.response`` event; -* At some point, the Symfony2 kernel tells the *dispatcher* object to dispatch +* At some point, the Symfony kernel tells the *dispatcher* object to dispatch the ``kernel.response`` event, passing with it an ``Event`` object that has access to the ``Response`` object; diff --git a/components/form/introduction.rst b/components/form/introduction.rst index f65556defc9..21f2d669eb3 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -30,7 +30,7 @@ Configuration If you are working with the full-stack Symfony framework, the Form component is already configured for you. In this case, skip to :ref:`component-form-intro-create-simple-form`. -In Symfony2, forms are represented by objects and these objects are built +In Symfony, forms are represented by objects and these objects are built by using a *form factory*. Building a form factory is simple:: use Symfony\Component\Form\Forms; @@ -50,7 +50,7 @@ support for very important features: * **Validation:** Integration with a validation library to generate error messages for submitted data. -The Symfony2 Form component relies on other libraries to solve these problems. +The Symfony Form component relies on other libraries to solve these problems. Most of the time you will use Twig and the Symfony :doc:`HttpFoundation `, Translation and Validator components, but you can replace any of these with @@ -154,7 +154,7 @@ errors, and labels). If you use `Twig`_ as your template engine, the Form component offers a rich integration. To use the integration, you'll need the ``TwigBridge``, which provides integration -between Twig and several Symfony2 components. If you're using Composer, you +between Twig and several Symfony components. If you're using Composer, you could install the latest 2.3 version by adding the following ``require`` line to your ``composer.json`` file: @@ -369,7 +369,7 @@ Creating a simple Form .. tip:: - If you're using the Symfony2 framework, then the form factory is available + If you're using the Symfony framework, then the form factory is available automatically as a service called ``form.factory``. Also, the default base controller class has a :method:`Symfony\\Bundle\\FrameworkBundle\\Controller::createFormBuilder` method, which is a shortcut to fetch the form factory and call ``createBuilder`` diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index 1214a95a3be..7d12403df81 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -13,7 +13,7 @@ In PHP, the request is represented by some global variables (``$_GET``, ``$_POST``, ``$_FILES``, ``$_COOKIE``, ``$_SESSION``, ...) and the response is generated by some functions (``echo``, ``header``, ``setcookie``, ...). -The Symfony2 HttpFoundation component replaces these default PHP global +The Symfony HttpFoundation component replaces these default PHP global variables and functions by an object-oriented layer. Installation @@ -173,8 +173,8 @@ in the request, which is also an instance of :class:`Symfony\\Component\\HttpFoundation\\ParameterBag`. This is mostly used to attach information that belongs to the Request and that needs to be accessed from many different points in your application. For information -on how this is used in the Symfony2 framework, see -:ref:`the Symfony2 book `. +on how this is used in the Symfony framework, see +:ref:`the Symfony book `. Finally, the raw data sent with the request body can be accessed using :method:`Symfony\\Component\\HttpFoundation\\Request::getContent`:: diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index f54aecc8487..07413e7f162 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -32,10 +32,10 @@ the docblock of the ``setOptions()`` method of each class. For instance, the one provided by the Memcached extension can be found on `php.net/memcached.setoption`_ While native save handlers can be activated by directly using -``ini_set('session.save_handler', $name);``, Symfony2 provides a convenient way to +``ini_set('session.save_handler', $name);``, Symfony provides a convenient way to activate these in the same way as it does for custom handlers. -Symfony2 provides drivers for the following native save handler as an example: +Symfony provides drivers for the following native save handler as an example: * :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler` @@ -58,7 +58,7 @@ Example usage:: Native save handlers provide a quick solution to session storage, however, in complex systems where you need more control, custom save handlers may - provide more freedom and flexibility. Symfony2 provides several implementations + provide more freedom and flexibility. Symfony provides several implementations which you may further customize as required. Custom Save Handlers @@ -68,8 +68,8 @@ Custom handlers are those which completely replace PHP's built-in session save handlers by providing six callback functions which PHP calls internally at various points in the session workflow. -Symfony2 HttpFoundation provides some by default and these can easily serve as -examples if you wish to write your own. +The Symfony HttpFoundation component provides some by default and these can +easily serve as examples if you wish to write your own. * :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler` * :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler` @@ -148,7 +148,7 @@ method. Session Lifetime ~~~~~~~~~~~~~~~~ -When a new session is created, meaning Symfony2 issues a new session cookie +When a new session is created, meaning Symfony issues a new session cookie to the client, the cookie will be stamped with an expiry time. This is calculated by adding the PHP runtime configuration value in ``session.cookie_lifetime`` with the current server time. @@ -186,7 +186,7 @@ session is started. The session can be destroyed as required. This method of processing can allow the expiry of sessions to be integrated into the user experience, for example, by displaying a message. -Symfony2 records some basic metadata about each session to give you complete +Symfony records some basic metadata about each session to give you complete freedom in this area. Session Metadata @@ -229,7 +229,7 @@ libraries. :phpclass:`SessionHandler` is a special PHP internal class which exposes native save handlers to PHP user-space. -In order to provide a solution for those using PHP 5.4, Symfony2 has a special +In order to provide a solution for those using PHP 5.4, Symfony has a special class called :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler` which under PHP 5.4, extends from ``\SessionHandler`` and under PHP 5.3 is just a empty base class. This provides some interesting opportunities to leverage diff --git a/components/http_foundation/session_testing.rst b/components/http_foundation/session_testing.rst index a35b23caebe..1bc80b03fbb 100644 --- a/components/http_foundation/session_testing.rst +++ b/components/http_foundation/session_testing.rst @@ -5,7 +5,7 @@ Testing with Sessions ===================== -Symfony2 is designed from the ground up with code-testability in mind. In order +Symfony is designed from the ground up with code-testability in mind. In order to make your code which utilizes session easily testable we provide two separate mock storage mechanisms for both unit testing and functional testing. diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index f2c40873af7..27296fc7529 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -5,7 +5,7 @@ Session Management ================== -The Symfony2 HttpFoundation component has a very powerful and flexible session +The Symfony HttpFoundation component has a very powerful and flexible session subsystem which is designed to provide session management through a simple object-oriented interface using a variety of session storage drivers. @@ -138,16 +138,16 @@ Session Data Management PHP's session management requires the use of the ``$_SESSION`` super-global, however, this interferes somewhat with code testability and encapsulation in an -OOP paradigm. To help overcome this, Symfony2 uses *session bags* linked to the +OOP paradigm. To help overcome this, Symfony uses *session bags* linked to the session to encapsulate a specific dataset of attributes or flash messages. This approach also mitigates namespace pollution within the ``$_SESSION`` super-global because each bag stores all its data under a unique namespace. -This allows Symfony2 to peacefully co-exist with other applications or libraries +This allows Symfony to peacefully co-exist with other applications or libraries that might use the ``$_SESSION`` super-global and all data remains completely -compatible with Symfony2's session management. +compatible with Symfony's session management. -Symfony2 provides two kinds of storage bags, with two separate implementations. +Symfony provides two kinds of storage bags, with two separate implementations. Everything is written against interfaces so you may extend or create your own bag types if necessary. @@ -159,7 +159,7 @@ the following API which is intended mainly for internal purposes: Generally this value can be left at its default and is for internal use. * :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface::initialize`: - This is called internally by Symfony2 session storage classes to link bag data + This is called internally by Symfony session storage classes to link bag data to the session. * :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface::getName`: diff --git a/components/http_foundation/trusting_proxies.rst b/components/http_foundation/trusting_proxies.rst index 61d4448914f..dc126617e5e 100644 --- a/components/http_foundation/trusting_proxies.rst +++ b/components/http_foundation/trusting_proxies.rst @@ -15,7 +15,7 @@ headers. For example, the ``Host`` HTTP header is usually used to return the requested host. But when you're behind a proxy, the true host may be stored in a ``X-Forwarded-Host`` header. -Since HTTP headers can be spoofed, Symfony2 does *not* trust these proxy +Since HTTP headers can be spoofed, Symfony does *not* trust these proxy headers by default. If you are behind a proxy, you should manually whitelist your proxy. diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 3598eec9a8f..f011ef68633 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -118,7 +118,7 @@ For general information on adding listeners to the events below, see .. tip:: Fabien Potencier also wrote a wonderful series on using the HttpKernel - component and other Symfony2 components to create your own framework. See + component and other Symfony components to create your own framework. See `Create your own framework... on top of the Symfony2 Components`_. .. _component-http-kernel-kernel-request: @@ -226,7 +226,7 @@ on the request's information. The second method, :method:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface::getArguments`, will be called after another event - ``kernel.controller`` - is dispatched. -.. sidebar:: Resolving the Controller in the Symfony2 Framework +.. sidebar:: Resolving the Controller in the Symfony Framework The Symfony Framework uses the built-in :class:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver` @@ -243,10 +243,10 @@ will be called after another event - ``kernel.controller`` - is dispatched. a) The ``AcmeDemoBundle:Default:index`` format of the ``_controller`` key is changed to another string that contains the full class and method - name of the controller by following the convention used in Symfony2 - e.g. + name of the controller by following the convention used in Symfony - e.g. ``Acme\DemoBundle\Controller\DefaultController::indexAction``. This transformation is specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver` - sub-class used by the Symfony2 Framework. + sub-class used by the Symfony Framework. b) A new instance of your controller class is instantiated with no constructor arguments. @@ -254,7 +254,7 @@ will be called after another event - ``kernel.controller`` - is dispatched. c) If the controller implements :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`, ``setContainer`` is called on the controller object and the container is passed to it. This step is also specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver` - sub-class used by the Symfony2 Framework. + sub-class used by the Symfony Framework. There are also a few other variations on the above process (e.g. if you're registering your controllers as services). @@ -273,7 +273,7 @@ After the controller callable has been determined, ``HttpKernel::handle`` dispatches the ``kernel.controller`` event. Listeners to this event might initialize some part of the system that needs to be initialized after certain things have been determined (e.g. the controller, routing information) but before -the controller is executed. For some examples, see the Symfony2 section below. +the controller is executed. For some examples, see the Symfony section below. .. image:: /images/components/http_kernel/06-kernel-controller.png :align: center @@ -316,7 +316,7 @@ is a good example. At this point the kernel has a PHP callable (the controller) and an array of arguments that should be passed when executing that callable. -.. sidebar:: Getting the Controller Arguments in the Symfony2 Framework +.. sidebar:: Getting the Controller Arguments in the Symfony Framework Now that you know exactly what the controller callable (usually a method inside a controller object) is, the ``ControllerResolver`` uses `reflection`_ @@ -479,7 +479,7 @@ as possible to the client (e.g. sending emails). .. sidebar:: ``kernel.terminate`` in the Symfony Framework - If you use the SwiftmailerBundle with Symfony2 and use ``memory`` + If you use the SwiftmailerBundle with Symfony and use ``memory`` spooling, then the :class:`Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener` is activated, which actually delivers any emails that you scheduled to send during the request. diff --git a/components/intl.rst b/components/intl.rst index 9560d6e4790..bed02fc2b55 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -64,7 +64,7 @@ code:: The intl extension internally uses the `ICU library`_ to obtain localization data such as number formats in different languages, country names and more. - To make this data accessible to userland PHP libraries, Symfony2 ships a copy + To make this data accessible to userland PHP libraries, Symfony ships a copy in the `Icu component`_. Depending on the ICU version compiled with your intl extension, a matching diff --git a/components/templating/introduction.rst b/components/templating/introduction.rst index 1e5b0999b4c..0f4ec567a5b 100644 --- a/components/templating/introduction.rst +++ b/components/templating/introduction.rst @@ -83,7 +83,7 @@ Global Variables ---------------- Sometimes, you need to set a variable which is available in all templates -rendered by an engine (like the ``$app`` variable when using the Symfony2 +rendered by an engine (like the ``$app`` variable when using the Symfony framework). These variables can be set by using the :method:`Symfony\\Component\\Templating\\PhpEngine::addGlobal` method and they can be accessed in the template as normal variables:: diff --git a/components/translation/introduction.rst b/components/translation/introduction.rst index f4a771efa23..15bda22687f 100644 --- a/components/translation/introduction.rst +++ b/components/translation/introduction.rst @@ -226,9 +226,9 @@ loaded like this:: When translating strings that are not in the default domain (``messages``), you must specify the domain as the third argument of ``trans()``:: - $translator->trans('Symfony2 is great', array(), 'admin'); + $translator->trans('Symfony is great', array(), 'admin'); -Symfony2 will now look for the message in the ``admin`` domain of the +Symfony will now look for the message in the ``admin`` domain of the specified locale. Usage diff --git a/components/translation/usage.rst b/components/translation/usage.rst index 6b57f74ff2c..68a85e44681 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -4,7 +4,7 @@ Using the Translator ==================== -Imagine you want to translate the string *"Symfony2 is great"* into French:: +Imagine you want to translate the string *"Symfony is great"* into French:: use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\Loader\ArrayLoader; @@ -12,12 +12,12 @@ Imagine you want to translate the string *"Symfony2 is great"* into French:: $translator = new Translator('fr_FR'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array( - 'Symfony2 is great!' => 'J\'aime Symfony2!', + 'Symfony is great!' => 'J\'aime Symfony!', ), 'fr_FR'); - echo $translator->trans('Symfony2 is great!'); + echo $translator->trans('Symfony is great!'); -In this example, the message *"Symfony2 is great!"* will be translated into +In this example, the message *"Symfony is great!"* will be translated into the locale set in the constructor (``fr_FR``) if the message exists in one of the message catalogs. @@ -47,7 +47,7 @@ variable with a "placeholder":: echo $translated; -Symfony2 will now look for a translation of the raw message (``Hello %name%``) +Symfony will now look for a translation of the raw message (``Hello %name%``) and *then* replace the placeholders with their values. Creating a translation is done just as before: @@ -102,7 +102,7 @@ The act of creating translation files is an important part of "localization" id-translation pairs for the given domain and locale. The source is the identifier for the individual translation, and can be the message in the main locale (e.g. *"Symfony is great"*) of your application or a unique identifier (e.g. -``symfony2.great`` - see the sidebar below). +``symfony.great`` - see the sidebar below). Translation files can be created in several different formats, XLIFF being the recommended format. These files are parsed by one of the loader classes. @@ -116,12 +116,12 @@ recommended format. These files are parsed by one of the loader classes. - Symfony2 is great - J'aime Symfony2 + Symfony is great + J'aime Symfony - symfony2.great - J'aime Symfony2 + symfony.great + J'aime Symfony @@ -129,14 +129,14 @@ recommended format. These files are parsed by one of the loader classes. .. code-block:: yaml - Symfony2 is great: J'aime Symfony2 - symfony2.great: J'aime Symfony2 + Symfony is great: J'aime Symfony + symfony.great: J'aime Symfony .. code-block:: php return array( - 'Symfony2 is great' => 'J\'aime Symfony2', - 'symfony2.great' => 'J\'aime Symfony2', + 'Symfony is great' => 'J\'aime Symfony', + 'symfony.great' => 'J\'aime Symfony', ); .. sidebar:: Using Real or Keyword Messages @@ -144,9 +144,9 @@ recommended format. These files are parsed by one of the loader classes. This example illustrates the two different philosophies when creating messages to be translated:: - $translator->trans('Symfony2 is great'); + $translator->trans('Symfony is great'); - $translator->trans('symfony2.great'); + $translator->trans('symfony.great'); In the first method, messages are written in the language of the default locale (English in this case). That message is then used as the "id" @@ -155,11 +155,11 @@ recommended format. These files are parsed by one of the loader classes. In the second method, messages are actually "keywords" that convey the idea of the message. The keyword message is then used as the "id" for any translations. In this case, translations must be made for the default - locale (i.e. to translate ``symfony2.great`` to ``Symfony2 is great``). + locale (i.e. to translate ``symfony.great`` to ``Symfony is great``). The second method is handy because the message key won't need to be changed in every translation file if you decide that the message should actually - read "Symfony2 is really great" in the default locale. + read "Symfony is really great" in the default locale. The choice of which method to use is entirely up to you, but the "keyword" format is often recommended. @@ -172,25 +172,25 @@ recommended format. These files are parsed by one of the loader classes. .. code-block:: yaml - symfony2: + symfony: is: - great: Symfony2 is great - amazing: Symfony2 is amazing + great: Symfony is great + amazing: Symfony is amazing has: - bundles: Symfony2 has bundles + bundles: Symfony has bundles user: login: Login .. code-block:: php array( - 'symfony2' => array( + 'symfony' => array( 'is' => array( - 'great' => 'Symfony2 is great', - 'amazing' => 'Symfony2 is amazing', + 'great' => 'Symfony is great', + 'amazing' => 'Symfony is amazing', ), 'has' => array( - 'bundles' => 'Symfony2 has bundles', + 'bundles' => 'Symfony has bundles', ), ), 'user' => array( @@ -206,17 +206,17 @@ recommended format. These files are parsed by one of the loader classes. .. code-block:: yaml - symfony2.is.great: Symfony2 is great - symfony2.is.amazing: Symfony2 is amazing - symfony2.has.bundles: Symfony2 has bundles + symfony.is.great: Symfony is great + symfony.is.amazing: Symfony is amazing + symfony.has.bundles: Symfony has bundles user.login: Login .. code-block:: php return array( - 'symfony2.is.great' => 'Symfony2 is great', - 'symfony2.is.amazing' => 'Symfony2 is amazing', - 'symfony2.has.bundles' => 'Symfony2 has bundles', + 'symfony.is.great' => 'Symfony is great', + 'symfony.is.amazing' => 'Symfony is amazing', + 'symfony.has.bundles' => 'Symfony has bundles', 'user.login' => 'Login', ); @@ -355,7 +355,7 @@ When translating a message, the Translator uses the specified locale or the use for translation:: $translator->trans( - 'Symfony2 is great', + 'Symfony is great', array(), 'messages', 'fr_FR' diff --git a/components/using_components.rst b/components/using_components.rst index ae0aa6a4716..6c9c13c003c 100644 --- a/components/using_components.rst +++ b/components/using_components.rst @@ -2,8 +2,10 @@ single: Components; Installation single: Components; Usage -How to Install and Use the Symfony2 Components -============================================== +.. _how-to-install-and-use-the-symfony2-components: + +How to Install and Use the Symfony Components +============================================= If you're starting a new project (or already have a project) that will use one or more components, the easiest way to integrate everything is with `Composer`_. @@ -62,7 +64,7 @@ immediately:: .. tip:: - If you want to use all of the Symfony2 Components, then instead of adding + If you want to use all of the Symfony Components, then instead of adding them one by one: .. code-block:: json diff --git a/components/yaml/introduction.rst b/components/yaml/introduction.rst index 0ebcd7156a5..1650afc82c5 100644 --- a/components/yaml/introduction.rst +++ b/components/yaml/introduction.rst @@ -10,7 +10,11 @@ The Yaml Component What is It? ----------- +<<<<<<< HEAD The Symfony2 Yaml component parses YAML strings to convert them to PHP arrays. +======= +The Symfony YAML Component parses YAML strings to convert them to PHP arrays. +>>>>>>> replace "Symfony2" with "Symfony" It is also able to convert PHP arrays to YAML strings. `YAML`_, *YAML Ain't Markup Language*, is a human friendly data serialization @@ -18,7 +22,11 @@ standard for all programming languages. YAML is a great format for your configuration files. YAML files are as expressive as XML files and as readable as INI files. +<<<<<<< HEAD The Symfony2 Yaml component implements the YAML 1.2 version of the +======= +The Symfony YAML Component implements the YAML 1.2 version of the +>>>>>>> replace "Symfony2" with "Symfony" specification. .. tip:: @@ -76,10 +84,19 @@ Full Merge Key Support Full support for references, aliases, and full merge key. Don't repeat yourself by referencing common configuration bits. +<<<<<<< HEAD Using the Symfony2 Yaml Component --------------------------------- The Symfony2 Yaml component is very simple and consists of two main classes: +======= +.. _using-the-symfony2-yaml-component: + +Using the Symfony YAML Component +-------------------------------- + +The Symfony YAML Component is very simple and consists of two main classes: +>>>>>>> replace "Symfony2" with "Symfony" one parses YAML strings (:class:`Symfony\\Component\\Yaml\\Parser`), and the other dumps a PHP array to a YAML string (:class:`Symfony\\Component\\Yaml\\Dumper`). @@ -164,7 +181,7 @@ array to its YAML representation: .. note:: - Of course, the Symfony2 YAML dumper is not able to dump resources. Also, + Of course, the Symfony YAML dumper is not able to dump resources. Also, even if the dumper is able to dump PHP objects, it is considered to be a not supported feature. diff --git a/conf.py b/conf.py index aa0723b6458..b8ffe20fc86 100644 --- a/conf.py +++ b/conf.py @@ -47,7 +47,7 @@ master_doc = 'index' # General information about the project. -project = 'Symfony2 Framework Documentation' +project = 'Symfony Framework Documentation' copyright = '' # The version info for the project you're documenting, acts as replacement for diff --git a/contributing/code/bugs.rst b/contributing/code/bugs.rst index ddb786f17d9..58d1396e54a 100644 --- a/contributing/code/bugs.rst +++ b/contributing/code/bugs.rst @@ -1,8 +1,8 @@ Reporting a Bug =============== -Whenever you find a bug in Symfony2, we kindly ask you to report it. It helps -us make a better Symfony2. +Whenever you find a bug in Symfony, we kindly ask you to report it. It helps +us make a better Symfony. .. caution:: diff --git a/contributing/code/conventions.rst b/contributing/code/conventions.rst index 35d850bb627..67962aebc00 100644 --- a/contributing/code/conventions.rst +++ b/contributing/code/conventions.rst @@ -1,7 +1,7 @@ Conventions =========== -The :doc:`standards` document describes the coding standards for the Symfony2 +The :doc:`standards` document describes the coding standards for the Symfony projects and the internal and third-party bundles. This document describes coding standards and conventions used in the core framework to make it more consistent and predictable. You are encouraged to follow them in your own diff --git a/contributing/code/license.rst b/contributing/code/license.rst index df1c9f3289c..aff6b6666d4 100644 --- a/contributing/code/license.rst +++ b/contributing/code/license.rst @@ -1,7 +1,9 @@ -Symfony2 License -================ +.. _symfony2-license: -Symfony2 is released under the MIT license. +Symfony License +=============== + +Symfony is released under the MIT license. According to `Wikipedia`_: diff --git a/contributing/code/patches.rst b/contributing/code/patches.rst index d546a690e86..62a2d051b30 100644 --- a/contributing/code/patches.rst +++ b/contributing/code/patches.rst @@ -2,7 +2,7 @@ Submitting a Patch ================== Patches are the best way to provide a bug fix or to propose enhancements to -Symfony2. +Symfony. Step 1: Setup your Environment ------------------------------ @@ -10,7 +10,7 @@ Step 1: Setup your Environment Install the Software Stack ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before working on Symfony2, setup a friendly environment with the following +Before working on Symfony, setup a friendly environment with the following software: * Git; @@ -65,11 +65,11 @@ Set up your user information with your real name and a working email address: Get the Symfony Source Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get the Symfony2 source code: +Get the Symfony source code: * Create a `GitHub`_ account and sign in; -* Fork the `Symfony2 repository`_ (click on the "Fork" button); +* Fork the `Symfony repository`_ (click on the "Fork" button); * After the "forking action" has completed, clone your fork locally (this will create a ``symfony`` directory): @@ -88,7 +88,7 @@ Get the Symfony2 source code: Check that the current Tests Pass ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now that Symfony2 is installed, check that all unit tests pass for your +Now that Symfony is installed, check that all unit tests pass for your environment as explained in the dedicated :doc:`document `. Step 2: Work on your Patch @@ -266,7 +266,7 @@ pull request message, like in: The pull request description must include the following checklist at the top to ensure that contributions may be reviewed without needless feedback -loops and that your contributions can be included into Symfony2 as quickly as +loops and that your contributions can be included into Symfony as quickly as possible: .. code-block:: text @@ -402,7 +402,7 @@ messages of all the commits. When you are finished, execute the push command. .. _ProGit: http://git-scm.com/book .. _GitHub: https://github.com/signup/free .. _`GitHub's Documentation`: https://help.github.com/articles/ignoring-files -.. _Symfony2 repository: https://github.com/symfony/symfony +.. _Symfony repository: https://github.com/symfony/symfony .. _dev mailing-list: http://groups.google.com/group/symfony-devs .. _travis-ci.org: https://travis-ci.org/ .. _`travis-ci.org status icon`: http://about.travis-ci.org/docs/user/status-images/ diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index ecff6254849..a2720e991df 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -1,9 +1,9 @@ Coding Standards ================ -When contributing code to Symfony2, you must follow its coding standards. To +When contributing code to Symfony, you must follow its coding standards. To make a long story short, here is the golden rule: **Imitate the existing -Symfony2 code**. Most open-source Bundles and libraries used by Symfony2 also +Symfony code**. Most open-source Bundles and libraries used by Symfony also follow the same guidelines, and you should too. Remember that the main advantage of standards is that every piece of code @@ -73,7 +73,7 @@ example containing most features described below: if ('values' === $mergedOptions['some_default']) { return substr($dummy, 0, 5); } - + return ucwords($dummy); } @@ -103,8 +103,8 @@ Structure * Declare class properties before methods; -* Declare public methods first, then protected ones and finally private ones. - The exceptions to this rule are the class constructor and the ``setUp`` and +* Declare public methods first, then protected ones and finally private ones. + The exceptions to this rule are the class constructor and the ``setUp`` and ``tearDown`` methods of PHPUnit tests, which should always be the first methods to increase readability; @@ -123,7 +123,7 @@ Naming Conventions * Use namespaces for all classes; -* Prefix abstract classes with ``Abstract``. Please note some early Symfony2 classes +* Prefix abstract classes with ``Abstract``. Please note some early Symfony classes do not follow this convention and have not been renamed for backward compatibility reasons. However all new abstract classes must follow this naming convention; diff --git a/contributing/code/tests.rst b/contributing/code/tests.rst index 8bda32458b7..3614cc772ca 100644 --- a/contributing/code/tests.rst +++ b/contributing/code/tests.rst @@ -1,19 +1,21 @@ -Running Symfony2 Tests -====================== +.. _running-symfony2-tests: + +Running Symfony Tests +===================== Before submitting a :doc:`patch ` for inclusion, you need to run the -Symfony2 test suite to check that you have not broken anything. +Symfony test suite to check that you have not broken anything. PHPUnit ------- -To run the Symfony2 test suite, `install PHPUnit`_ 3.7 (or later) first. +To run the Symfony test suite, `install PHPUnit`_ 3.7 (or later) first. Dependencies (optional) ----------------------- To run the entire test suite, including tests that depend on external -dependencies, Symfony2 needs to be able to autoload them. By default, they are +dependencies, Symfony needs to be able to autoload them. By default, they are autoloaded from ``vendor/`` under the main root directory (see ``autoload.php.dist``). @@ -68,7 +70,7 @@ Running First, update the vendors (see above). -Then, run the test suite from the Symfony2 root directory with the following +Then, run the test suite from the Symfony root directory with the following command: .. code-block:: bash diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 491d27df407..d00cdfa4592 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -1,7 +1,7 @@ Documentation Format ==================== -The Symfony2 documentation uses `reStructuredText`_ as its markup language and +The Symfony documentation uses `reStructuredText`_ as its markup language and `Sphinx`_ for building the output (HTML, PDF, ...). reStructuredText @@ -10,7 +10,7 @@ reStructuredText reStructuredText *"is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system"*. -You can learn more about its syntax by reading existing Symfony2 `documents`_ +You can learn more about its syntax by reading existing Symfony `documents`_ or by reading the `reStructuredText Primer`_ on the Sphinx website. .. caution:: diff --git a/contributing/documentation/license.rst b/contributing/documentation/license.rst index c8bce4bdaea..d2ee34b4077 100644 --- a/contributing/documentation/license.rst +++ b/contributing/documentation/license.rst @@ -1,7 +1,9 @@ -Symfony2 Documentation License -============================== +.. _symfony2-documentation-license: -The Symfony2 documentation is licensed under a Creative Commons +Symfony Documentation License +============================= + +The Symfony documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported `License`_. **You are free:** diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index f52bdb2228d..cb91c8b9111 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -12,7 +12,7 @@ Contributing Before contributing, you need to become familiar with the :doc:`markup language ` used by the documentation. -The Symfony2 documentation is hosted on GitHub: +The Symfony documentation is hosted on GitHub: .. code-block:: text @@ -73,7 +73,7 @@ GitHub covers the topic of `pull requests`_ in detail. .. note:: - The Symfony2 documentation is licensed under a Creative Commons + The Symfony documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported :doc:`License `. You can also prefix the title of your pull request in a few cases: @@ -129,7 +129,7 @@ Documenting new Features or Behavior Changes -------------------------------------------- If you're documenting a brand new feature or a change that's been made in -Symfony2, you should precede your description of the change with a ``.. versionadded:: 2.X`` +Symfony, you should precede your description of the change with a ``.. versionadded:: 2.X`` tag and a short description: .. code-block:: text @@ -148,9 +148,9 @@ how the behavior has changed. The ``include()`` function is a new Twig feature that's available in Symfony 2.3. Prior, the ``{% include %}`` tag was used. -Whenever a new minor version of Symfony2 is released (e.g. 2.4, 2.5, etc), +Whenever a new minor version of Symfony is released (e.g. 2.4, 2.5, etc), a new branch of the documentation is created from the ``master`` branch. -At this point, all the ``versionadded`` tags for Symfony2 versions that have +At this point, all the ``versionadded`` tags for Symfony versions that have reached end-of-life will be removed. For example, if Symfony 2.5 were released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded`` tags would be removed from the new 2.5 branch. diff --git a/contributing/documentation/translations.rst b/contributing/documentation/translations.rst index 52e17828bf6..29a6fdebb7d 100644 --- a/contributing/documentation/translations.rst +++ b/contributing/documentation/translations.rst @@ -1,7 +1,7 @@ Translations ============ -The Symfony2 documentation is written in English and many people are involved +The Symfony documentation is written in English and many people are involved in the translation process. Contributing @@ -51,7 +51,7 @@ Adding a new Language --------------------- This section gives some guidelines for starting the translation of the -Symfony2 documentation for a new language. +Symfony documentation for a new language. As starting a translation is a lot of work, talk about your plan on the `Symfony docs mailing-list`_ and try to find motivated people willing to help. diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 965e8c28e71..05d378b43d7 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -57,7 +57,7 @@ in the ``node_modules`` directory: Configure the ``uglifyjs2`` Filter ---------------------------------- -Now we need to configure Symfony2 to use the ``uglifyjs2`` filter when processing +Now we need to configure Symfony to use the ``uglifyjs2`` filter when processing your JavaScripts: .. configuration-block:: diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index abbd56e6962..cb6ba5b8174 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -4,7 +4,7 @@ How to Use Varnish to Speed up my Website ========================================= -Because Symfony2's cache uses the standard HTTP cache headers, the +Because Symfony's cache uses the standard HTTP cache headers, the :ref:`symfony-gateway-cache` can easily be replaced with any other reverse proxy. `Varnish`_ is a powerful, open-source, HTTP accelerator capable of serving cached content quickly and including support for :ref:`Edge Side Includes `. @@ -22,12 +22,12 @@ headers to be used, you need to configure Varnish as a Configuration ------------- -As seen previously, Symfony2 is smart enough to detect whether it talks to a +As seen previously, Symfony is smart enough to detect whether it talks to a reverse proxy that understands ESI or not. It works out of the box when you -use the Symfony2 reverse proxy, but you need a special configuration to make -it work with Varnish. Thankfully, Symfony2 relies on yet another standard +use the Symfony reverse proxy, but you need a special configuration to make +it work with Varnish. Thankfully, Symfony relies on yet another standard written by Akamai (`Edge Architecture`_), so the configuration tips in this -chapter can be useful even if you don't use Symfony2. +chapter can be useful even if you don't use Symfony. .. note:: @@ -52,7 +52,7 @@ application: Then, optimize Varnish so that it only parses the Response contents when there is at least one ESI tag by checking the ``Surrogate-Control`` header that -Symfony2 adds automatically: +Symfony adds automatically: .. code-block:: text @@ -91,16 +91,16 @@ Symfony2 adds automatically: Cache Invalidation ------------------ -If you want to cache content that changes frequently and still serve -the most recent version to users, you need to invalidate that content. -While `cache invalidation`_ allows you to purge content from your +If you want to cache content that changes frequently and still serve +the most recent version to users, you need to invalidate that content. +While `cache invalidation`_ allows you to purge content from your proxy before it has expired, it adds complexity to your caching setup. .. tip:: - The open source `FOSHttpCacheBundle`_ takes the pain out of cache - invalidation by helping you to organize your caching and - invalidation setup. + The open source `FOSHttpCacheBundle`_ takes the pain out of cache + invalidation by helping you to organize your caching and + invalidation setup. Varnish can be configured to accept a special HTTP ``PURGE`` method that will invalidate the cache for a given resource: diff --git a/cookbook/configuration/apache_router.rst b/cookbook/configuration/apache_router.rst index 3ad958b9e84..4129e507eeb 100644 --- a/cookbook/configuration/apache_router.rst +++ b/cookbook/configuration/apache_router.rst @@ -4,8 +4,8 @@ How to Use the Apache Router ============================ -Symfony2, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking. -One of these ways is by letting Apache handle routes directly, rather than using Symfony2 for this task. +Symfony, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking. +One of these ways is by letting Apache handle routes directly, rather than using Symfony for this task. .. caution:: @@ -18,7 +18,7 @@ Change Router Configuration Parameters -------------------------------------- To dump Apache routes you must first tweak some configuration parameters to tell -Symfony2 to use the ``ApacheUrlMatcher`` instead of the default one: +Symfony to use the ``ApacheUrlMatcher`` instead of the default one: .. configuration-block:: diff --git a/cookbook/configuration/configuration_organization.rst b/cookbook/configuration/configuration_organization.rst index 52c5c0f0d4a..d124ff9629d 100644 --- a/cookbook/configuration/configuration_organization.rst +++ b/cookbook/configuration/configuration_organization.rst @@ -4,7 +4,7 @@ How to Organize Configuration Files =================================== -The default Symfony2 Standard Edition defines three +The default Symfony Standard Edition defines three :doc:`execution environments ` called ``dev``, ``prod`` and ``test``. An environment simply represents a way to execute the same codebase with different configurations. diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index d4884e2223a..4547b4fc1b1 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -7,7 +7,7 @@ How to Master and Create new Environments Every application is the combination of code and a set of configuration that dictates how that code should function. The configuration may define the database being used, whether or not something should be cached, or how verbose -logging should be. In Symfony2, the idea of "environments" is the idea that +logging should be. In Symfony, the idea of "environments" is the idea that the same codebase can be run using multiple different configurations. For example, the ``dev`` environment should use configuration that makes development easy and friendly, while the ``prod`` environment should use a set of configuration @@ -19,7 +19,7 @@ optimized for speed. Different Environments, different Configuration Files ----------------------------------------------------- -A typical Symfony2 application begins with three environments: ``dev``, +A typical Symfony application begins with three environments: ``dev``, ``prod``, and ``test``. As discussed, each "environment" simply represents a way to execute the same codebase with different configuration. It should be no surprise then that each environment loads its own individual configuration @@ -49,7 +49,7 @@ class: } } -As you can see, when Symfony2 is loaded, it uses the given environment to +As you can see, when Symfony is loaded, it uses the given environment to determine which configuration file to load. This accomplishes the goal of multiple environments in an elegant, powerful and transparent way. @@ -141,7 +141,7 @@ either the ``app.php`` (for the ``prod`` environment) or the ``app_dev.php`` The given URLs assume that your web server is configured to use the ``web/`` directory of the application as its root. Read more in - :doc:`Installing Symfony2 `. + :doc:`Installing Symfony `. If you open up one of these files, you'll quickly see that the environment used by each is explicitly set:: @@ -154,7 +154,7 @@ used by each is explicitly set:: // ... As you can see, the ``prod`` key specifies that this application will run -in the ``prod`` environment. A Symfony2 application can be executed in any +in the ``prod`` environment. A Symfony application can be executed in any environment by using this code and changing the environment string. .. note:: @@ -172,7 +172,7 @@ environment by using this code and changing the environment string. Important, but unrelated to the topic of *environments* is the ``false`` argument as the second argument to the ``AppKernel`` constructor. This specifies whether or not the application should run in "debug mode". Regardless - of the environment, a Symfony2 application can be run with debug mode + of the environment, a Symfony application can be run with debug mode set to ``true`` or ``false``. This affects many things in the application, such as whether or not errors should be displayed or if cache files are dynamically rebuilt on each request. Though not a requirement, debug mode @@ -218,14 +218,14 @@ environment by using this code and changing the environment string. Creating a new Environment -------------------------- -By default, a Symfony2 application has three environments that handle most +By default, a Symfony application has three environments that handle most cases. Of course, since an environment is nothing more than a string that corresponds to a set of configuration, creating a new environment is quite easy. Suppose, for example, that before deployment, you need to benchmark your application. One way to benchmark the application is to use near-production -settings, but with Symfony2's ``web_profiler`` enabled. This allows Symfony2 +settings, but with Symfony's ``web_profiler`` enabled. This allows Symfony to record information about your application while benchmarking. The best way to accomplish this is via a new environment called, for example, @@ -306,7 +306,7 @@ The new environment is now accessible via:: Environments and the Cache Directory ------------------------------------ -Symfony2 takes advantage of caching in many ways: the application configuration, +Symfony takes advantage of caching in many ways: the application configuration, routing configuration, Twig templates and more are cached to PHP objects stored in files on the filesystem. diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst index 39ee107aa61..0f9c56501c5 100644 --- a/cookbook/configuration/external_parameters.rst +++ b/cookbook/configuration/external_parameters.rst @@ -24,7 +24,7 @@ the following ``VirtualHost`` configuration: .. code-block:: apache - ServerName Symfony2 + ServerName Symfony DocumentRoot "/path/to/symfony_2_app/web" DirectoryIndex index.php index.html SetEnv SYMFONY__DATABASE__USER user @@ -65,7 +65,7 @@ You can now reference these parameters wherever you need them. doctrine: dbal: driver pdo_mysql - dbname: symfony2_project + dbname: symfony_project user: "%database.user%" password: "%database.password%" @@ -77,7 +77,7 @@ You can now reference these parameters wherever you need them. @@ -88,7 +88,7 @@ You can now reference these parameters wherever you need them. $container->loadFromExtension('doctrine', array( 'dbal' => array( 'driver' => 'pdo_mysql', - 'dbname' => 'symfony2_project', + 'dbname' => 'symfony_project', 'user' => '%database.user%', 'password' => '%database.password%', ) diff --git a/cookbook/configuration/front_controllers_and_kernel.rst b/cookbook/configuration/front_controllers_and_kernel.rst index 0acb4be5ff4..705b6697983 100644 --- a/cookbook/configuration/front_controllers_and_kernel.rst +++ b/cookbook/configuration/front_controllers_and_kernel.rst @@ -18,7 +18,7 @@ three parts that work together: .. note:: Usually, you will not need to define your own front controller or - ``AppKernel`` class as the `Symfony2 Standard Edition`_ provides + ``AppKernel`` class as the `Symfony Standard Edition`_ provides sensible default implementations. This documentation section is provided to explain what is going on behind @@ -30,7 +30,7 @@ The Front Controller The `front controller`_ is a well-known design pattern; it is a section of code that *all* requests served by an application run through. -In the `Symfony2 Standard Edition`_, this role is taken by the `app.php`_ +In the `Symfony Standard Edition`_, this role is taken by the `app.php`_ and `app_dev.php`_ files in the ``web/`` directory. These are the very first PHP scripts executed when a request is processed. @@ -83,7 +83,7 @@ The Kernel Class ---------------- The :class:`Symfony\\Component\\HttpKernel\\Kernel` is the core of -Symfony2. It is responsible for setting up all the bundles that make up +Symfony. It is responsible for setting up all the bundles that make up your application and providing them with the application's configuration. It then creates the service container before serving requests in its :method:`Symfony\\Component\\HttpKernel\\HttpKernelInterface::handle` @@ -105,7 +105,7 @@ To fill these (small) blanks, your application needs to subclass the Kernel and implement these methods. The resulting class is conventionally called the ``AppKernel``. -Again, the Symfony2 Standard Edition provides an `AppKernel`_ in the ``app/`` +Again, the Symfony Standard Edition provides an `AppKernel`_ in the ``app/`` directory. This class uses the name of the environment - which is passed to the Kernel's :method:`constructor ` method and is available via :method:`Symfony\\Component\\HttpKernel\\Kernel::getEnvironment` - @@ -162,7 +162,7 @@ free to implement this method differently if you need a more sophisticated way of loading your configuration. .. _front controller: http://en.wikipedia.org/wiki/Front_Controller_pattern -.. _Symfony2 Standard Edition: https://github.com/symfony/symfony-standard +.. _Symfony Standard Edition: https://github.com/symfony/symfony-standard .. _app.php: https://github.com/symfony/symfony-standard/blob/master/web/app.php .. _app_dev.php: https://github.com/symfony/symfony-standard/blob/master/web/app_dev.php .. _app/console: https://github.com/symfony/symfony-standard/blob/master/app/console diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index 85d04ef3c8d..be5e606d2ef 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -4,12 +4,12 @@ How to Use PdoSessionHandler to Store Sessions in the Database ============================================================== -The default session storage of Symfony2 writes the session information to +The default Symfony session storage writes the session information to file(s). Most medium to large websites use a database to store the session values instead of files, because databases are easier to use and scale in a multi-webserver environment. -Symfony2 has a built-in solution for database session storage called +Symfony has a built-in solution for database session storage called :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`. To use it, you just need to change some parameters in ``config.yml`` (or the configuration format of your choice): diff --git a/cookbook/configuration/web_server_configuration.rst b/cookbook/configuration/web_server_configuration.rst index 9c9fcfb4af8..e93e873307c 100644 --- a/cookbook/configuration/web_server_configuration.rst +++ b/cookbook/configuration/web_server_configuration.rst @@ -4,7 +4,7 @@ Configuring a Web Server ======================== -The preferred way to develop your Symfony2 application is to use +The preferred way to develop your Symfony application is to use :doc:`PHP's internal web server `. However, when using an older PHP version or when running the application in the production environment, you'll need to use a fully-featured web server. This article diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 4941e83edf2..4ed71637446 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -6,12 +6,12 @@ How to Create a Console Command The Console page of the Components section (:doc:`/components/console/introduction`) covers how to create a console command. This cookbook article covers the differences -when creating console commands within the Symfony2 framework. +when creating console commands within the Symfony framework. Automatically Registering Commands ---------------------------------- -To make the console commands available automatically with Symfony2, create a +To make the console commands available automatically with Symfony, create a ``Command`` directory inside your bundle and create a PHP file suffixed with ``Command.php`` for each command that you want to provide. For example, if you want to extend the AcmeDemoBundle to greet you from the command line, create diff --git a/cookbook/controller/error_pages.rst b/cookbook/controller/error_pages.rst index 1f4af550f39..00cb1b420f8 100644 --- a/cookbook/controller/error_pages.rst +++ b/cookbook/controller/error_pages.rst @@ -5,7 +5,7 @@ How to Customize Error Pages ============================ -When any exception is thrown in Symfony2, the exception is caught inside the +When any exception is thrown in Symfony, the exception is caught inside the ``Kernel`` class and eventually forwarded to a special controller, ``TwigBundle:Exception:show`` for handling. This controller, which lives inside the core TwigBundle, determines which error template to display and @@ -31,7 +31,7 @@ shown to the end-user. You should not set ``kernel.debug`` to ``false`` in order to see your error pages during development. This will also stop - Symfony2 from recompiling your twig templates, among other things. + Symfony from recompiling your twig templates, among other things. The third-party `WebfactoryExceptionsBundle`_ provides a special test controller that allows you to display your custom error @@ -75,7 +75,7 @@ template located at .. tip:: If you're not familiar with Twig, don't worry. Twig is a simple, powerful - and optional templating engine that integrates with Symfony2. For more + and optional templating engine that integrates with Symfony. For more information about Twig see :doc:`/book/templating`. In addition to the standard HTML error page, Symfony provides a default error @@ -111,7 +111,7 @@ Symfony uses the following algorithm to determine which template to use: To see the full list of default error templates, see the ``Resources/views/Exception`` directory of the TwigBundle. In a - standard Symfony2 installation, the TwigBundle can be found at + standard Symfony installation, the TwigBundle can be found at ``vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle``. Often, the easiest way to customize an error page is to copy it from the TwigBundle into ``app/Resources/TwigBundle/views/Exception`` and then modify it. diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index da39e672401..a355f186fa9 100644 --- a/cookbook/controller/service.rst +++ b/cookbook/controller/service.rst @@ -25,7 +25,7 @@ this works fine, controllers can also be specified as services. split into multiple controllers. So, even if you don't specify your controllers as services, you'll likely - see this done in some open-source Symfony2 bundles. It's also important + see this done in some open-source Symfony bundles. It's also important to understand the pros and cons of both approaches. Defining the Controller as a Service diff --git a/cookbook/deployment/azure-website.rst b/cookbook/deployment/azure-website.rst index a35ccbaea03..efee282260e 100644 --- a/cookbook/deployment/azure-website.rst +++ b/cookbook/deployment/azure-website.rst @@ -4,7 +4,7 @@ Deploying to Microsoft Azure Website Cloud ========================================== -This step by step cookbook describes how to deploy a small Symfony2 web +This step by step cookbook describes how to deploy a small Symfony web application to the Microsoft Azure Website cloud platform. It will explain how to setup a new Azure website including configuring the right PHP version and global environment variables. The document also shows how to you can leverage @@ -355,7 +355,7 @@ below. Of course, each value depends on what you've already configured. .. code-block:: text - Database=mysymfony2MySQL;Data Source=eu-cdbr-azure-north-c.cloudapp.net;User Id=bff2481a5b6074;Password=bdf50b42 + Database=mysymfonyMySQL;Data Source=eu-cdbr-azure-north-c.cloudapp.net;User Id=bff2481a5b6074;Password=bdf50b42 Switch back to the console and answer the prompted questions and provide the following answers. Don't forget to adapt the values below with your real values @@ -366,7 +366,7 @@ from the MySQL connection string. database_driver: pdo_mysql database_host: u-cdbr-azure-north-c.cloudapp.net database_port: null - database_name: mysymfony2MySQL + database_name: mysymfonyMySQL database_user: bff2481a5b6074 database_password: bdf50b42 // ... diff --git a/cookbook/deployment/heroku.rst b/cookbook/deployment/heroku.rst index 22370e8152b..87baeb6c8d6 100644 --- a/cookbook/deployment/heroku.rst +++ b/cookbook/deployment/heroku.rst @@ -4,7 +4,7 @@ Deploying to Heroku Cloud ========================= -This step by step cookbook describes how to deploy a Symfony2 web application to +This step by step cookbook describes how to deploy a Symfony web application to the Heroku cloud platform. Its contents are based on `the original article`_ published by Heroku. @@ -15,24 +15,24 @@ To setup a new Heroku website, first `signup with Heroku`_ or sign in with your credentials. Then download and install the `Heroku Toolbelt`_ on your local computer. -You can also check out the `getting Started with PHP on Heroku`_ guide to gain +You can also check out the `getting Started with PHP on Heroku`_ guide to gain more familiarity with the specifics of working with PHP applications on Heroku. Preparing your Application ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Deploying a Symfony2 application to Heroku doesn't require any change in its +Deploying a Symfony application to Heroku doesn't require any change in its code, but it requires some minor tweaks to its configuration. -By default, the Symfony2 app will log into your application's ``app/log/`` -directory. This is not ideal as Heroku uses an `ephemeral file system`_. On -Heroku, the best way to handle logging is using `Logplex`_. And the best way to -send log data to Logplex is by writing to ``STDERR`` or ``STDOUT``. Luckily, -Symfony2 uses the excellent Monolog library for logging. So, a new log +By default, the Symfony app will log into your application's ``app/log/`` +directory. This is not ideal as Heroku uses an `ephemeral file system`_. On +Heroku, the best way to handle logging is using `Logplex`_. And the best way to +send log data to Logplex is by writing to ``STDERR`` or ``STDOUT``. Luckily, +Symfony uses the excellent Monolog library for logging. So, a new log destination is just a change to a config file away. Open the ``app/config/config_prod.yml`` file, locate the -``monolog/handlers/nested`` section (or create it if it doesn't exist yet) and +``monolog/handlers/nested`` section (or create it if it doesn't exist yet) and change the value of ``path`` from ``"%kernel.logs_dir%/%kernel.environment%.log"`` to ``"php://stderr"``: @@ -47,7 +47,7 @@ change the value of ``path`` from # ... path: "php://stderr" -Once the application is deployed, run ``heroku logs --tail`` to keep the +Once the application is deployed, run ``heroku logs --tail`` to keep the stream of logs from Heroku open in your terminal. Creating a new Application on Heroku @@ -69,37 +69,37 @@ You are now ready to deploy the application as explained in the next section. Deploying your Application on Heroku ------------------------------------ -To deploy your application to Heroku, you must first create a ``Procfile``, -which tells Heroku what command to use to launch the web server with the -correct settings. After you've done that, you can simply ``git push`` and +To deploy your application to Heroku, you must first create a ``Procfile``, +which tells Heroku what command to use to launch the web server with the +correct settings. After you've done that, you can simply ``git push`` and you're done! Creating a Procfile ~~~~~~~~~~~~~~~~~~~ -By default, Heroku will launch an Apache web server together with PHP to serve +By default, Heroku will launch an Apache web server together with PHP to serve applications. However, two special circumstances apply to Symfony applications: 1. The document root is in the ``web/`` directory and not in the root directory of the application; -2. The Composer ``bin-dir``, where vendor binaries (and thus Heroku's own boot +2. The Composer ``bin-dir``, where vendor binaries (and thus Heroku's own boot scripts) are placed, is ``bin/`` , and not the default ``vendor/bin``. .. note:: - Vendor binaries are usually installed to ``vendor/bin`` by Composer, but - sometimes (e.g. when running a Symfony Standard Edition project!), the + Vendor binaries are usually installed to ``vendor/bin`` by Composer, but + sometimes (e.g. when running a Symfony Standard Edition project!), the location will be different. If in doubt, you can always run ``composer config bin-dir`` to figure out the right location. -Create a new file called ``Procfile`` (without any extension) at the root +Create a new file called ``Procfile`` (without any extension) at the root directory of the application and add just the following content: .. code-block:: text web: bin/heroku-php-apache2 web/ -If you prefer working on the command console, execute the following commands to +If you prefer working on the command console, execute the following commands to create the ``Procfile`` file and to add it to the repository: .. code-block:: bash @@ -175,8 +175,8 @@ Then, deploy your application executing this command: To git@heroku.com:mighty-hamlet-1981.git * [new branch] master -> master -And that's it! If you now open your browser, either by manually pointing -it to the URL ``heroku create`` gave you, or by using the Heroku Toolbelt, the +And that's it! If you now open your browser, either by manually pointing +it to the URL ``heroku create`` gave you, or by using the Heroku Toolbelt, the application will respond: .. code-block:: bash @@ -184,7 +184,7 @@ application will respond: $ heroku open Opening mighty-hamlet-1981... done -You should be seeing your Symfony2 application in your browser. +You should be seeing your Symfony application in your browser. .. _`the original article`: https://devcenter.heroku.com/articles/getting-started-with-symfony2 .. _`signup with Heroku`: https://signup.heroku.com/signup/dc diff --git a/cookbook/deployment/tools.rst b/cookbook/deployment/tools.rst index 9f7e50616e0..76992a17c59 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -1,8 +1,10 @@ .. index:: single: Deployment; Deployment tools -How to Deploy a Symfony2 Application -==================================== +.. _how-to-deploy-a-symfony2-application: + +How to Deploy a Symfony Application +=================================== .. note:: @@ -10,10 +12,12 @@ How to Deploy a Symfony2 Application This entry doesn't try to explain everything, but rather offers the most common requirements and ideas for deployment. -Symfony2 Deployment Basics --------------------------- +.. _symfony2-deployment-basics: + +Symfony Deployment Basics +------------------------- -The typical steps taken while deploying a Symfony2 application include: +The typical steps taken while deploying a Symfony application include: #. Upload your modified code to the live server; #. Update your vendor dependencies (typically done via Composer, and may @@ -29,10 +33,10 @@ A deployment may also include other things, such as: * Removal of any unnecessary files from ``web`` to keep your production environment clean; * Clearing of external cache systems (like `Memcached`_ or `Redis`_). -How to Deploy a Symfony2 Application ------------------------------------- +How to Deploy a Symfony Application +----------------------------------- -There are several ways you can deploy a Symfony2 application. +There are several ways you can deploy a Symfony application. Start with a few basic deployment strategies and build up from there. @@ -60,7 +64,7 @@ Using Build Scripts and other Tools There are also high-quality tools to help ease the pain of deployment. There are even a few tools which have been specifically tailored to the requirements of -Symfony2, and which take special care to ensure that everything before, during, +Symfony, and which take special care to ensure that everything before, during, and after a deployment has gone correctly. See `The Tools`_ for a list of tools that can help with deployment. @@ -165,11 +169,11 @@ The Tools `Capifony`_: This tool provides a specialized set of tools on top of Capistrano, tailored - specifically to symfony and Symfony2 projects. + specifically to symfony and Symfony projects. `sf2debpkg`_: - This tool helps you build a native Debian package for your Symfony2 project. + This tool helps you build a native Debian package for your Symfony project. `Magallanes`_: @@ -179,7 +183,7 @@ The Tools Bundles: There are many `bundles that add deployment features`_ directly into your - Symfony2 console. + Symfony console. Basic scripting: @@ -191,7 +195,7 @@ Platform as a Service Providers: PaaS is a relatively new way to deploy your application. Typically a PaaS will use a single configuration file in your project's root directory to determine how to build an environment on the fly that supports your software. - One provider with confirmed Symfony2 support is `PagodaBox`_. + One provider with confirmed Symfony support is `PagodaBox`_. .. tip:: diff --git a/cookbook/doctrine/common_extensions.rst b/cookbook/doctrine/common_extensions.rst index 8f6719745a6..0944fa5e7cb 100644 --- a/cookbook/doctrine/common_extensions.rst +++ b/cookbook/doctrine/common_extensions.rst @@ -20,7 +20,7 @@ To do this, you have two options: #. Use the `StofDoctrineExtensionsBundle`_, which integrates the above library. #. Implement this services directly by following the documentation for integration - with Symfony2: `Install Gedmo Doctrine2 extensions in Symfony2`_ + with Symfony: `Install Gedmo Doctrine2 extensions in Symfony2`_ .. _`DoctrineExtensions`: https://github.com/Atlantic18/DoctrineExtensions .. _`StofDoctrineExtensionsBundle`: https://github.com/stof/StofDoctrineExtensionsBundle diff --git a/cookbook/doctrine/dbal.rst b/cookbook/doctrine/dbal.rst index 2f208c23c99..5cc468202c2 100644 --- a/cookbook/doctrine/dbal.rst +++ b/cookbook/doctrine/dbal.rst @@ -31,7 +31,7 @@ To get started, configure the database connection parameters: doctrine: dbal: driver: pdo_mysql - dbname: Symfony2 + dbname: Symfony user: root password: null charset: UTF8 @@ -42,7 +42,7 @@ To get started, configure the database connection parameters: loadFromExtension('doctrine', array( 'dbal' => array( 'driver' => 'pdo_mysql', - 'dbname' => 'Symfony2', + 'dbname' => 'Symfony', 'user' => 'root', 'password' => null, ), diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index ab90001194e..95a06bd7672 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -213,7 +213,7 @@ rules:: .. note:: - As you are using the ``File`` constraint, Symfony2 will automatically guess + As you are using the ``File`` constraint, Symfony will automatically guess that the form field is a file upload input. That's why you did not have to set it explicitly when creating the form above (``->add('file')``). diff --git a/cookbook/doctrine/multiple_entity_managers.rst b/cookbook/doctrine/multiple_entity_managers.rst index 271ed3f6f7a..689d9d1bba2 100644 --- a/cookbook/doctrine/multiple_entity_managers.rst +++ b/cookbook/doctrine/multiple_entity_managers.rst @@ -4,7 +4,7 @@ How to Work with multiple Entity Managers and Connections ========================================================= -You can use multiple Doctrine entity managers or connections in a Symfony2 +You can use multiple Doctrine entity managers or connections in a Symfony application. This is necessary if you are using different databases or even vendors with entirely different sets of entities. In other words, one entity manager that connects to one database will handle some entities while another diff --git a/cookbook/email/dev_environment.rst b/cookbook/email/dev_environment.rst index 216370d2f72..65a5a64524e 100644 --- a/cookbook/email/dev_environment.rst +++ b/cookbook/email/dev_environment.rst @@ -6,7 +6,7 @@ How to Work with Emails during Development When developing an application which sends email, you will often not want to actually send the email to the specified recipient during -development. If you are using the SwiftmailerBundle with Symfony2, you +development. If you are using the SwiftmailerBundle with Symfony, you can easily achieve this through configuration settings without having to make any changes to your application's code at all. There are two main choices when it comes to handling email during development: (a) disabling the diff --git a/cookbook/email/email.rst b/cookbook/email/email.rst index 6c2d8978714..77392629a9f 100644 --- a/cookbook/email/email.rst +++ b/cookbook/email/email.rst @@ -129,7 +129,7 @@ of `Creating Messages`_ in great detail in its documentation. .. tip:: Several other cookbook articles are available related to sending emails - in Symfony2: + in Symfony: * :doc:`gmail` * :doc:`dev_environment` diff --git a/cookbook/email/spool.rst b/cookbook/email/spool.rst index 37fb02f2344..9210787160d 100644 --- a/cookbook/email/spool.rst +++ b/cookbook/email/spool.rst @@ -4,7 +4,7 @@ How to Spool Emails =================== -When you are using the SwiftmailerBundle to send an email from a Symfony2 +When you are using the SwiftmailerBundle to send an email from a Symfony application, it will default to sending the email immediately. You may, however, want to avoid the performance hit of the communication between Swift Mailer and the email transport, which could cause the user to wait for the next diff --git a/cookbook/email/testing.rst b/cookbook/email/testing.rst index f42025bef6e..db6e717ec36 100644 --- a/cookbook/email/testing.rst +++ b/cookbook/email/testing.rst @@ -4,11 +4,11 @@ How to Test that an Email is Sent in a functional Test ====================================================== -Sending e-mails with Symfony2 is pretty straightforward thanks to the +Sending e-mails with Symfony is pretty straightforward thanks to the SwiftmailerBundle, which leverages the power of the `Swift Mailer`_ library. To functionally test that an email was sent, and even assert the email subject, -content or any other headers, you can use :ref:`the Symfony2 Profiler `. +content or any other headers, you can use :ref:`the Symfony Profiler `. Start with an easy controller action that sends an e-mail:: diff --git a/cookbook/event_dispatcher/before_after_filters.rst b/cookbook/event_dispatcher/before_after_filters.rst index b4e17c33590..569f0c7cce5 100644 --- a/cookbook/event_dispatcher/before_after_filters.rst +++ b/cookbook/event_dispatcher/before_after_filters.rst @@ -125,7 +125,7 @@ event listeners, you can learn more about them at :doc:`/cookbook/service_contai $controller = $event->getController(); /* - * $controller passed can be either a class or a Closure. This is not usual in Symfony2 but it may happen. + * $controller passed can be either a class or a Closure. This is not usual in Symfony but it may happen. * If it is a class, it comes in array format */ if (!is_array($controller)) { diff --git a/cookbook/logging/channels_handlers.rst b/cookbook/logging/channels_handlers.rst index 9e749ac9a16..131317eb47a 100644 --- a/cookbook/logging/channels_handlers.rst +++ b/cookbook/logging/channels_handlers.rst @@ -10,7 +10,7 @@ service (``monolog.logger.XXX``) in the container and is injected to the concerned service. The purpose of channels is to be able to organize different types of log messages. -By default, Symfony2 logs every messages into a single file (regardless of +By default, Symfony logs every message into a single file (regardless of the channel). Switching a Channel to a different Handler diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index 51c8cd5976f..ab290e5d519 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -4,7 +4,7 @@ How to Use Monolog to Write Logs ================================ -Monolog_ is a logging library for PHP 5.3 used by Symfony2. It is +Monolog_ is a logging library for PHP 5.3 used by Symfony. It is inspired by the Python LogBook library. Usage diff --git a/cookbook/profiler/data_collector.rst b/cookbook/profiler/data_collector.rst index c88d55701df..6c02639f197 100644 --- a/cookbook/profiler/data_collector.rst +++ b/cookbook/profiler/data_collector.rst @@ -4,8 +4,8 @@ How to Create a custom Data Collector ===================================== -The Symfony2 :ref:`Profiler ` delegates data collecting to -data collectors. Symfony2 comes bundled with a few of them, but you can easily +The Symfony :ref:`Profiler ` delegates data collecting to +data collectors. Symfony comes bundled with a few of them, but you can easily create your own. Creating a custom Data Collector diff --git a/cookbook/profiler/matchers.rst b/cookbook/profiler/matchers.rst index 09f83c73f55..b23af0d21f0 100644 --- a/cookbook/profiler/matchers.rst +++ b/cookbook/profiler/matchers.rst @@ -13,7 +13,7 @@ by using matchers. Using the built-in Matcher -------------------------- -Symfony2 provides a +Symfony provides a :class:`built-in matcher ` which can match paths and IPs. For example, if you want to only show the profiler when accessing the page with the ``168.0.0.1`` IP, then you can diff --git a/cookbook/routing/method_parameters.rst b/cookbook/routing/method_parameters.rst index 097ae3daebc..72bf7120afc 100644 --- a/cookbook/routing/method_parameters.rst +++ b/cookbook/routing/method_parameters.rst @@ -83,9 +83,9 @@ Faking the Method with ``_method`` 2.3, use the :ref:`configuration-framework-http_method_override` option. Unfortunately, life isn't quite this simple, since most browsers do not -support sending PUT and DELETE requests. Fortunately Symfony2 provides you +support sending PUT and DELETE requests. Fortunately, Symfony provides you with a simple way of working around this limitation. By including a ``_method`` -parameter in the query string or parameters of an HTTP request, Symfony2 will +parameter in the query string or parameters of an HTTP request, Symfony will use this as the method when matching routes. Forms automatically include a hidden field for this parameter if their submission method is not GET or POST. See :ref:`the related chapter in the forms documentation` diff --git a/cookbook/routing/redirect_trailing_slash.rst b/cookbook/routing/redirect_trailing_slash.rst index 65a09c9467c..01b0010fc1e 100644 --- a/cookbook/routing/redirect_trailing_slash.rst +++ b/cookbook/routing/redirect_trailing_slash.rst @@ -89,5 +89,5 @@ system, as explained below: Make sure to include this route in your routing configuration at the very end of your route listing. Otherwise, you risk redirecting real - routes (including Symfony2 core routes) that actually *do* have a trailing + routes (including Symfony core routes) that actually *do* have a trailing slash in their path. diff --git a/cookbook/security/acl.rst b/cookbook/security/acl.rst index 0ee5b34fecd..b26b271b4db 100644 --- a/cookbook/security/acl.rst +++ b/cookbook/security/acl.rst @@ -25,7 +25,7 @@ posts. Now, you want a user to be able to edit their own comments, but not those of other users; besides, you yourself want to be able to edit all comments. In this scenario, ``Comment`` would be the domain object that you want to restrict access to. You could take several approaches to accomplish this using -Symfony2, two basic approaches are (non-exhaustive): +Symfony, two basic approaches are (non-exhaustive): - *Enforce security in your business methods*: Basically, that means keeping a reference inside each ``Comment`` to all users who have access, and then @@ -189,7 +189,7 @@ Checking Access } In this example, you check whether the user has the ``EDIT`` permission. -Internally, Symfony2 maps the permission to several integer bitmasks, and +Internally, Symfony maps the permission to several integer bitmasks, and checks whether the user has any of them. .. note:: diff --git a/cookbook/security/acl_advanced.rst b/cookbook/security/acl_advanced.rst index 825af661520..36864b6b8cd 100644 --- a/cookbook/security/acl_advanced.rst +++ b/cookbook/security/acl_advanced.rst @@ -10,10 +10,10 @@ also explain some of the design decisions behind it. Design Concepts --------------- -Symfony2's object instance security capabilities are based on the concept of +Symfony's object instance security capabilities are based on the concept of an Access Control List. Every domain object **instance** has its own ACL. The ACL instance holds a detailed list of Access Control Entries (ACEs) which are -used to make access decisions. Symfony2's ACL system focuses on two main +used to make access decisions. Symfony's ACL system focuses on two main objectives: - providing a way to efficiently retrieve a large amount of ACLs/ACEs for your @@ -21,7 +21,7 @@ objectives: - providing a way to easily make decisions of whether a person is allowed to perform an action on a domain object or not. -As indicated by the first point, one of the main capabilities of Symfony2's +As indicated by the first point, one of the main capabilities of Symfony's ACL system is a high-performance way of retrieving ACLs/ACEs. This is extremely important since each ACL might have several ACEs, and inherit from another ACL in a tree-like fashion. Therefore, no ORM is leveraged, instead @@ -77,7 +77,7 @@ Scope of Access Control Entries ------------------------------- Access control entries can have different scopes in which they apply. In -Symfony2, there are basically two different scopes: +Symfony, there are basically two different scopes: - Class-Scope: These entries apply to all objects with the same class. - Object-Scope: This was the scope solely used in the previous chapter, and diff --git a/cookbook/security/custom_authentication_provider.rst b/cookbook/security/custom_authentication_provider.rst index 83972ce2277..4232c04ba32 100644 --- a/cookbook/security/custom_authentication_provider.rst +++ b/cookbook/security/custom_authentication_provider.rst @@ -14,7 +14,7 @@ How to Create a custom Authentication Provider * :doc:`/cookbook/security/api_key_authentication` If you have read the chapter on :doc:`/book/security`, you understand the -distinction Symfony2 makes between authentication and authorization in the +distinction Symfony makes between authentication and authorization in the implementation of security. This chapter discusses the core classes involved in the authentication process, and how to implement a custom authentication provider. Because authentication and authorization are separate concepts, @@ -38,7 +38,7 @@ REST. There is plenty of great documentation on `WSSE`_, but this article will focus not on the security protocol, but rather the manner in which a custom -protocol can be added to your Symfony2 application. The basis of WSSE is +protocol can be added to your Symfony application. The basis of WSSE is that a request header is checked for encrypted credentials, verified using a timestamp and `nonce`_, and authenticated for the requested user using a password digest. @@ -51,7 +51,7 @@ password digest. The Token --------- -The role of the token in the Symfony2 security context is an important one. +The role of the token in the Symfony security context is an important one. A token represents the user authentication data present in the request. Once a request is authenticated, the token retains the user's data, and delivers this data across the security context. First, you'll create your token class. diff --git a/cookbook/security/form_login.rst b/cookbook/security/form_login.rst index 6e6b14133f5..79ce5f808d1 100644 --- a/cookbook/security/form_login.rst +++ b/cookbook/security/form_login.rst @@ -5,7 +5,7 @@ How to Customize your Form Login ================================ Using a :ref:`form login ` for authentication is -a common, and flexible, method for handling authentication in Symfony2. Pretty +a common, and flexible, method for handling authentication in Symfony. Pretty much every aspect of the form login can be customized. The full, default configuration is shown in the next section. diff --git a/cookbook/security/securing_services.rst b/cookbook/security/securing_services.rst index b13a8fbc99b..641a43f04ec 100644 --- a/cookbook/security/securing_services.rst +++ b/cookbook/security/securing_services.rst @@ -146,7 +146,7 @@ Securing Methods Using Annotations You can also secure method calls in any service with annotations by using the optional `JMSSecurityExtraBundle`_ bundle. This bundle is not included in the -Symfony2 Standard Distribution, but you can choose to install it. +Symfony Standard Distribution, but you can choose to install it. To enable the annotations functionality, :ref:`tag ` the service you want to secure with the ``security.secure_service`` tag diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index e27f922a700..6d39cee8ec3 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -4,10 +4,10 @@ How to Implement your own Voter to Blacklist IP Addresses ========================================================= -The Symfony2 Security component provides several layers to authorize users. +The Symfony Security component provides several layers to authorize users. One of the layers is called a "voter". A voter is a dedicated class that checks if the user has the rights to connect to the application or access a specific -resource/URL. For instance, Symfony2 provides a layer that checks if the user +resource/URL. For instance, Symfony provides a layer that checks if the user is fully authorized or if it has some expected roles. It is sometimes useful to create a custom voter to handle a specific case not diff --git a/cookbook/security/voters_data_permission.rst b/cookbook/security/voters_data_permission.rst index 0c5b134937c..35442dd5afb 100644 --- a/cookbook/security/voters_data_permission.rst +++ b/cookbook/security/voters_data_permission.rst @@ -4,7 +4,7 @@ How to Use Voters to Check User Permissions =========================================== -In Symfony2 you can check the permission to access data by using the +In Symfony, you can check the permission to access data by using the :doc:`ACL module `, which is a bit overwhelming for many applications. A much easier solution is to work with custom voters, which are like simple conditional statements. @@ -137,7 +137,7 @@ edit a particular object. Here's an example implementation: } break; } - + return VoterInterface::ACCESS_DENIED; } } diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index b589ff15c5a..b3b142d1016 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -4,9 +4,9 @@ How to Use PHP instead of Twig for Templates ============================================ -Symfony2 defaults to Twig for its template engine, but you can still use +Symfony defaults to Twig for its template engine, but you can still use plain PHP code if you want. Both templating engines are supported equally in -Symfony2. Symfony2 adds some nice features on top of PHP to make writing +Symfony. Symfony adds some nice features on top of PHP to make writing templates with PHP more powerful. Rendering PHP Templates @@ -85,7 +85,7 @@ Decorating Templates -------------------- More often than not, templates in a project share common elements, like the -well-known header and footer. In Symfony2, this problem is thought about +well-known header and footer. In Symfony, this problem is thought about differently: a template can be decorated by another one. The ``index.html.php`` template is decorated by ``layout.html.php``, thanks to @@ -114,7 +114,7 @@ Now, have a look at the ``layout.html.php`` file: output('_content') ?> -The layout is itself decorated by another one (``::base.html.php``). Symfony2 +The layout is itself decorated by another one (``::base.html.php``). Symfony supports multiple decoration levels: a layout can itself be decorated by another one. When the bundle part of the template name is empty, views are looked for in the ``app/Resources/views/`` directory. This directory stores @@ -138,7 +138,7 @@ For both layouts, the ``$view['slots']->output('_content')`` expression is replaced by the content of the child template, ``index.html.php`` and ``layout.html.php`` respectively (more on slots in the next section). -As you can see, Symfony2 provides methods on a mysterious ``$view`` object. In +As you can see, Symfony provides methods on a mysterious ``$view`` object. In a template, the ``$view`` variable is always available and refers to a special object that provides a bunch of methods that makes the template engine tick. @@ -266,9 +266,9 @@ you more about those. Using Template Helpers ---------------------- -The Symfony2 templating system can be easily extended via helpers. Helpers are +The Symfony templating system can be easily extended via helpers. Helpers are PHP objects that provide features useful in a template context. ``actions`` and -``slots`` are two of the built-in Symfony2 helpers. +``slots`` are two of the built-in Symfony helpers. Creating Links between Pages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -300,7 +300,7 @@ Using Assets: Images, JavaScripts and Stylesheets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What would the Internet be without images, JavaScripts, and stylesheets? -Symfony2 provides the ``assets`` tag to deal with them easily: +Symfony provides the ``assets`` tag to deal with them easily: .. code-block:: html+php diff --git a/cookbook/templating/namespaced_paths.rst b/cookbook/templating/namespaced_paths.rst index d6fd3cfde39..52e21eb3c8e 100644 --- a/cookbook/templating/namespaced_paths.rst +++ b/cookbook/templating/namespaced_paths.rst @@ -24,7 +24,7 @@ With namespaced paths, the following works as well: {% extends "@AcmeDemo/layout.html.twig" %} {% include "@AcmeDemo/Foo/bar.html.twig" %} -Both paths are valid and functional by default in Symfony2. +Both paths are valid and functional by default in Symfony. .. tip:: diff --git a/cookbook/testing/profiling.rst b/cookbook/testing/profiling.rst index 3b6ece0d159..deb242498f2 100644 --- a/cookbook/testing/profiling.rst +++ b/cookbook/testing/profiling.rst @@ -9,7 +9,7 @@ you write functional tests that monitor your production servers, you might want to write tests on the profiling data as it gives you a great way to check various things and enforce some metrics. -The Symfony2 :ref:`Profiler ` gathers a lot of data for +The Symfony :ref:`Profiler ` gathers a lot of data for each request. Use this data to check the number of database calls, the time spent in the framework, etc. But before writing assertions, enable the profiler and check that the profiler is indeed available (it is enabled by default in diff --git a/cookbook/validation/custom_constraint.rst b/cookbook/validation/custom_constraint.rst index 1aa828b76a0..5cfd2312759 100644 --- a/cookbook/validation/custom_constraint.rst +++ b/cookbook/validation/custom_constraint.rst @@ -49,7 +49,7 @@ includes some simple default logic:: } In other words, if you create a custom ``Constraint`` (e.g. ``MyConstraint``), -Symfony2 will automatically look for another class, ``MyConstraintValidator`` +Symfony will automatically look for another class, ``MyConstraintValidator`` when actually performing the validation. The validator class is also simple, and only has one required method ``validate()``:: @@ -85,7 +85,7 @@ The validator class is also simple, and only has one required method ``validate( Using the new Validator ----------------------- -Using custom validators is very easy, just as the ones provided by Symfony2 itself: +Using custom validators is very easy, just as the ones provided by Symfony itself: .. configuration-block:: @@ -194,11 +194,11 @@ validator:: return 'alias_name'; } -As mentioned above, Symfony2 will automatically look for a class named after +As mentioned above, Symfony will automatically look for a class named after the constraint, with ``Validator`` appended. If your constraint validator is defined as a service, it's important that you override the ``validatedBy()`` method to return the alias used when defining your service, -otherwise Symfony2 won't use the constraint validator service, and will +otherwise Symfony won't use the constraint validator service, and will instantiate the class instead, without any dependencies injected. Class Constraint Validator diff --git a/cookbook/web_services/php_soap_extension.rst b/cookbook/web_services/php_soap_extension.rst index 507906303d9..f01516f61c2 100644 --- a/cookbook/web_services/php_soap_extension.rst +++ b/cookbook/web_services/php_soap_extension.rst @@ -1,8 +1,10 @@ .. index:: single: Web Services; SOAP -How to Create a SOAP Web Service in a Symfony2 Controller -========================================================= +.. _how-to-create-a-soap-web-service-in-a-symfony2-controller: + +How to Create a SOAP Web Service in a Symfony Controller +======================================================== Setting up a controller to act as a SOAP server is simple with a couple tools. You must, of course, have the `PHP SOAP`_ extension installed. diff --git a/cookbook/workflow/new_project_git.rst b/cookbook/workflow/new_project_git.rst index 580b3807cc7..c40cba6d53f 100644 --- a/cookbook/workflow/new_project_git.rst +++ b/cookbook/workflow/new_project_git.rst @@ -1,8 +1,10 @@ .. index:: single: Workflow; Git -How to Create and Store a Symfony2 Project in Git -================================================= +.. _how-to-create-and-store-a-symfony2-project-in-git: + +How to Create and Store a Symfony Project in Git +================================================ .. tip:: @@ -11,7 +13,7 @@ How to Create and Store a Symfony2 Project in Git Once you've read through :doc:`/book/page_creation` and become familiar with using Symfony, you'll no-doubt be ready to start your own project. In this -cookbook article, you'll learn the best way to start a new Symfony2 project +cookbook article, you'll learn the best way to start a new Symfony project that's stored using the `Git`_ source control management system. Initial Project Setup @@ -20,7 +22,7 @@ Initial Project Setup To get started, you'll need to download Symfony and initialize your local git repository: -#. Download the `Symfony2 Standard Edition`_ using Composer: +#. Download the `Symfony Standard Edition`_ using Composer: .. code-block:: bash @@ -65,7 +67,7 @@ git repository: $ git commit -m "Initial commit" -At this point, you have a fully-functional Symfony2 project that's correctly +At this point, you have a fully-functional Symfony project that's correctly committed to Git. You can immediately begin development, committing the new changes to your Git repository. @@ -74,7 +76,7 @@ to learn more about how to configure and develop inside your application. .. tip:: - The Symfony2 Standard Edition comes with some example functionality. To + The Symfony Standard Edition comes with some example functionality. To remove the sample code, follow the instructions in the ":doc:`/cookbook/bundles/remove`" article. @@ -95,7 +97,7 @@ which libraries depend on which other libraries. Storing your Project on a remote Server --------------------------------------- -You now have a fully-functional Symfony2 project stored in Git. However, +You now have a fully-functional Symfony project stored in Git. However, in most cases, you'll also want to store your project on a remote server both for backup purposes, and so that other developers can collaborate on the project. @@ -110,7 +112,7 @@ a `barebones repository`_ and then pushing to it. One library that helps manage this is `Gitolite`_. .. _`Git`: http://git-scm.com/ -.. _`Symfony2 Standard Edition`: http://symfony.com/download +.. _`Symfony Standard Edition`: http://symfony.com/download .. _`Installing Symfony using Composer`: http://symfony.com/doc/current/book/installation.html#option-1-composer .. _`git submodules`: http://git-scm.com/book/en/Git-Tools-Submodules .. _`GitHub`: https://github.com/ diff --git a/cookbook/workflow/new_project_svn.rst b/cookbook/workflow/new_project_svn.rst index 2e08d4e7cfa..c8140d1f09a 100644 --- a/cookbook/workflow/new_project_svn.rst +++ b/cookbook/workflow/new_project_svn.rst @@ -1,8 +1,10 @@ .. index:: single: Workflow; Subversion -How to Create and Store a Symfony2 Project in Subversion -======================================================== +.. _how-to-create-and-store-a-symfony2-project-in-subversion: + +How to Create and Store a Symfony Project in Subversion +======================================================= .. tip:: @@ -11,14 +13,14 @@ How to Create and Store a Symfony2 Project in Subversion Once you've read through :doc:`/book/page_creation` and become familiar with using Symfony, you'll no-doubt be ready to start your own project. The -preferred method to manage Symfony2 projects is using `Git`_ but some prefer +preferred method to manage Symfony projects is using `Git`_ but some prefer to use `Subversion`_ which is totally fine!. In this cookbook article, you'll learn how to manage your project using `SVN`_ in a similar manner you would do with `Git`_. .. tip:: - This is **a** method to tracking your Symfony2 project in a Subversion + This is **a** method to tracking your Symfony project in a Subversion repository. There are several ways to do and this one is simply one that works. @@ -44,9 +46,9 @@ widespread standard structure: Initial Project Setup --------------------- -To get started, you'll need to download Symfony2 and get the basic Subversion setup: +To get started, you'll need to download Symfony and get the basic Subversion setup: -1. Download the `Symfony2 Standard Edition`_ with or without vendors. +1. Download the `Symfony Standard Edition`_ with or without vendors. 2. Unzip/untar the distribution. It will create a folder called Symfony with your new project structure, config files, etc. Rename it to whatever you @@ -59,7 +61,7 @@ To get started, you'll need to download Symfony2 and get the basic Subversion se $ svn checkout http://myproject.googlecode.com/svn/trunk myproject -4. Copy the Symfony2 project files in the Subversion folder: +4. Copy the Symfony project files in the Subversion folder: .. code-block:: bash @@ -108,7 +110,7 @@ To get started, you'll need to download Symfony2 and get the basic Subversion se If you rely on any "dev" versions, then Git may be used to install those libraries, since there is no archive available for download. -At this point, you have a fully-functional Symfony2 project stored in your +At this point, you have a fully-functional Symfony project stored in your Subversion repository. The development can start with commits in the Subversion repository. @@ -117,7 +119,7 @@ to learn more about how to configure and develop inside your application. .. tip:: - The Symfony2 Standard Edition comes with some example functionality. To + The Symfony Standard Edition comes with some example functionality. To remove the sample code, follow the instructions in the ":doc:`/cookbook/bundles/remove`" article. @@ -142,7 +144,7 @@ central repository to work. You then have several solutions: .. _`Git`: http://git-scm.com/ .. _`SVN`: http://subversion.apache.org/ .. _`Subversion`: http://subversion.apache.org/ -.. _`Symfony2 Standard Edition`: http://symfony.com/download +.. _`Symfony Standard Edition`: http://symfony.com/download .. _`Version Control with Subversion`: http://svnbook.red-bean.com/ .. _`GitHub`: https://github.com/ .. _`Google code`: http://code.google.com/hosting/ diff --git a/glossary.rst b/glossary.rst index 21755d21e91..07f3eeb44a4 100644 --- a/glossary.rst +++ b/glossary.rst @@ -7,12 +7,12 @@ Glossary :sorted: Distribution - A *Distribution* is a package made of the Symfony2 Components, a + A *Distribution* is a package made of the Symfony Components, a selection of bundles, a sensible directory structure, a default configuration, and an optional configuration system. Dependency Injection - The Dependency Injection is a design pattern highly used in the Symfony2 Framework. + The Dependency Injection is a design pattern highly used in the Symfony Framework. It encourages loosely coupled and more maintainable architecture of an application. The main principle of this pattern is that it allows developers to *inject* objects (also known as services) in other objects, generally passing them as parameters. @@ -33,7 +33,7 @@ Glossary Bundle A *Bundle* is a directory containing a set of files (PHP files, stylesheets, JavaScripts, images, ...) that *implement* a single - feature (a blog, a forum, etc). In Symfony2, (*almost*) everything + feature (a blog, a forum, etc). In Symfony, (*almost*) everything lives inside a bundle. (see :ref:`page-creation-bundles`) Front Controller @@ -52,7 +52,7 @@ Glossary Service A *Service* is a generic term for any PHP object that performs a specific task. A service is usually used "globally", such as a database - connection object or an object that delivers email messages. In Symfony2, + connection object or an object that delivers email messages. In Symfony, services are often configured and retrieved from the service container. An application that has many decoupled services is said to follow a `service-oriented architecture`_. @@ -83,10 +83,10 @@ Glossary that's optimized for speed. Vendor - A *vendor* is a supplier of PHP libraries and bundles including Symfony2 + A *vendor* is a supplier of PHP libraries and bundles including Symfony itself. Despite the usual commercial connotations of the word, vendors in Symfony often (even usually) include free software. Any library you - add to your Symfony2 project should go in the ``vendor`` directory. See + add to your Symfony project should go in the ``vendor`` directory. See :ref:`The Architecture: Using Vendors `. Acme @@ -107,13 +107,13 @@ Glossary to the web directory using the ``assets:install`` console task. Kernel - The *Kernel* is the core of Symfony2. The Kernel object handles HTTP + The *Kernel* is the core of Symfony. The Kernel object handles HTTP requests using all the bundles and libraries registered to it. See :ref:`The Architecture: The Application Directory ` and the :doc:`/book/internals` chapter. Firewall - In Symfony2, a *Firewall* doesn't have to do with networking. Instead, + In Symfony, a *Firewall* doesn't have to do with networking. Instead, it defines the authentication mechanisms (i.e. it handles the process of determining the identity of your users), either for the whole application or for just a part of it. See the @@ -122,7 +122,7 @@ Glossary YAML *YAML* is a recursive acronym for "YAML Ain't a Markup Language". It's a lightweight, humane data serialization language used extensively in - Symfony2's configuration files. See the :doc:`/components/yaml/introduction` + Symfony's configuration files. See the :doc:`/components/yaml/introduction` chapter. diff --git a/index.rst b/index.rst index ed63453278f..23959281381 100644 --- a/index.rst +++ b/index.rst @@ -1,5 +1,7 @@ -Symfony2 Documentation -====================== +.. _symfony2-documentation: + +Symfony Documentation +===================== .. toctree:: :hidden: @@ -9,7 +11,7 @@ Symfony2 Documentation Quick Tour ---------- -Get started fast with the Symfony2 :doc:`Quick Tour `: +Get started fast with the Symfony :doc:`Quick Tour `: .. toctree:: :hidden: @@ -24,7 +26,7 @@ Get started fast with the Symfony2 :doc:`Quick Tour `: Book ---- -Dive into Symfony2 with the topical guides: +Dive into Symfony with the topical guides: .. toctree:: :hidden: @@ -81,7 +83,7 @@ CMF --- The Symfony CMF project makes it easier for developers to add CMS functionality -to applications built with the Symfony2 PHP framework. +to applications built with the Symfony PHP framework. .. toctree:: :hidden: @@ -91,7 +93,7 @@ to applications built with the Symfony2 PHP framework. Contributing ------------ -Contribute to Symfony2: +Contribute to Symfony: .. toctree:: :hidden: diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index eca018061b5..927f4512e60 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -4,13 +4,13 @@ The Architecture You are my hero! Who would have thought that you would still be here after the first three parts? Your efforts will be well rewarded soon. The first three parts didn't look too deeply at the architecture of the framework. Because it -makes Symfony2 stand apart from the framework crowd, let's dive into the +makes Symfony stand apart from the framework crowd, let's dive into the architecture now. Understanding the Directory Structure ------------------------------------- -The directory structure of a Symfony2 :term:`application` is rather flexible, +The directory structure of a Symfony :term:`application` is rather flexible, but the recommended structure is as follows: * ``app/``: the application configuration; @@ -66,14 +66,14 @@ Understanding the Bundle System ------------------------------- This section introduces one of the greatest and most powerful features of -Symfony2, the :term:`bundle` system. +Symfony, the :term:`bundle` system. A bundle is kind of like a plugin in other software. So why is it called a *bundle* and not a *plugin*? This is because *everything* is a bundle in -Symfony2, from the core framework features to the code you write for your +Symfony, from the core framework features to the code you write for your application. -Bundles are first-class citizens in Symfony2. This gives you the flexibility +Bundles are first-class citizens in Symfony. This gives you the flexibility to use pre-built features packaged in third-party bundles or to distribute your own bundles. It makes it easy to pick and choose which features to enable in your application and optimize them the way you want. And at the end of the day, @@ -233,7 +233,7 @@ Logical File Names .................. When you want to reference a file from a bundle, use this notation: -``@BUNDLE_NAME/path/to/file``; Symfony2 will resolve ``@BUNDLE_NAME`` +``@BUNDLE_NAME/path/to/file``; Symfony will resolve ``@BUNDLE_NAME`` to the real path to the bundle. For instance, the logical path ``@AcmeDemoBundle/Controller/DemoController.php`` would be converted to ``src/Acme/DemoBundle/Controller/DemoController.php``, because Symfony knows @@ -267,7 +267,7 @@ first look for the ``WelcomeController`` class in AcmeNewBundle and, if it doesn't exist, then look inside AcmeDemoBundle. This means that one bundle can override almost any part of another bundle! -Do you understand now why Symfony2 is so flexible? Share your bundles between +Do you understand now why Symfony is so flexible? Share your bundles between applications, store them locally or globally, your choice. .. _using-vendors: @@ -277,18 +277,18 @@ Using Vendors Odds are that your application will depend on third-party libraries. Those should be stored in the ``vendor/`` directory. This directory already contains -the Symfony2 libraries, the SwiftMailer library, the Doctrine ORM, the Twig +the Symfony libraries, the SwiftMailer library, the Doctrine ORM, the Twig templating system, and some other third party libraries and bundles. Understanding the Cache and Logs -------------------------------- -Symfony2 is probably one of the fastest full-stack frameworks around. But how +Symfony is probably one of the fastest full-stack frameworks around. But how can it be so fast if it parses and interprets tens of YAML and XML files for each request? The speed is partly due to its cache system. The application configuration is only parsed for the very first request and then compiled down to plain PHP code stored in the ``app/cache/`` directory. In the development -environment, Symfony2 is smart enough to flush the cache when you change a +environment, Symfony is smart enough to flush the cache when you change a file. But in the production environment, to speed things up, it is your responsibility to clear the cache when you update your code or change its configuration. @@ -320,12 +320,12 @@ Final Thoughts -------------- Call me crazy, but after reading this part, you should be comfortable with -moving things around and making Symfony2 work for you. Everything in Symfony2 +moving things around and making Symfony work for you. Everything in Symfony is designed to get out of your way. So, feel free to rename and move directories around as you see fit. And that's all for the quick tour. From testing to sending emails, you still -need to learn a lot to become a Symfony2 master. Ready to dig into these +need to learn a lot to become a Symfony master. Ready to dig into these topics now? Look no further - go to the official :doc:`/book/index` and pick any topic you want. diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 9ea176cdbd7..e150dcacb28 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -1,19 +1,21 @@ The Big Picture =============== -Start using Symfony2 in 10 minutes! This chapter will walk you through some of -the most important concepts behind Symfony2 and explain how you can get started +Start using Symfony in 10 minutes! This chapter will walk you through some of +the most important concepts behind Symfony and explain how you can get started quickly by showing you a simple project in action. If you've used a web framework before, you should feel right at home with -Symfony2. If not, welcome to a whole new way of developing web applications. +Symfony. If not, welcome to a whole new way of developing web applications. -Installing Symfony2 -------------------- +.. _installing-symfony2: -First, check that the PHP version installed on your computer meets the Symfony2 +Installing Symfony +------------------ + +First, check that the PHP version installed on your computer meets the Symfony requirements: 5.3.3 or higher. Then, open a console and execute the following -command to install the latest version of Symfony2 in the ``myproject/`` +command to install the latest version of Symfony in the ``myproject/`` directory: .. code-block:: bash @@ -27,7 +29,7 @@ directory: .. note:: `Composer`_ is the package manager used by modern PHP applications and the - only recommended way to install Symfony2. To install Composer on your + only recommended way to install Symfony. To install Composer on your Linux or Mac system, execute the following commands: .. code-block:: bash @@ -37,8 +39,9 @@ directory: To install Composer on a Windows system, download the `executable installer`_. -Beware that the first time you install Symfony2, it may take a few minutes to +Beware that the first time you install Symfony, it may take a few minutes to download all its components. At the end of the installation process, the +<<<<<<< HEAD installer will ask you four questions: 1. **Would you like to use Symfony 3 directory structure? [y/N]** The upcoming @@ -58,11 +61,18 @@ installer will ask you four questions: 4. **Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?** The development history of large projects such as Symfony can take a lot of disk space. Press the ```` key to safely remove all this history data. +======= +installer will ask you to provide some configuration options for the Symfony +project. For this first project you can safely ignore this configuration by +pressing the ```` key repeatedly. +>>>>>>> replace "Symfony2" with "Symfony" + +.. _running-symfony2: -Running Symfony2 ----------------- +Running Symfony +--------------- -Before running Symfony2 for the first time, execute the following command to +Before running Symfony for the first time, execute the following command to make sure that your system meets all the technical requirements: .. code-block:: bash @@ -88,11 +98,11 @@ if you prefer a traditional web server such as Apache or Nginx, read the :doc:`/cookbook/configuration/web_server_configuration` article. Open your browser and access the ``http://localhost:8000`` URL to see the -Welcome page of Symfony2: +Welcome page of Symfony: .. image:: /images/quick_tour/welcome.png :align: center - :alt: Symfony2 Welcome Page + :alt: Symfony Welcome Page Understanding the Fundamentals ------------------------------ @@ -103,7 +113,7 @@ calls, HTML tags and business logic in the same script. To achieve this goal with Symfony, you'll first need to learn a few fundamental concepts and terms. Symfony comes with some sample code that you can use to learn more about its -main concepts. Go to the following URL to be greeted by Symfony2 (replace +main concepts. Go to the following URL to be greeted by Symfony (replace *Fabien* with your first name): .. code-block:: text @@ -136,7 +146,7 @@ Your responsibility as a developer is to write the code that maps the user's Routing ~~~~~~~ -Symfony2 routes the request to the code that handles it by matching the +Symfony routes the request to the code that handles it by matching the requested URL (i.e. the virtual path) against some configured paths. The demo paths are defined in the ``app/config/routing_dev.yml`` configuration file: @@ -174,7 +184,7 @@ will be executed. In the next section, you'll learn exactly what that means. In addition to YAML files, routes can be configured in XML or PHP files and can even be embedded in PHP annotations. This flexibility is one of the - main features of Symfony2, a framework that never imposes a particular + main features of Symfony, a framework that never imposes a particular configuration format on you. Controllers @@ -193,7 +203,7 @@ controller might create the response by hand, based on the request:: return new Response('Hello '.$name); -Symfony2 chooses the controller based on the ``_controller`` value from the +Symfony chooses the controller based on the ``_controller`` value from the routing configuration: ``AcmeDemoBundle:Welcome:index``. This string is the controller *logical name*, and it references the ``indexAction`` method from the ``Acme\DemoBundle\Controller\WelcomeController`` class:: @@ -308,17 +318,17 @@ template (or ``AcmeDemoBundle:Demo:hello.html.twig`` if you use the logical name

Hello {{ name }}!

{% endblock %} -By default, Symfony2 uses `Twig`_ as its template engine but you can also use +By default, Symfony uses `Twig`_ as its template engine but you can also use traditional PHP templates if you choose. The :doc:`second part of this tutorial
` will introduce how -templates work in Symfony2. +templates work in Symfony. Bundles ~~~~~~~ You might have wondered why the :term:`Bundle` word is used in many names you have seen so far. All the code you write for your application is organized in -bundles. In Symfony2 speak, a bundle is a structured set of files (PHP files, +bundles. In Symfony speak, a bundle is a structured set of files (PHP files, stylesheets, JavaScripts, images, ...) that implements a single feature (a blog, a forum, ...) and which can be easily shared with other developers. As of now, you have manipulated one bundle, AcmeDemoBundle. You will learn @@ -329,10 +339,10 @@ more about bundles in the :doc:`last part of this tutorial
`". .. _Composer: https://getcomposer.org/ diff --git a/quick_tour/the_controller.rst b/quick_tour/the_controller.rst index 9b1947d29db..decb50b98a7 100644 --- a/quick_tour/the_controller.rst +++ b/quick_tour/the_controller.rst @@ -1,7 +1,7 @@ The Controller ============== -Still here after the first two parts? You are already becoming a Symfony2 +Still here after the first two parts? You are already becoming a Symfony addict! Without further ado, discover what controllers can do for you. Using Formats @@ -10,7 +10,7 @@ Using Formats Nowadays, a web application should be able to deliver more than just HTML pages. From XML for RSS feeds or Web Services, to JSON for Ajax requests, there are plenty of different formats to choose from. Supporting those formats -in Symfony2 is straightforward. Tweak the route by adding a default value of +in Symfony is straightforward. Tweak the route by adding a default value of ``xml`` for the ``_format`` variable:: // src/Acme/DemoBundle/Controller/DemoController.php @@ -29,7 +29,7 @@ in Symfony2 is straightforward. Tweak the route by adding a default value of } By using the request format (as defined by the special ``_format`` variable), -Symfony2 automatically selects the right template, here ``hello.xml.twig``: +Symfony automatically selects the right template, here ``hello.xml.twig``: .. code-block:: xml+php @@ -38,7 +38,7 @@ Symfony2 automatically selects the right template, here ``hello.xml.twig``: {{ name }} -That's all there is to it. For standard formats, Symfony2 will also +That's all there is to it. For standard formats, Symfony will also automatically choose the best ``Content-Type`` header for the response. If you want to support different formats for a single action, use the ``{_format}`` placeholder in the route path instead:: @@ -136,9 +136,9 @@ In a template, you can also access the ``Request`` object via the Persisting Data in the Session ------------------------------ -Even if the HTTP protocol is stateless, Symfony2 provides a nice session object +Even if the HTTP protocol is stateless, Symfony provides a nice session object that represents the client (be it a real person using a browser, a bot, or a -web service). Between two requests, Symfony2 stores the attributes in a cookie +web service). Between two requests, Symfony stores the attributes in a cookie by using native PHP sessions. Storing and retrieving information from the session can be easily achieved @@ -176,7 +176,7 @@ Caching Resources ----------------- As soon as your website starts to generate more traffic, you will want to -avoid generating the same resource again and again. Symfony2 uses HTTP cache +avoid generating the same resource again and again. Symfony uses HTTP cache headers to manage resources cache. For simple caching strategies, use the convenient ``@Cache()`` annotation:: @@ -195,7 +195,7 @@ convenient ``@Cache()`` annotation:: } In this example, the resource will be cached for a day (``86400`` seconds). -Resource caching is managed by Symfony2 itself. But because caching is managed +Resource caching is managed by Symfony itself. But because caching is managed using standard HTTP cache headers, you can use Varnish or Squid without having to modify a single line of code in your application. @@ -205,5 +205,5 @@ Final Thoughts That's all there is to it, and I'm not even sure you'll have spent the full 10 minutes. You were briefly introduced to bundles in the first part, and all the features you've learned about so far are part of the core framework bundle. -But thanks to bundles, everything in Symfony2 can be extended or replaced. +But thanks to bundles, everything in Symfony can be extended or replaced. That's the topic of the :doc:`next part of this tutorial`. diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index 1dc675538ec..c641eb6db10 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -1,7 +1,7 @@ The View ======== -After reading the first part of this tutorial, you have decided that Symfony2 +After reading the first part of this tutorial, you have decided that Symfony was worth another 10 minutes. In this second part, you will learn more about `Twig`_, the fast, flexible, and secure template engine for PHP. Twig makes your templates more readable and concise; it also makes them more friendly for web @@ -248,7 +248,7 @@ Including Assets: Images, JavaScripts and Stylesheets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What would the Internet be without images, JavaScripts, and stylesheets? -Symfony2 provides the ``asset`` function to deal with them easily: +Symfony provides the ``asset`` function to deal with them easily: .. code-block:: jinja @@ -269,14 +269,14 @@ inclusions, it is very easy to organize your templates in a logical and extensible way. However, if you're not comfortable with Twig, you can always use PHP templates inside Symfony without any issues. -You have only been working with Symfony2 for about 20 minutes, but you can -already do pretty amazing stuff with it. That's the power of Symfony2. Learning +You have only been working with Symfony for about 20 minutes, but you can +already do pretty amazing stuff with it. That's the power of Symfony. Learning the basics is easy, and you will soon learn that this simplicity is hidden under a very flexible architecture. But I'm getting ahead of myself. First, you need to learn more about the controller and that's exactly the topic of the :doc:`next part of this tutorial `. -Ready for another 10 minutes with Symfony2? +Ready for another 10 minutes with Symfony? .. _Twig: http://twig.sensiolabs.org/ .. _Twig documentation: http://twig.sensiolabs.org/documentation diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 0c34d6cd7ab..6f8fbf73562 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -23,7 +23,7 @@ Full default configuration commented: true # If enabled all tables not prefixed with sf2_ will be ignored by the schema # tool. This is for custom tables which should not be altered automatically. - #schema_filter: ^sf2_ + #schema_filter: ^sf2_ connections: default: @@ -401,7 +401,7 @@ If you want to configure multiple connections in YAML, put them under the default_connection: default connections: default: - dbname: Symfony2 + dbname: Symfony user: root password: null host: localhost diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 204c91aecc2..9cfb5b6947b 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -346,7 +346,7 @@ assets_base_urls This option allows you to define base URLs to be used for assets referenced from ``http`` and ``ssl`` (``https``) pages. A string value may be provided in -lieu of a single-element array. If multiple base URLs are provided, Symfony2 +lieu of a single-element array. If multiple base URLs are provided, Symfony will select one from the collection each time it generates an asset's path. For your convenience, ``assets_base_urls`` can be set directly with a string or diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 2eda8410c86..0ee73aabd90 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -4,7 +4,7 @@ SecurityBundle Configuration ("security") ========================================= -The security system is one of the most powerful parts of Symfony2, and can +The security system is one of the most powerful parts of Symfony, and can largely be controlled via its configuration. Full default Configuration diff --git a/reference/constraints.rst b/reference/constraints.rst index ac8ef5ae33c..94077dd3052 100644 --- a/reference/constraints.rst +++ b/reference/constraints.rst @@ -61,12 +61,12 @@ Validation Constraints Reference The Validator is designed to validate objects against *constraints*. In real life, a constraint could be: "The cake must not be burned". In -Symfony2, constraints are similar: They are assertions that a condition is +Symfony, constraints are similar: They are assertions that a condition is true. Supported Constraints --------------------- -The following constraints are natively available in Symfony2: +The following constraints are natively available in Symfony: .. include:: /reference/constraints/map.rst.inc diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 0e4de98e90c..a3788e8d94a 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -9,7 +9,7 @@ you can flag it with the ``kernel.event_listener`` tag. You can learn a little bit more about "tags" by reading the ":ref:`book-service-container-tags`" section of the Service Container chapter. -Below is information about all of the tags available inside Symfony2. There +Below is information about all of the tags available inside Symfony. There may also be tags in other bundles you use that aren't listed here. +-----------------------------------+---------------------------------------------------------------------------+ @@ -1124,7 +1124,7 @@ translation.extractor **Purpose**: To register a custom service that extracts messages from a file When executing the ``translation:update`` command, it uses extractors to -extract translation messages from a file. By default, the Symfony2 framework +extract translation messages from a file. By default, the Symfony framework has a :class:`Symfony\\Bridge\\Twig\\Translation\\TwigExtractor` and a :class:`Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor`, which help to find and extract translation keys from Twig templates and PHP files. @@ -1205,7 +1205,7 @@ After an `Extractor `_ has extracted all messages from the templates, the dumpers are executed to dump the messages to a translation file in a specific format. -Symfony2 already comes with many dumpers: +Symfony already comes with many dumpers: * :class:`Symfony\\Component\\Translation\\Dumper\\CsvFileDumper` * :class:`Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper` diff --git a/reference/forms/types.rst b/reference/forms/types.rst index 82b22bde79c..413c5bc2bc4 100644 --- a/reference/forms/types.rst +++ b/reference/forms/types.rst @@ -48,12 +48,12 @@ Form Types Reference types/form A form is composed of *fields*, each of which are built with the help of -a field *type* (e.g. a ``text`` type, ``choice`` type, etc). Symfony2 comes +a field *type* (e.g. a ``text`` type, ``choice`` type, etc). Symfony comes standard with a large list of field types that can be used in your application. Supported Field Types --------------------- -The following field types are natively available in Symfony2: +The following field types are natively available in Symfony: .. include:: /reference/forms/types/map.rst.inc diff --git a/reference/map.rst.inc b/reference/map.rst.inc index 2fdd8210ced..1b3ed361694 100644 --- a/reference/map.rst.inc +++ b/reference/map.rst.inc @@ -3,7 +3,7 @@ Ever wondered what configuration options you have available to you in files such as ``app/config/config.yml``? In this section, all the available configuration is broken down by the key (e.g. ``framework``) that defines each possible - section of your Symfony2 configuration. + section of your Symfony configuration. * :doc:`framework ` * :doc:`doctrine ` diff --git a/reference/requirements.rst b/reference/requirements.rst index 712a00e8f63..5edc791f788 100644 --- a/reference/requirements.rst +++ b/reference/requirements.rst @@ -1,10 +1,12 @@ .. index:: single: Requirements -Requirements for Running Symfony2 -================================= +.. _requirements-for-running-symfony2: -To run Symfony2, your system needs to adhere to a list of requirements. You can +Requirements for Running Symfony +================================ + +To run Symfony, your system needs to adhere to a list of requirements. You can easily see if your system passes all requirements by running the ``web/config.php`` in your Symfony distribution. Since the CLI often uses a different ``php.ini`` configuration file, it's also a good idea to check your requirements from @@ -26,7 +28,7 @@ Required .. caution:: - Be aware that Symfony2 has some known limitations when using a PHP version + Be aware that Symfony has some known limitations when using a PHP version less than 5.3.8 or equal to 5.3.16. For more information see the `Requirements section of the README`_. diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 4447ab3efef..6cc04119379 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -1,16 +1,18 @@ .. index:: - single: Symfony2 Twig extensions + single: Symfony Twig extensions -Symfony2 Twig Extensions -======================== +.. _symfony2-twig-extensions: -Twig is the default template engine for Symfony2. By itself, it already contains +Symfony Twig Extensions +======================= + +Twig is the default template engine for Symfony. By itself, it already contains a lot of built-in functions, filters, tags and tests (`http://twig.sensiolabs.org/documentation`_ then scroll to the bottom). -Symfony2 adds more custom extension on top of Twig to integrate some components +Symfony adds more custom extension on top of Twig to integrate some components into the Twig templates. Below is information about all the custom functions, -filters, tags and tests that are added when using the Symfony2 Core Framework. +filters, tags and tests that are added when using the Symfony Core Framework. There may also be tags in bundles you use that aren't listed here. @@ -182,7 +184,7 @@ Global Variables Symfony Standard Edition Extensions ----------------------------------- -The Symfony Standard Edition adds some bundles to the Symfony2 Core Framework. +The Symfony Standard Edition adds some bundles to the Symfony Core Framework. Those bundles can have other Twig extensions: * **Twig Extensions** includes some interesting extensions that do not belong to the From 3ee518737bee11ac6bd5d0d2e7e8957386cab3a3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 6 Sep 2014 12:56:46 +0200 Subject: [PATCH 043/106] Added a note about the lacking features of Yaml Component --- components/yaml/introduction.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/components/yaml/introduction.rst b/components/yaml/introduction.rst index 1650afc82c5..c0c94762857 100644 --- a/components/yaml/introduction.rst +++ b/components/yaml/introduction.rst @@ -5,16 +5,24 @@ The Yaml Component ================== +<<<<<<< HEAD The Yaml component loads and dumps YAML files. +======= + The Yaml Component loads and dumps YAML files. +>>>>>>> Added a note about the lacking features of Yaml Component What is It? ----------- +<<<<<<< HEAD <<<<<<< HEAD The Symfony2 Yaml component parses YAML strings to convert them to PHP arrays. ======= The Symfony YAML Component parses YAML strings to convert them to PHP arrays. >>>>>>> replace "Symfony2" with "Symfony" +======= +The Symfony2 Yaml Component parses YAML strings to convert them to PHP arrays. +>>>>>>> Added a note about the lacking features of Yaml Component It is also able to convert PHP arrays to YAML strings. `YAML`_, *YAML Ain't Markup Language*, is a human friendly data serialization @@ -22,12 +30,17 @@ standard for all programming languages. YAML is a great format for your configuration files. YAML files are as expressive as XML files and as readable as INI files. +<<<<<<< HEAD <<<<<<< HEAD The Symfony2 Yaml component implements the YAML 1.2 version of the ======= The Symfony YAML Component implements the YAML 1.2 version of the >>>>>>> replace "Symfony2" with "Symfony" specification. +======= +The Symfony2 Yaml Component implements a selected subset of features defined in +the `YAML 1.2 version specification`_. +>>>>>>> Added a note about the lacking features of Yaml Component .. tip:: @@ -48,9 +61,16 @@ Why? Fast ~~~~ +<<<<<<< HEAD One of the goals of the Symfony Yaml component is to find the right balance between speed and features. It supports just the needed features to handle configuration files. +======= +One of the goals of Symfony Yaml is to find the right balance between speed and +features. It supports just the needed features to handle configuration files. +Notable lacking features are: document directives, multi-line quoted messages, +compact block collections and multi-document files. +>>>>>>> Added a note about the lacking features of Yaml Component Real Parser ~~~~~~~~~~~ @@ -88,6 +108,7 @@ yourself by referencing common configuration bits. Using the Symfony2 Yaml Component --------------------------------- +<<<<<<< HEAD The Symfony2 Yaml component is very simple and consists of two main classes: ======= .. _using-the-symfony2-yaml-component: @@ -97,6 +118,9 @@ Using the Symfony YAML Component The Symfony YAML Component is very simple and consists of two main classes: >>>>>>> replace "Symfony2" with "Symfony" +======= +The Symfony2 Yaml Component is very simple and consists of two main classes: +>>>>>>> Added a note about the lacking features of Yaml Component one parses YAML strings (:class:`Symfony\\Component\\Yaml\\Parser`), and the other dumps a PHP array to a YAML string (:class:`Symfony\\Component\\Yaml\\Dumper`). @@ -181,7 +205,11 @@ array to its YAML representation: .. note:: +<<<<<<< HEAD Of course, the Symfony YAML dumper is not able to dump resources. Also, +======= + Of course, the Symfony2 Yaml dumper is not able to dump resources. Also, +>>>>>>> Added a note about the lacking features of Yaml Component even if the dumper is able to dump PHP objects, it is considered to be a not supported feature. @@ -231,3 +259,4 @@ representation to the inline one: .. _YAML: http://yaml.org/ .. _Packagist: https://packagist.org/packages/symfony/yaml +.. _`YAML 1.2 version specification`: http://yaml.org/spec/1.2/spec.html From 227d366fc4609906f3128e1c34385d5ad399c440 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sat, 6 Sep 2014 19:37:30 +0200 Subject: [PATCH 044/106] Fix method for adding placholders in progressBar The method is called setPlaceholderFormatterDefinition and not setPlaceholderFormatter --- components/console/helpers/progressbar.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/helpers/progressbar.rst b/components/console/helpers/progressbar.rst index 46e993c08c0..a242791eda3 100644 --- a/components/console/helpers/progressbar.rst +++ b/components/console/helpers/progressbar.rst @@ -289,7 +289,7 @@ display that are not available in the list of built-in placeholders, you can create your own. Let's see how you can create a ``remaining_steps`` placeholder that displays the number of remaining steps:: - ProgressBar::setPlaceholderFormatter( + ProgressBar::setPlaceholderFormatterDefinition( '%remaining_steps%', function (ProgressBar $bar, OutputInterface $output) { return $bar->getMaxSteps() - $bar->getStep(); From f6ff9850651c58019fe3440ebcd5ec981882e259 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sat, 6 Sep 2014 19:55:20 +0200 Subject: [PATCH 045/106] The name of the placeholder must not be encapsulated in % --- components/console/helpers/progressbar.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/helpers/progressbar.rst b/components/console/helpers/progressbar.rst index a242791eda3..fec1b8c127f 100644 --- a/components/console/helpers/progressbar.rst +++ b/components/console/helpers/progressbar.rst @@ -290,7 +290,7 @@ create your own. Let's see how you can create a ``remaining_steps`` placeholder that displays the number of remaining steps:: ProgressBar::setPlaceholderFormatterDefinition( - '%remaining_steps%', + 'remaining_steps', function (ProgressBar $bar, OutputInterface $output) { return $bar->getMaxSteps() - $bar->getStep(); } From f6a3c28e6189e28a440cae5985821b403b179b6c Mon Sep 17 00:00:00 2001 From: Wouter J Date: Mon, 8 Sep 2014 17:38:40 +0200 Subject: [PATCH 046/106] Missing backtick, thanks to @Baptouuuu --- components/dependency_injection/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index f3fde08777c..babd7cfd0fc 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -269,7 +269,7 @@ a reference of the old one as ``bar.inner``: ->setPublic(false) ->setDecoratedService('foo'); -Here is what's going on here: the ``setDecoratedService()` method tells +Here is what's going on here: the ``setDecoratedService()`` method tells the container that the ``bar`` service should replace the ``foo`` service, renaming ``foo`` to ``bar.inner``. By convention, the old ``foo`` service is going to be renamed ``bar.inner``, From 9372cde82ccee592e6e772f352d626810aa8178f Mon Sep 17 00:00:00 2001 From: Wouter J Date: Mon, 8 Sep 2014 17:40:11 +0200 Subject: [PATCH 047/106] Reverts c723d8dd546412b08ffaf3846b5574f4f4021418 --- components/dependency_injection/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index babd7cfd0fc..f3fde08777c 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -269,7 +269,7 @@ a reference of the old one as ``bar.inner``: ->setPublic(false) ->setDecoratedService('foo'); -Here is what's going on here: the ``setDecoratedService()`` method tells +Here is what's going on here: the ``setDecoratedService()` method tells the container that the ``bar`` service should replace the ``foo`` service, renaming ``foo`` to ``bar.inner``. By convention, the old ``foo`` service is going to be renamed ``bar.inner``, From 727744c656b0dc4e79efdb488324708d89cdee93 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Mon, 8 Sep 2014 17:41:33 +0200 Subject: [PATCH 048/106] Missing backtick, thanks to @Baptouuuu --- components/dependency_injection/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index f3fde08777c..babd7cfd0fc 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -269,7 +269,7 @@ a reference of the old one as ``bar.inner``: ->setPublic(false) ->setDecoratedService('foo'); -Here is what's going on here: the ``setDecoratedService()` method tells +Here is what's going on here: the ``setDecoratedService()`` method tells the container that the ``bar`` service should replace the ``foo`` service, renaming ``foo`` to ``bar.inner``. By convention, the old ``foo`` service is going to be renamed ``bar.inner``, From 5bae1e1eb8e322b898e625a6cbb12e81961e21a8 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Tue, 9 Sep 2014 19:51:54 +0200 Subject: [PATCH 049/106] Fixed code highlighting --- reference/constraints/Regex.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/constraints/Regex.rst b/reference/constraints/Regex.rst index 489f01675b9..fbd12230830 100644 --- a/reference/constraints/Regex.rst +++ b/reference/constraints/Regex.rst @@ -32,7 +32,7 @@ characters at the beginning of your string: Acme\BlogBundle\Entity\Author: properties: description: - - Regex: "/^\w+/" + - Regex: '/^\w+/' .. code-block:: php-annotations @@ -98,7 +98,7 @@ message: properties: firstName: - Regex: - pattern: "/\d/" + pattern: '/\d/' match: false message: Your name cannot contain a number From b9a7381b1d48fd3517efc63479a9dccfd8fd318f Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Thu, 11 Sep 2014 23:53:41 -0700 Subject: [PATCH 050/106] Caution that roles should start with ROLE_ In order to save someone else a few hours of frustration make it clear that the ROLE_ preface is not just for show. --- cookbook/security/entity_provider.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 5943ea396c5..7a63b2c5dfa 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -651,6 +651,11 @@ about in this section. If you fail to return any roles, it may appear as if your user isn't authenticated at all. +.. caution:: + + The default role voter requires that all of the roles returned should be prefaced by ROLE_. + Example ROLE_ADMIN, ROLE_USER; not just ADMIN or USER. + In this example, the ``AcmeUserBundle:User`` entity class defines a many-to-many relationship with a ``AcmeUserBundle:Role`` entity class. A user can be related to several roles and a role can be composed of From 3f0e5b660549a0ffcc379a90b7b11597e9400fe8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 12 Sep 2014 15:39:49 +0200 Subject: [PATCH 051/106] Added a note about the side effects of enabling both PHP and Twig --- cookbook/templating/PHP.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index b3b142d1016..ff6c56dd147 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -77,6 +77,24 @@ shortcut to render the default ``AcmeHelloBundle:Hello:index.html.php`` template return array('name' => $name); } +.. caution:: + + Enabling the ``php`` and ``twig`` template engines simultaneously is + allowed but it will produce an important side effect in your application: + template namespaces will no longer work:: + + public function indexAction() + { + // ... + + // namespaced templates will no longer work + $this->render('@Acme/Default/index.html.twig'); + + // traditional template notation will work + $this->render('AcmeBundle:Default:index.html.twig'); + } + + .. index:: single: Templating; Layout single: Layout From 3689506a19cdcc62119e08fcc507c62c0da8eede Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 12 Sep 2014 10:24:44 -0700 Subject: [PATCH 052/106] Add formatting, links, and clarity --- cookbook/security/entity_provider.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index 7a63b2c5dfa..ae32cc78a4c 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -653,8 +653,11 @@ about in this section. .. caution:: - The default role voter requires that all of the roles returned should be prefaced by ROLE_. - Example ROLE_ADMIN, ROLE_USER; not just ADMIN or USER. + In order to work with the security configuration examples on this page + all roles must be prefixed with ``ROLE_`` (see + the :ref:`section about roles ` in the book). For + example, your roles will be ``ROLE_ADMIN`` or ``ROLE_USER`` instead of + ``ADMIN`` or ``USER``. In this example, the ``AcmeUserBundle:User`` entity class defines a many-to-many relationship with a ``AcmeUserBundle:Role`` entity class. From 5aa2ea0efd0db2c88368804c36410bfcb14fe244 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 12 Sep 2014 13:52:22 -0700 Subject: [PATCH 053/106] Add label book-security-roles --- book/security.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/book/security.rst b/book/security.rst index 6875de64152..2e5ec7b741a 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1809,6 +1809,8 @@ the default for the firewall as a whole). For more information about user provider and firewall configuration, see the :doc:`/reference/configuration/security`. +.. _book-security-roles: + Roles ----- @@ -1885,6 +1887,11 @@ Access Control Now that you have a User and Roles, you can go further than URL-pattern based authorization. +<<<<<<< HEAD +======= +..book-security-securing-controller: + +>>>>>>> Add label book-security-roles Access Control in Controllers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From b78465b9a5a8334f2ccea902e167074f0d60ddbd Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 12 Sep 2014 14:18:39 -0700 Subject: [PATCH 054/106] Fix reference label --- book/security.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/book/security.rst b/book/security.rst index 2e5ec7b741a..c374ae12315 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1887,9 +1887,13 @@ Access Control Now that you have a User and Roles, you can go further than URL-pattern based authorization. +<<<<<<< HEAD <<<<<<< HEAD ======= ..book-security-securing-controller: +======= +.. _book-security-securing-controller: +>>>>>>> Fix reference label >>>>>>> Add label book-security-roles Access Control in Controllers From a0f318e92b845446cf4ca3a510626d161692678e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Sep 2014 10:00:11 +0200 Subject: [PATCH 055/106] do not reference services in parameters --- .../dependency_injection/parameters.rst | 73 ------------------- 1 file changed, 73 deletions(-) diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 86cf5a489eb..9b47e5141b9 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -336,76 +336,3 @@ To disable this behavior, use the ``string`` type: This is not available for YAML and PHP, because they already have built-in support for the PHP keywords. - -Syntax for Referencing Services -------------------------------- - -You can of course also reference services, which looks a bit different in -each format. You can configure the behavior if the referenced service does -not exist. By default, an exception is thrown when a non-existent service -is referenced. - -YAML -~~~~ - -Start the string with ``@`` or ``@?`` to reference a service in YAML. - -* ``@mailer`` references the ``mailer`` service. If the service does not - exist, an exception will be thrown; -* ``@?mailer`` references the ``mailer`` service. If the service does not - exist, it will be ignored; - -.. code-block:: yaml - - parameters: - # if 'my_mailer' service isn't defined, an exception will be raised - foo: @my_mailer - - # if 'my_logger' service isn't defined, 'bar' will be null - bar: @?my_logger - -.. tip:: - - Use ``@@`` to escape the ``@`` symbol in YAML. ``@@mailer`` will be - converted into the string ``"@mailer"`` instead of referencing the - ``mailer`` service. - -XML -~~~ - -In XML, use the ``service`` type. The behavior if the service does not exist -can be specified using the ``on-invalid`` argument. By default, an exception -is thrown. Valid values for ``on-invalid`` are ``null`` (uses ``null`` in place -of the missing service) or ``ignored`` (very similar, except if used on a -method call, the method call is removed). - -.. code-block:: xml - - - - - - - - - -PHP -~~~ - -In PHP, you can use the -:class:`Symfony\\Component\\DependencyInjection\\Reference` class to reference -a service. The invalid behavior is configured using the second constructor -argument and constants from -:class:`Symfony\\Component\\DependencyInjection\\ContainerInterface`. - -.. code-block:: php - - use Symfony\Component\DependencyInjection\Reference; - - // if 'my_mailer' service isn't defined, an exception will be raised - $container->setParameter('foo', new Reference('my_mailer')); - - // if 'my_logger' service isn't defined, 'bar' will be null - $container->setParameter('bar', new Reference('my_logger', - ContainerInterface::NULL_ON_INVALID_REFERENCE - )); From 4458f7ed7648019720e5ecaabe76872f6f923901 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 10:55:20 +0200 Subject: [PATCH 056/106] Revamped the documentation about "Contributing Docs" --- contributing/documentation/format.rst | 135 ++++++--- contributing/documentation/license.rst | 7 +- contributing/documentation/overview.rst | 367 +++++++++++++++-------- contributing/documentation/standards.rst | 30 +- 4 files changed, 350 insertions(+), 189 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index d00cdfa4592..57d7413f109 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -2,16 +2,27 @@ Documentation Format ==================== The Symfony documentation uses `reStructuredText`_ as its markup language and +<<<<<<< HEAD `Sphinx`_ for building the output (HTML, PDF, ...). +======= +`Sphinx`_ for generating the documentation in the formats read by the end users, +such as HTML and PDF. +>>>>>>> Revamped the documentation about "Contributing Docs" reStructuredText ---------------- -reStructuredText *"is an easy-to-read, what-you-see-is-what-you-get plaintext -markup syntax and parser system"*. +reStructuredText is a plaintext markup syntax similar to Markdown, but much +stricter with its syntax. If you are new to reStructuredText, take some time to +familiarize with this format by reading the existing `Symfony documentation`_ +<<<<<<< HEAD You can learn more about its syntax by reading existing Symfony `documents`_ or by reading the `reStructuredText Primer`_ on the Sphinx website. +======= +If you prefer to learn more about this format, check out the `reStructuredText Primer`_ +tutorial and the `reStructuredText Reference`_. +>>>>>>> Revamped the documentation about "Contributing Docs" .. caution:: @@ -24,14 +35,14 @@ or by reading the `reStructuredText Primer`_ on the Sphinx website. Sphinx ------ -Sphinx is a build system that adds some nice tools to create documentation -from reStructuredText documents. As such, it adds new directives and -interpreted text roles to the standard reST `markup`_. +Sphinx is a build system that provides tools to create documentation from +reStructuredText documents. As such, it adds new directives and interpreted text +roles to the standard reST markup. Read more about the `Sphinx Markup Constructs`_. Syntax Highlighting ~~~~~~~~~~~~~~~~~~~ -All code examples uses PHP as the default highlighted language. You can change +PHP is the default syntax highlight applied to all code blocks. You can change it with the ``code-block`` directive: .. code-block:: rst @@ -41,7 +52,7 @@ it with the ``code-block`` directive: { foo: bar, bar: { foo: bar, bar: baz } } If your PHP code begins with ``` -You can also add links to the API documentation: +**Links to the API** follow a different syntax, where you must specify the type +of linked resource (``namespace``, ``class`` or ``method``): .. code-block:: rst @@ -148,7 +162,7 @@ You can also add links to the API documentation: :method:`Symfony\\Component\\HttpKernel\\Bundle\\Bundle::build` -and to the PHP documentation: +**Links to the PHP documentation** follow a pretty similar syntax: .. code-block:: rst @@ -158,20 +172,55 @@ and to the PHP documentation: :phpfunction:`iterator_to_array` +New Features or Behavior Changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you're documenting a brand new feature or a change that's been made in +Symfony2, you should precede your description of the change with a +``.. versionadded:: 2.X`` directive and a short description: + +.. code-block:: text + + .. versionadded:: 2.3 + The ``askHiddenResponse`` method was introduced in Symfony 2.3. + + You can also ask a question and hide the response. This is particularly... + +If you're documenting a behavior change, it may be helpful to *briefly* describe +how the behavior has changed. + +.. code-block:: text + + .. versionadded:: 2.3 + The ``include()`` function is a new Twig feature that's available in + Symfony 2.3. Prior, the ``{% include %}`` tag was used. + +Whenever a new minor version of Symfony2 is released (e.g. 2.4, 2.5, etc), +a new branch of the documentation is created from the ``master`` branch. +At this point, all the ``versionadded`` tags for Symfony2 versions that have +reached end-of-life will be removed. For example, if Symfony 2.5 were released +today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded`` +tags would be removed from the new 2.5 branch. + Testing Documentation ~~~~~~~~~~~~~~~~~~~~~ -To test documentation before a commit: +When submitting a new content to the documentation repository or when changing +any existing resource, an automatic process will check if your documentation is +free of syntax errors and is ready to be reviewed. + +Nevertheless, if you prefer to do this check locally on your own machine before +submitting your documentation, follow these steps: * Install `Sphinx`_; -* Install the Sphinx extensions using git submodules: ``git submodule update --init``; -* (Optionally) Install the bundle docs and CMF docs: ``bash install.sh``; -* Run ``make html`` and view the generated HTML in the ``build`` directory. - -.. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _Sphinx: http://sphinx-doc.org/ -.. _documents: https://github.com/symfony/symfony-docs -.. _reStructuredText Primer: http://sphinx-doc.org/rest.html -.. _markup: http://sphinx-doc.org/markup/ -.. _Pygments website: http://pygments.org/languages/ -.. _Sphinx quick setup: http://sphinx-doc.org/tutorial.html#setting-up-the-documentation-sources +* Install the Sphinx extensions using git submodules: ``$ git submodule update --init``; +* (Optionally) Install the bundle docs and CMF docs: ``$ bash install.sh``; +* Run ``make html`` and view the generated HTML in the ``build/`` directory. + +.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html +.. _`Sphinx`: http://sphinx-doc.org/ +.. _`Symfony documentation`: https://github.com/symfony/symfony-docs +.. _`reStructuredText Primer`: http://sphinx-doc.org/rest.html +.. _`reStructuredText Reference`: http://docutils.sourceforge.net/docs/user/rst/quickref.html +.. _`Sphinx Markup Constructs`: http://sphinx-doc.org/markup/ +.. _`supported languages`: http://pygments.org/languages/ diff --git a/contributing/documentation/license.rst b/contributing/documentation/license.rst index d2ee34b4077..c4d5598b00b 100644 --- a/contributing/documentation/license.rst +++ b/contributing/documentation/license.rst @@ -1,10 +1,15 @@ .. _symfony2-documentation-license: +<<<<<<< HEAD Symfony Documentation License ============================= The Symfony documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported `License`_. +======= +The Symfony2 documentation is licensed under a Creative Commons +Attribution-Share Alike 3.0 Unported License (`CC BY-SA 3.0`_). +>>>>>>> Revamped the documentation about "Contributing Docs" **You are free:** @@ -48,5 +53,5 @@ Attribution-Share Alike 3.0 Unported `License`_. This is a human-readable summary of the `Legal Code (the full license)`_. -.. _License: http://creativecommons.org/licenses/by-sa/3.0/ +.. _`CC BY-SA 3.0`: http://creativecommons.org/licenses/by-sa/3.0/ .. _Legal Code (the full license): http://creativecommons.org/licenses/by-sa/3.0/legalcode diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index cb91c8b9111..0ea23d910ea 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -1,101 +1,115 @@ Contributing to the Documentation ================================= -Documentation is as important as code. It follows the exact same principles: -DRY, tests, ease of maintenance, extensibility, optimization, and refactoring -just to name a few. And of course, documentation has bugs, typos, hard to read -tutorials, and more. +One of the essential principles of the Symfony project is that **documentation is +as important as code**. That's why we dedicate a great amount of resources to +document new features and to maintain updated the rest of the documentation. -Contributing ------------- +More than 800 hundred developers all around the world have contributed to +Symfony documentation, and we are glad that you are considering joining this big +family. This guide will explain everything you need to contribute to Symfony +documentation. -Before contributing, you need to become familiar with the :doc:`markup -language ` used by the documentation. +Before Your First Contribution +------------------------------ +<<<<<<< HEAD The Symfony documentation is hosted on GitHub: +======= +**Before contributing**, you should consider the following: +>>>>>>> Revamped the documentation about "Contributing Docs" -.. code-block:: text - - https://github.com/symfony/symfony-docs +* Symfony documentation is written using `reStructuredText`_ markup language. + If you are not familiar with this format, read :doc:`this article ` + for a quick overview of its basic features. +* Symfony documentation is hosted on `GitHub`_. You'll need a GitHub user account + to contribute documentation. +* Symfony documentation is published under a :doc:`Creative Commons BY-SA 3.0 License ` + and all your contributions will implicitly adhere to that license. -If you want to submit a patch, `fork`_ the official repository on GitHub and -then clone your fork: +Your First Documentation Contribution +------------------------------------- -.. code-block:: bash +In this section you'll learn how to contribute to Symfony documentation for the +first time. Next section will explain the abbreviated process to follow for the +next contributions. - $ git clone git://github.com/YOURUSERNAME/symfony-docs.git +Let's imagine that you want to improve the installation chapter of the Symfony +book. In order to do those changes, follow these steps: -Consistent with Symfony's source code, the documentation repository is split into -multiple branches, corresponding to the different versions of Symfony itself. -The ``master`` branch holds the documentation for the development branch of the code. +**Step 1.** Go to the official Symfony documentation repository located at +`github.com/symfony/symfony-docs `_ +and `fork the repository`_ to your personal account. This is only needed the +first time you contribute to Symfony. -Unless you're documenting a feature that was introduced *after* Symfony 2.3 -(e.g. in Symfony 2.4), your changes should always be based on the 2.3 branch. -To do this checkout the 2.3 branch before the next step: +**Step 2.** **Clone** the forked repository to your local machine (in this +example we'll use the ``projects/symfony-docs/`` directory to store the +documentation; change this value accordingly): .. code-block:: bash - $ git checkout 2.3 - -.. tip:: - - Your base branch (e.g. 2.3) will become the "Applies to" in the :ref:`doc-contributing-pr-format` - that you'll use later. + $ cd projects/ + $ git clone git://github.com//symfony-docs.git -Next, create a dedicated branch for your changes (for organization): +**Step 3.** Switch to the **oldest maintained branch** before making any change. +Nowadays this is the ``2.3`` branch: .. code-block:: bash - $ git checkout -b improving_foo_and_bar - -You can now make your changes directly to this branch and commit them. When -you're done, push this branch to *your* GitHub fork and initiate a pull request. - -Creating a Pull Request -~~~~~~~~~~~~~~~~~~~~~~~ - -Following the example, the pull request will default to be between your -``improving_foo_and_bar`` branch and the ``symfony-docs`` ``master`` branch. + $ cd symfony-docs/ + $ git checkout 2.3 -If you have made your changes based on the 2.3 branch then you need to change -the base branch to be 2.3 on the preview page by clicking the ``edit`` button -on the top left: +If you were instead documenting a new feature, switch to the first Symfony +version which included it: ``2.5``, ``2.6``, etc. +<<<<<<< HEAD .. image:: /images/contributing/docs-pull-request-change-base.png :align: center +======= +**Step 4.** Create a dedicated **new branch** for your changes. This greatly +simplifies the work of reviewing and merging your changes. Use a short and +memorable name for the new branch: +>>>>>>> Revamped the documentation about "Contributing Docs" -.. note:: +.. code-block:: bash - All changes made to a branch (e.g. 2.3) will be merged up to each "newer" - branch (e.g. 2.4, master, etc) for the next release on a weekly basis. + $ git checkout -b improve_install_chapter -GitHub covers the topic of `pull requests`_ in detail. +**Step 5.** Now make your changes in the documentation. Add, tweak, reword and +even remove any content, but make sure that you comply with the doc:`standards`. -.. note:: +**Step 6.** **Push** the changes to your forked repository: +<<<<<<< HEAD The Symfony documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported :doc:`License `. +======= +.. code-block:: bash +>>>>>>> Revamped the documentation about "Contributing Docs" -You can also prefix the title of your pull request in a few cases: + $ git commit book/installation.rst + $ git push -* ``[WIP]`` (Work in Progress) is used when you are not yet finished with your - pull request, but you would like it to be reviewed. The pull request won't - be merged until you say it is ready. +**Step 7.** Everything is now ready to initiate a **pull request**. Go to your +forked repository at ``https//github.com//symfony-docs`` +and click on the ``Pull Requests`` link located at the sidebar. -* ``[WCM]`` (Waiting Code Merge) is used when you're documenting a new feature - or change that hasn't been accepted yet into the core code. The pull request - will not be merged until it is merged in the core code (or closed if the - change is rejected). +Then, click on the big ``New pull request`` button. As GitHub cannot guess the +exact changes that you want to propose, select the appropriate branches where +changes should be applied: -.. _doc-contributing-pr-format: +.. image:: /images/docs-pull-request-change-base.png + :align: center -Pull Request Format -~~~~~~~~~~~~~~~~~~~ +In this example, the **base repository** should be ``symfony/symfony-docs`` and +the **base branch** should be the ``2.3``, which is the branch that you selected +to base your changes on. The **compare repository** should be your forked copy +of ``symfony-docs`` and the **compare branch** should be ``improve_install_chapter``, +which is the name that you selected to work on your changes. -Unless you're fixing some minor typos, the pull request description **must** -include the following checklist to ensure that contributions may be reviewed -without needless feedback loops and that your contributions can be included -into the documentation as quickly as possible: +**Step 8.** The last step is to prepare the **description** of the pull request. +To ensure that your work is reviewed quickly, you have to add the following table +at the beginning of your pull request description: .. code-block:: text @@ -106,123 +120,210 @@ into the documentation as quickly as possible: | Applies to | [Symfony version numbers this applies to] | Fixed tickets | [comma separated list of tickets fixed by the PR] -An example submission could now look as follows: +In this example, this table would look as follows: .. code-block:: text | Q | A | ------------- | --- | Doc fix? | yes - | New docs? | yes (symfony/symfony#2500) - | Applies to | all (or 2.3+) - | Fixed tickets | #1075 + | New docs? | no + | Applies to | 2.3+ + | Fixed tickets | #10575 -.. tip:: +**Step 9.** Now that you've successfully submitted your first contribution to the +Symfony documentation, **go and celebrate!** The documentation managers will +carefully review your work in short time and they will let you know about any +required change. - Please be patient. It can take from 15 minutes to several days for your changes - to appear on the symfony.com website after the documentation team merges your - pull request. You can check if your changes have introduced some markup issues - by going to the `Documentation Build Errors`_ page (it is updated each French - night at 3AM when the server rebuilds the documentation). +In case you need to add or modify anything, there is no need to create a new +pull request. Just make sure that you are in the correct branch, make your +changes and push them: -Documenting new Features or Behavior Changes --------------------------------------------- +.. code-block:: bash +<<<<<<< HEAD If you're documenting a brand new feature or a change that's been made in Symfony, you should precede your description of the change with a ``.. versionadded:: 2.X`` tag and a short description: +======= + $ cd projects/symfony-docs/ + $ git checkout improve_install_chapter +>>>>>>> Revamped the documentation about "Contributing Docs" -.. code-block:: text + # do your changes ... - .. versionadded:: 2.3 - The ``askHiddenResponse`` method was introduced in Symfony 2.3. + $ git push - You can also ask a question and hide the response. This is particularly... +**Step 10.** After your pull request is eventually accepted and merged in the Symfony +documentation, you will be included in the `Symfony Documentation Contributors`_ +list. Moreover, if you happen to have a `SensioLabsConnect`_ profile, we will +award you a cool `Symfony Documentation Badge`_. -If you're documenting a behavior change, it may be helpful to *briefly* describe -how the behavior has changed. +Your Second Documentation Contribution +-------------------------------------- -.. code-block:: text +The first contribution took some time because you had to fork the repository, +learn how to write documentation, comply with the pull requests standards, etc. +The second contribution will be much easier, except for one detail: given the +furious update activity of the Symfony documentation repository, odds are that +your fork is now outdated comparing it with the official repository. - .. versionadded:: 2.3 - The ``include()`` function is a new Twig feature that's available in - Symfony 2.3. Prior, the ``{% include %}`` tag was used. +Solving this problem requires to `sync your fork`_ with the original repository. +To do so, execute first this command to tell git which is the original repository +from which you created the fork: +.. code-block:: bash + + $ cd projects/symfony-docs/ + $ git remote add upstream https://github.com/symfony/symfony-docs.git + +Now you can **sync your fork** executing the following command: + +.. code-block:: bash + +<<<<<<< HEAD Whenever a new minor version of Symfony is released (e.g. 2.4, 2.5, etc), a new branch of the documentation is created from the ``master`` branch. At this point, all the ``versionadded`` tags for Symfony versions that have reached end-of-life will be removed. For example, if Symfony 2.5 were released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded`` tags would be removed from the new 2.5 branch. +======= + $ cd projects/symfony-docs/ + $ git fetch upstream + $ git checkout master + $ git merge upstream/master +>>>>>>> Revamped the documentation about "Contributing Docs" -Standards ---------- +Now you can proceed following the same steps explained in the previous section: -All documentation in the Symfony Documentation should follow -:doc:`the documentation standards `. +.. code-block:: bash -Reporting an Issue ------------------- + # create a new branch to store your changes based on the 2.3 branch + $ cd projects/symfony-docs/ + $ git checkout 2.3 + $ git checkout -b my_changes + + # do your changes ... + + # submit the changes to your forked repository + $ git add xxx.rst # (optional) only if this is a new content + $ git commit xxx.rst + $ git push + + # go to GitHub and create the Pull Request + # + # Include this table in the description: + # | Q | A + # | ------------- | --- + # | Doc fix? | [yes|no] + # | New docs? | [yes|no] (PR # on symfony/symfony if applicable) + # | Applies to | [Symfony version numbers this applies to] + # | Fixed tickets | [comma separated list of tickets fixed by the PR] + +Your second contribution is now completed, so **go and celebrate again!** +You will also see how your ranking improves in the list of +`Symfony Documentation Contributors`_. + +Your Next Documentation Contributions +------------------------------------- + +Now that you've made two contributions to the Symfony documentation, you are +probably comfortable with all the Git-magic involved in the process. That's +why your next contributions would be much faster and easier. Here you can find +the complete steps to contribute to Symfony documentation, which you can use as +a **checklist**: -The most easy contribution you can make is reporting issues: a typo, a grammar -mistake, a bug in a code example, a missing explanation, and so on. +.. code-block:: bash -Steps: + # sync your fork with the official Symfony repository + $ cd projects/symfony-docs/ + $ git fetch upstream + $ git checkout master + $ git merge upstream/master -* Submit a bug in the bug tracker; + # create a new branch from the oldest maintained version + $ git checkout 2.3 + $ git checkout -b my_changes -* *(optional)* Submit a patch. + # do your changes ... -Translating ------------ + # add and commit your changes + $ git add xxx.rst # (optional) only if this is a new content + $ git commit xxx.rst + $ git push -Read the dedicated :doc:`document `. + # go to GitHub and create the Pull Request + # + # Include this table in the description: + # | Q | A + # | ------------- | --- + # | Doc fix? | [yes|no] + # | New docs? | [yes|no] (PR # on symfony/symfony if applicable) + # | Applies to | [Symfony version numbers this applies to] + # | Fixed tickets | [comma separated list of tickets fixed by the PR] -Managing Releases ------------------ + # (optional) make the changes requested by reviewers and commit them + $ git commit xxx.rst + $ git push -Symfony has a very standardized release process, which you can read more -about in the :doc:`/contributing/community/releases` section. +You guessed right: after all this hard work, it's **time to celebrate again!** -To keep up with the release process, the documentation team makes several -changes to the documentation at various parts of the lifecycle. +Frequently Asked Questions +-------------------------- -When a Release Reaches "End of Maintenance" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Why Do my Changes so Long to Be Reviewed and/or Merged? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Every release will eventually reach its "end of maintenance". For details, -see :ref:`contributing-release-maintenance`. +Please be patient. It can take from 15 minutes to several days before your pull +request can be fully reviewed. And after merging the changes, it could take again +from some minutes to several hours before your changes appear on the symfony.com +website. -When a release reaches its end of maintenance, the following items are done. -For this example, suppose version 2.1 has just reached its end of maintenance: +What If I Want to Translate Some Documentation into my Language? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Changes and pull requests are no longer merged into to the branch (2.1), - except for security updates, which are merged until the release reaches - its "end of life". +Read the dedicated :doc:`document `. -* All branches still under maintenance (e.g. 2.2 and higher) are updated - to reflect that pull requests should start from the now-oldest maintained - version (e.g. 2.2) - including the details in the README file. +Why Should I Use the Oldest Maintained Branch Instead of the Master Branch? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Remove all ``versionadded`` directives - and any other notes related to features - changing or being new - for the version (e.g. 2.1) from the master branch. - The result is that the next release (which is the first that comes entirely - *after* the end of maintenance of this branch), will have no mentions of - the old version (e.g. 2.1). +Consistent with Symfony's source code, the documentation repository is split +into multiple branches, corresponding to the different versions of Symfony itself. +The master branch holds the documentation for the development branch of the code. -When a new Branch is Created for a Release -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Unless you're documenting a feature that was introduced after Symfony 2.3, +your changes should always be based on the 2.3 branch. Documentation managers +will use the necessary Git-magic to also apply your changes to all the active +branches of the documentation. + +What If I Want to Submit my Work without Fully Finishing It? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can do it. But please use one of these two prefixes to let reviewers know +which is the state of your work: + +* ``[WIP]`` (Work in Progress) is used when you are not yet finished with your + pull request, but you would like it to be reviewed. The pull request won't + be merged until you say it is ready. + +* ``[WCM]`` (Waiting Code Merge) is used when you're documenting a new feature + or change that hasn't been accepted yet into the core code. The pull request + will not be merged until it is merged in the core code (or closed if the + change is rejected). -During the :ref:`stabilization phase `, a -new branch on the documentation is created. For example, if version 2.3 were -being stabilized, then a new 2.3 branch would be created for it. When this -happens, the following items are done: +Would You Admit a Huge Pull Request with Lots of Changes? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Change all version and master references to the correct version (e.g. 2.3). - For example, in installation chapters, we reference the version you should - use for installation. As an example, see the changes made in `PR #2688`_. +Sure! But before doing a huge change, it's probably a good idea to open an issue +in the Symfony Documentation repository to ask the managers if they agree with +your proposed changes. Otherwise, they could refuse your proposal after having +made all the work and you would have wasted a lot of time. -.. _`fork`: https://help.github.com/articles/fork-a-repo -.. _`pull requests`: https://help.github.com/articles/using-pull-requests -.. _`Documentation Build Errors`: http://symfony.com/doc/build_errors -.. _`PR #2688`: https://github.com/symfony/symfony-docs/pull/2688 +.. _`GitHub`: https://github.com/ +.. _`fork the repository`: https://help.github.com/articles/fork-a-repo +.. _`Symfony Documentation Contributors`: http://symfony.com/contributors/doc +.. _`SensioLabsConnect`: https://connect.sensiolabs.com/ +.. _`Symfony Documentation Badge`: https://connect.sensiolabs.com/badge/36/symfony-documentation-contributor +.. _`sync your fork`: https://help.github.com/articles/syncing-a-fork diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst index 7e888fd9796..bc4a0980848 100644 --- a/contributing/documentation/standards.rst +++ b/contributing/documentation/standards.rst @@ -43,7 +43,7 @@ Example echo 'You cannot use the :: shortcut here'; - .. _`Symfony Documentation`: http://symfony.com/doc/current/contributing/documentation/standards.html + .. _`Symfony Documentation`: http://symfony.com/doc Code Examples ------------- @@ -134,19 +134,23 @@ Files and Directories ā”œā”€ vendor/ └─ ... -Language Standards ------------------- +English Language Standards +-------------------------- -* For sections, use the following capitalization rules: - `Capitalization of the first word, and all other words, except for closed-class words`_: +* **English Dialect**: use the United States English dialect, commonly called + `American English`_. +* **Section titles**: use a variant of the title case, where the first + word is always capitalized, and all other words are capitalized, except for + the closed-class words (read Wikipedia article about `headings and titles`_). - The Vitamins are in my Fresh California Raisins + E.g.: The Vitamins are in my Fresh California Raisins -* Do not use `Serial (Oxford) Commas`_; -* You should use a form of *you* instead of *we* (i.e. avoid the first person - point of view: use the second instead); -* When referencing a hypothetical person, such as "a user with a session cookie", gender-neutral - pronouns (they/their/them) should be used. For example, instead of: +* **Punctuation**: avoid the use of `Serial (Oxford) Commas`_; +* **Pronouns**: avoid the use of `nosism`_ and always use *you* instead of *we*. + (i.e. avoid the first person point of view: use the second instead); +* **Gender-neutral language**: when referencing a hypothetical person, such as + *"a user with a session cookie"*, use gender-neutral pronouns (they/their/them). + For example, instead of: * he or she, use they * him or her, use them * his or her, use their @@ -155,5 +159,7 @@ Language Standards .. _`the Sphinx documentation`: http://sphinx-doc.org/rest.html#source-code .. _`Twig Coding Standards`: http://twig.sensiolabs.org/doc/coding_standards.html -.. _`Capitalization of the first word, and all other words, except for closed-class words`: http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles +.. _`American English`: http://en.wikipedia.org/wiki/American_English +.. _`headings and titles`: http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles .. _`Serial (Oxford) Commas`: http://en.wikipedia.org/wiki/Serial_comma +.. _`nosism`: http://en.wikipedia.org/wiki/Nosism From 5b53d6a0a20223e9ed393dc859fc6663d5a2d58d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:01:19 +0200 Subject: [PATCH 057/106] Added missing link --- contributing/documentation/overview.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 0ea23d910ea..1f42daa63c5 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -321,6 +321,7 @@ in the Symfony Documentation repository to ask the managers if they agree with your proposed changes. Otherwise, they could refuse your proposal after having made all the work and you would have wasted a lot of time. +.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html .. _`GitHub`: https://github.com/ .. _`fork the repository`: https://help.github.com/articles/fork-a-repo .. _`Symfony Documentation Contributors`: http://symfony.com/contributors/doc From 9a49cf29179d388011a78e37645dff7046f07fb4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:10:31 +0200 Subject: [PATCH 058/106] lways use absolute links instead of relative for internal doc links --- contributing/documentation/overview.rst | 14 +++++++------- contributing/documentation/translations.rst | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 1f42daa63c5..990887e0fb4 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -5,10 +5,9 @@ One of the essential principles of the Symfony project is that **documentation i as important as code**. That's why we dedicate a great amount of resources to document new features and to maintain updated the rest of the documentation. -More than 800 hundred developers all around the world have contributed to -Symfony documentation, and we are glad that you are considering joining this big -family. This guide will explain everything you need to contribute to Symfony -documentation. +More than 800 developers all around the world have contributed to Symfony +documentation, and we are glad that you are considering joining this big family. +This guide will explain everything you need to contribute to Symfony documentation. Before Your First Contribution ------------------------------ @@ -20,11 +19,12 @@ The Symfony documentation is hosted on GitHub: >>>>>>> Revamped the documentation about "Contributing Docs" * Symfony documentation is written using `reStructuredText`_ markup language. - If you are not familiar with this format, read :doc:`this article ` + If you are not familiar with this format, read :doc:`this article ` for a quick overview of its basic features. * Symfony documentation is hosted on `GitHub`_. You'll need a GitHub user account to contribute documentation. -* Symfony documentation is published under a :doc:`Creative Commons BY-SA 3.0 License ` +* Symfony documentation is published under a + :doc:`Creative Commons BY-SA 3.0 License ` and all your contributions will implicitly adhere to that license. Your First Documentation Contribution @@ -284,7 +284,7 @@ website. What If I Want to Translate Some Documentation into my Language? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Read the dedicated :doc:`document `. +Read the dedicated :doc:`document `. Why Should I Use the Oldest Maintained Branch Instead of the Master Branch? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/contributing/documentation/translations.rst b/contributing/documentation/translations.rst index 29a6fdebb7d..dda5e56929b 100644 --- a/contributing/documentation/translations.rst +++ b/contributing/documentation/translations.rst @@ -7,8 +7,8 @@ in the translation process. Contributing ------------ -First, become familiar with the :doc:`markup language ` used by the -documentation. +First, become familiar with the :doc:`markup language ` +used by the documentation. Then, subscribe to the `Symfony docs mailing-list`_, as collaboration happens there. From 517370511a992cd7157a852bc715cab459e410e8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:16:08 +0200 Subject: [PATCH 059/106] Switched another relative link into an absolute reference --- contributing/documentation/overview.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 990887e0fb4..16e054f52d6 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -76,7 +76,8 @@ memorable name for the new branch: $ git checkout -b improve_install_chapter **Step 5.** Now make your changes in the documentation. Add, tweak, reword and -even remove any content, but make sure that you comply with the doc:`standards`. +even remove any content, but make sure that you comply with the +doc:`/contributing/documentation/standards`. **Step 6.** **Push** the changes to your forked repository: From f2043eb50f79c6b425fcb006706d86bdb3fe490c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:24:42 +0200 Subject: [PATCH 060/106] Added a note about not using relative internal links in the doc --- contributing/documentation/format.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 57d7413f109..02742678e54 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -132,7 +132,7 @@ Adding Links .. code-block:: rst - :doc:`/path/to/page` + :doc:`/absolute/path/to/page` The page name should not include the file extension (``.rst``). For example: @@ -144,7 +144,18 @@ The page name should not include the file extension (``.rst``). For example: :doc:`/cookbook/configuration/environments` -The title of the linked page will be automaticall used as the text of the link. +Although they are technically correct, avoid the use of relative internal links +such as the following: + +.. code-block:: rst + + :doc:`controller` + + :doc:`event_dispatcher/introduction` + + :doc:`environments` + +The title of the linked page will be automatically used as the text of the link. If you want to modify that title, use this alternative syntax: .. code-block:: rst From 709f82a6de67183655d81f04b3b02c8375d0a401 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:39:51 +0200 Subject: [PATCH 061/106] Added lots of fixes suggested by reviewers --- contributing/documentation/format.rst | 31 +++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 02742678e54..5b378092358 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -128,7 +128,8 @@ Markup format Use it to display Adding Links ~~~~~~~~~~~~ -**Internal links** to other documentation pages use the following syntax: +The most common type of links are **internal links** to other documentation pages, +which use the following syntax: .. code-block:: rst @@ -144,23 +145,25 @@ The page name should not include the file extension (``.rst``). For example: :doc:`/cookbook/configuration/environments` -Although they are technically correct, avoid the use of relative internal links -such as the following: +The title of the linked page will be automatically used as the text of the link. +If you want to modify that title, use this alternative syntax: .. code-block:: rst - :doc:`controller` + :doc:`Spooling Email ` - :doc:`event_dispatcher/introduction` +.. note:: - :doc:`environments` + Although they are technically correct, avoid the use of relative internal + links such as the following: -The title of the linked page will be automatically used as the text of the link. -If you want to modify that title, use this alternative syntax: + .. code-block:: rst -.. code-block:: rst + :doc:`controller` - :doc:`Spooling Email ` + :doc:`event_dispatcher/introduction` + + :doc:`environments` **Links to the API** follow a different syntax, where you must specify the type of linked resource (``namespace``, ``class`` or ``method``): @@ -187,7 +190,7 @@ New Features or Behavior Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you're documenting a brand new feature or a change that's been made in -Symfony2, you should precede your description of the change with a +Symfony, you should precede your description of the change with a ``.. versionadded:: 2.X`` directive and a short description: .. code-block:: text @@ -195,7 +198,7 @@ Symfony2, you should precede your description of the change with a .. versionadded:: 2.3 The ``askHiddenResponse`` method was introduced in Symfony 2.3. - You can also ask a question and hide the response. This is particularly... + You can also ask a question and hide the response. This is particularly [...] If you're documenting a behavior change, it may be helpful to *briefly* describe how the behavior has changed. @@ -206,9 +209,9 @@ how the behavior has changed. The ``include()`` function is a new Twig feature that's available in Symfony 2.3. Prior, the ``{% include %}`` tag was used. -Whenever a new minor version of Symfony2 is released (e.g. 2.4, 2.5, etc), +Whenever a new minor version of Symfony is released (e.g. 2.4, 2.5, etc), a new branch of the documentation is created from the ``master`` branch. -At this point, all the ``versionadded`` tags for Symfony2 versions that have +At this point, all the ``versionadded`` tags for Symfony versions that have reached end-of-life will be removed. For example, if Symfony 2.5 were released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded`` tags would be removed from the new 2.5 branch. From 1cbf5faceb1f34201decc6209a09c95997da8f24 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 11:58:36 +0200 Subject: [PATCH 062/106] Added another bunch of fixes suggested by reviewers --- contributing/documentation/overview.rst | 33 ++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 16e054f52d6..7d0880a9b53 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -2,7 +2,7 @@ Contributing to the Documentation ================================= One of the essential principles of the Symfony project is that **documentation is -as important as code**. That's why we dedicate a great amount of resources to +as important as code**. That's why a great amount of resources are dedicated to document new features and to maintain updated the rest of the documentation. More than 800 developers all around the world have contributed to Symfony @@ -38,13 +38,12 @@ Let's imagine that you want to improve the installation chapter of the Symfony book. In order to do those changes, follow these steps: **Step 1.** Go to the official Symfony documentation repository located at -`github.com/symfony/symfony-docs `_ -and `fork the repository`_ to your personal account. This is only needed the -first time you contribute to Symfony. +`github.com/symfony/symfony-docs`_ and `fork the repository`_ to your personal +account. This is only needed the first time you contribute to Symfony. -**Step 2.** **Clone** the forked repository to your local machine (in this -example we'll use the ``projects/symfony-docs/`` directory to store the -documentation; change this value accordingly): +**Step 2.** **Clone** the forked repository to your local machine (this +example uses the ``projects/symfony-docs/`` directory to store the documentation; +change this value accordingly): .. code-block:: bash @@ -129,7 +128,7 @@ In this example, this table would look as follows: | ------------- | --- | Doc fix? | yes | New docs? | no - | Applies to | 2.3+ + | Applies to | all | Fixed tickets | #10575 **Step 9.** Now that you've successfully submitted your first contribution to the @@ -152,14 +151,14 @@ tag and a short description: $ git checkout improve_install_chapter >>>>>>> Revamped the documentation about "Contributing Docs" - # do your changes ... + # ... do your changes $ git push **Step 10.** After your pull request is eventually accepted and merged in the Symfony documentation, you will be included in the `Symfony Documentation Contributors`_ -list. Moreover, if you happen to have a `SensioLabsConnect`_ profile, we will -award you a cool `Symfony Documentation Badge`_. +list. Moreover, if you happen to have a `SensioLabsConnect`_ profile, you will +get a cool `Symfony Documentation Badge`_. Your Second Documentation Contribution -------------------------------------- @@ -206,7 +205,7 @@ Now you can proceed following the same steps explained in the previous section: $ git checkout 2.3 $ git checkout -b my_changes - # do your changes ... + # ... do your changes # submit the changes to your forked repository $ git add xxx.rst # (optional) only if this is a new content @@ -248,7 +247,7 @@ a **checklist**: $ git checkout 2.3 $ git checkout -b my_changes - # do your changes ... + # ... do your changes # add and commit your changes $ git add xxx.rst # (optional) only if this is a new content @@ -277,10 +276,9 @@ Frequently Asked Questions Why Do my Changes so Long to Be Reviewed and/or Merged? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Please be patient. It can take from 15 minutes to several days before your pull -request can be fully reviewed. And after merging the changes, it could take again -from some minutes to several hours before your changes appear on the symfony.com -website. +Please be patient. It can take up to several days before your pull request can +be fully reviewed. After merging the changes, it could take again several hours +before your changes appear on the symfony.com website. What If I Want to Translate Some Documentation into my Language? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -322,6 +320,7 @@ in the Symfony Documentation repository to ask the managers if they agree with your proposed changes. Otherwise, they could refuse your proposal after having made all the work and you would have wasted a lot of time. +.. _`github.com/symfony/symfony-docs`: https://github.com/symfony/symfony-docs .. _`reStructuredText`: http://docutils.sourceforge.net/rst.html .. _`GitHub`: https://github.com/ .. _`fork the repository`: https://help.github.com/articles/fork-a-repo From 82ae88061bf6c7831b36b436bd552e526b37608e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 12:41:23 +0200 Subject: [PATCH 063/106] More and more fixes and improvements --- contributing/documentation/format.rst | 20 +++++++++++++++----- contributing/documentation/overview.rst | 21 +++++++++++---------- contributing/documentation/standards.rst | 2 +- contributing/documentation/translations.rst | 7 +++++++ 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 5b378092358..4958100efa1 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -1,11 +1,16 @@ Documentation Format ==================== +<<<<<<< HEAD The Symfony documentation uses `reStructuredText`_ as its markup language and <<<<<<< HEAD `Sphinx`_ for building the output (HTML, PDF, ...). ======= `Sphinx`_ for generating the documentation in the formats read by the end users, +======= +The Symfony documentation uses reStructuredText_ as its markup language and +Sphinx_ for generating the documentation in the formats read by the end users, +>>>>>>> More and more fixes and improvements such as HTML and PDF. >>>>>>> Revamped the documentation about "Contributing Docs" @@ -16,11 +21,15 @@ reStructuredText is a plaintext markup syntax similar to Markdown, but much stricter with its syntax. If you are new to reStructuredText, take some time to familiarize with this format by reading the existing `Symfony documentation`_ +<<<<<<< HEAD <<<<<<< HEAD You can learn more about its syntax by reading existing Symfony `documents`_ or by reading the `reStructuredText Primer`_ on the Sphinx website. ======= If you prefer to learn more about this format, check out the `reStructuredText Primer`_ +======= +If you want to learn more about this format, check out the `reStructuredText Primer`_ +>>>>>>> More and more fixes and improvements tutorial and the `reStructuredText Reference`_. >>>>>>> Revamped the documentation about "Contributing Docs" @@ -73,7 +82,7 @@ Configuration Blocks Whenever you include a configuration sample, use the ``configuration-block`` directive to show the configuration in all supported configuration formats -(``PHP``, ``YAML``, and ``XML``). Example: +(``PHP``, ``YAML`` and ``XML``). Example: .. code-block:: rst @@ -155,7 +164,8 @@ If you want to modify that title, use this alternative syntax: .. note:: Although they are technically correct, avoid the use of relative internal - links such as the following: + links such as the following, because they break the references in the + generated PDF documentation: .. code-block:: rst @@ -226,13 +236,13 @@ free of syntax errors and is ready to be reviewed. Nevertheless, if you prefer to do this check locally on your own machine before submitting your documentation, follow these steps: -* Install `Sphinx`_; +* Install Sphinx_; * Install the Sphinx extensions using git submodules: ``$ git submodule update --init``; * (Optionally) Install the bundle docs and CMF docs: ``$ bash install.sh``; * Run ``make html`` and view the generated HTML in the ``build/`` directory. -.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html -.. _`Sphinx`: http://sphinx-doc.org/ +.. _reStructuredText: http://docutils.sourceforge.net/rst.html +.. _Sphinx: http://sphinx-doc.org/ .. _`Symfony documentation`: https://github.com/symfony/symfony-docs .. _`reStructuredText Primer`: http://sphinx-doc.org/rest.html .. _`reStructuredText Reference`: http://docutils.sourceforge.net/docs/user/rst/quickref.html diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 7d0880a9b53..3e718162af2 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -18,10 +18,10 @@ The Symfony documentation is hosted on GitHub: **Before contributing**, you should consider the following: >>>>>>> Revamped the documentation about "Contributing Docs" -* Symfony documentation is written using `reStructuredText`_ markup language. +* Symfony documentation is written using reStructuredText_ markup language. If you are not familiar with this format, read :doc:`this article ` for a quick overview of its basic features. -* Symfony documentation is hosted on `GitHub`_. You'll need a GitHub user account +* Symfony documentation is hosted on GitHub_. You'll need a GitHub user account to contribute documentation. * Symfony documentation is published under a :doc:`Creative Commons BY-SA 3.0 License ` @@ -157,7 +157,7 @@ tag and a short description: **Step 10.** After your pull request is eventually accepted and merged in the Symfony documentation, you will be included in the `Symfony Documentation Contributors`_ -list. Moreover, if you happen to have a `SensioLabsConnect`_ profile, you will +list. Moreover, if you happen to have a SensioLabsConnect_ profile, you will get a cool `Symfony Documentation Badge`_. Your Second Documentation Contribution @@ -315,16 +315,17 @@ which is the state of your work: Would You Admit a Huge Pull Request with Lots of Changes? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Sure! But before doing a huge change, it's probably a good idea to open an issue -in the Symfony Documentation repository to ask the managers if they agree with -your proposed changes. Otherwise, they could refuse your proposal after having -made all the work and you would have wasted a lot of time. +First, make sure that the changes are somewhat related. Otherwise, please create +separate pull requests. Anyway, before submitting a huge change, it's probably a +good idea to open an issue in the Symfony Documentation repository to ask the +managers if they agree with your proposed changes. Otherwise, they could refuse +your proposal after having made all the work and you would have wasted a lot of time. .. _`github.com/symfony/symfony-docs`: https://github.com/symfony/symfony-docs -.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html -.. _`GitHub`: https://github.com/ +.. _reStructuredText: http://docutils.sourceforge.net/rst.html +.. _GitHub: https://github.com/ .. _`fork the repository`: https://help.github.com/articles/fork-a-repo .. _`Symfony Documentation Contributors`: http://symfony.com/contributors/doc -.. _`SensioLabsConnect`: https://connect.sensiolabs.com/ +.. _SensioLabsConnect: https://connect.sensiolabs.com/ .. _`Symfony Documentation Badge`: https://connect.sensiolabs.com/badge/36/symfony-documentation-contributor .. _`sync your fork`: https://help.github.com/articles/syncing-a-fork diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst index bc4a0980848..39d073ec0da 100644 --- a/contributing/documentation/standards.rst +++ b/contributing/documentation/standards.rst @@ -140,7 +140,7 @@ English Language Standards * **English Dialect**: use the United States English dialect, commonly called `American English`_. * **Section titles**: use a variant of the title case, where the first - word is always capitalized, and all other words are capitalized, except for + word is always capitalized and all other words are capitalized, except for the closed-class words (read Wikipedia article about `headings and titles`_). E.g.: The Vitamins are in my Fresh California Raisins diff --git a/contributing/documentation/translations.rst b/contributing/documentation/translations.rst index dda5e56929b..54c5002ff54 100644 --- a/contributing/documentation/translations.rst +++ b/contributing/documentation/translations.rst @@ -4,6 +4,12 @@ Translations The Symfony documentation is written in English and many people are involved in the translation process. +.. note:: + + Symfony Project officially discourages starting new translations for the + documentation. As a matter of fact, there is `an ongoing discussion`_ in + the community about the benefits and drawbacks of community driven translations. + Contributing ------------ @@ -82,4 +88,5 @@ repository and apply changes to the translated documents as soon as possible. Non maintained languages are removed from the official list of repositories as obsolete documentation is dangerous. +.. _`an ongoing discussion`: https://github.com/symfony/symfony-docs/issues/4078 .. _Symfony docs mailing-list: http://groups.google.com/group/symfony-docs From 216d0864e2ebc6177df13224654817638fa26fb4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 13:05:46 +0200 Subject: [PATCH 064/106] Improved the explanation thanks to @stof comments --- cookbook/templating/PHP.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index ff6c56dd147..6c180f84943 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -80,20 +80,28 @@ shortcut to render the default ``AcmeHelloBundle:Hello:index.html.php`` template .. caution:: Enabling the ``php`` and ``twig`` template engines simultaneously is - allowed but it will produce an important side effect in your application: - template namespaces will no longer work:: + allowed but it will produce an undesirable side effect in your application. + Template namespaces will no longer work except inside Twig templates:: public function indexAction() { // ... - // namespaced templates will no longer work + // namespaced templates will no longer work in controllers $this->render('@Acme/Default/index.html.twig'); - // traditional template notation will work + // you must use the traditional template notation $this->render('AcmeBundle:Default:index.html.twig'); } + .. code-block:: jinja + + {# inside a Twig template, namespaced templates work as expected #} + {{ include('@Acme/Default/index.html.twig') }} + + {# traditional template notation will also work #} + {{ include('AcmeBundle:Default:index.html.twig') }} + .. index:: single: Templating; Layout From 6ac5c550e098928faa3ab6a25482e67d9054b3c6 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Sep 2014 18:21:53 +0200 Subject: [PATCH 065/106] Reworded the explanation about the limitation of enablin PHP templates --- cookbook/templating/PHP.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index 6c180f84943..9d09afbfa4b 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -80,8 +80,9 @@ shortcut to render the default ``AcmeHelloBundle:Hello:index.html.php`` template .. caution:: Enabling the ``php`` and ``twig`` template engines simultaneously is - allowed but it will produce an undesirable side effect in your application. - Template namespaces will no longer work except inside Twig templates:: + allowed, but it will produce an undesirable side effect in your application: + the ``@`` notation for Twig namespaces will no longer be supported for the + ``render()`` method:: public function indexAction() { From 32cc0c70f5adbaf0fb5c72cf951db545dfb6f4e0 Mon Sep 17 00:00:00 2001 From: azarzag Date: Wed, 10 Sep 2014 21:45:03 -0400 Subject: [PATCH 066/106] Update Collection.rst Wrong key in php code block. --- reference/constraints/Collection.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/constraints/Collection.rst b/reference/constraints/Collection.rst index 6f028e358e2..2c93325da2f 100644 --- a/reference/constraints/Collection.rst +++ b/reference/constraints/Collection.rst @@ -144,7 +144,7 @@ blank but is no longer than 100 characters in length, you would do the following $metadata->addPropertyConstraint('profileData', new Assert\Collection(array( 'fields' => array( 'personal_email' => new Assert\Email(), - 'lastName' => array( + 'short_bio' => array( new Assert\NotBlank(), new Assert\Length(array( 'max' => 100, From cc5ac2556a1d1f4551fbb12997795683088a834b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 15 Sep 2014 20:31:42 +0200 Subject: [PATCH 067/106] Removed two highlight formats which are "experimental" and not used by end users --- contributing/documentation/format.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 4958100efa1..1fdfb39ec61 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -130,8 +130,6 @@ Markup format Use it to display ``html+php`` PHP code blended with HTML ``ini`` INI ``php-annotations`` PHP Annotations -``php-standalone`` Pure PHP code -``php-symfony`` PHP code with special Symfony features =================== ====================================== Adding Links From 7ed8f0042bb35fdb70d065aa916e7045101365c7 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 15 Sep 2014 20:42:36 +0200 Subject: [PATCH 068/106] Fixed all the errors found by Ryan --- contributing/documentation/format.rst | 2 +- contributing/documentation/overview.rst | 66 +++++++++++++------------ 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 1fdfb39ec61..fdea938f21e 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -174,7 +174,7 @@ If you want to modify that title, use this alternative syntax: :doc:`environments` **Links to the API** follow a different syntax, where you must specify the type -of linked resource (``namespace``, ``class`` or ``method``): +of the linked resource (``namespace``, ``class`` or ``method``): .. code-block:: rst diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 3e718162af2..96934c0592f 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -3,11 +3,12 @@ Contributing to the Documentation One of the essential principles of the Symfony project is that **documentation is as important as code**. That's why a great amount of resources are dedicated to -document new features and to maintain updated the rest of the documentation. +documenting new features and to keeping the rest of the documentation up to date. -More than 800 developers all around the world have contributed to Symfony +More than 800 developers all around the world have contributed to Symfony's documentation, and we are glad that you are considering joining this big family. -This guide will explain everything you need to contribute to Symfony documentation. +This guide will explain everything you need to contribute to the Symfony +documentation. Before Your First Contribution ------------------------------ @@ -22,7 +23,7 @@ The Symfony documentation is hosted on GitHub: If you are not familiar with this format, read :doc:`this article ` for a quick overview of its basic features. * Symfony documentation is hosted on GitHub_. You'll need a GitHub user account - to contribute documentation. + to contribute to the documentation. * Symfony documentation is published under a :doc:`Creative Commons BY-SA 3.0 License ` and all your contributions will implicitly adhere to that license. @@ -30,12 +31,12 @@ The Symfony documentation is hosted on GitHub: Your First Documentation Contribution ------------------------------------- -In this section you'll learn how to contribute to Symfony documentation for the -first time. Next section will explain the abbreviated process to follow for the -next contributions. +In this section you'll learn how to contribute to the Symfony documentation for +the first time. The next section will explain the shorter process you'll follow +in the future for every contribution after your first. Let's imagine that you want to improve the installation chapter of the Symfony -book. In order to do those changes, follow these steps: +book. In order to make your changes, follow these steps: **Step 1.** Go to the official Symfony documentation repository located at `github.com/symfony/symfony-docs`_ and `fork the repository`_ to your personal @@ -58,7 +59,7 @@ Nowadays this is the ``2.3`` branch: $ cd symfony-docs/ $ git checkout 2.3 -If you were instead documenting a new feature, switch to the first Symfony +If you are instead documenting a new feature, switch to the first Symfony version which included it: ``2.5``, ``2.6``, etc. <<<<<<< HEAD @@ -88,15 +89,15 @@ doc:`/contributing/documentation/standards`. >>>>>>> Revamped the documentation about "Contributing Docs" $ git commit book/installation.rst - $ git push + $ git push origin improve_install_chapter **Step 7.** Everything is now ready to initiate a **pull request**. Go to your forked repository at ``https//github.com//symfony-docs`` -and click on the ``Pull Requests`` link located at the sidebar. +and click on the ``Pull Requests`` link located in the sidebar. Then, click on the big ``New pull request`` button. As GitHub cannot guess the exact changes that you want to propose, select the appropriate branches where -changes should be applied: +changes should be applied:Āŗ .. image:: /images/docs-pull-request-change-base.png :align: center @@ -105,10 +106,10 @@ In this example, the **base repository** should be ``symfony/symfony-docs`` and the **base branch** should be the ``2.3``, which is the branch that you selected to base your changes on. The **compare repository** should be your forked copy of ``symfony-docs`` and the **compare branch** should be ``improve_install_chapter``, -which is the name that you selected to work on your changes. +which is the name of the branch you created and where you made your changes. **Step 8.** The last step is to prepare the **description** of the pull request. -To ensure that your work is reviewed quickly, you have to add the following table +To ensure that your work is reviewed quickly, please add the following table at the beginning of your pull request description: .. code-block:: text @@ -137,7 +138,7 @@ carefully review your work in short time and they will let you know about any required change. In case you need to add or modify anything, there is no need to create a new -pull request. Just make sure that you are in the correct branch, make your +pull request. Just make sure that you are on the correct branch, make your changes and push them: .. code-block:: bash @@ -167,18 +168,17 @@ The first contribution took some time because you had to fork the repository, learn how to write documentation, comply with the pull requests standards, etc. The second contribution will be much easier, except for one detail: given the furious update activity of the Symfony documentation repository, odds are that -your fork is now outdated comparing it with the official repository. +your fork is now out of date with the official repository. -Solving this problem requires to `sync your fork`_ with the original repository. -To do so, execute first this command to tell git which is the original repository -from which you created the fork: +Solving this problem requires you to `sync your fork`_ with the original repository. +To do this, execute this command first to tell git about the original repository: .. code-block:: bash $ cd projects/symfony-docs/ $ git remote add upstream https://github.com/symfony/symfony-docs.git -Now you can **sync your fork** executing the following command: +Now you can **sync your fork** by executing the following command: .. code-block:: bash @@ -196,7 +196,8 @@ tags would be removed from the new 2.5 branch. $ git merge upstream/master >>>>>>> Revamped the documentation about "Contributing Docs" -Now you can proceed following the same steps explained in the previous section: +Great! Now you can proceed by following the same steps explained in the previous +section: .. code-block:: bash @@ -222,8 +223,8 @@ Now you can proceed following the same steps explained in the previous section: # | Applies to | [Symfony version numbers this applies to] # | Fixed tickets | [comma separated list of tickets fixed by the PR] -Your second contribution is now completed, so **go and celebrate again!** -You will also see how your ranking improves in the list of +Your second contribution is now complete, so **go and celebrate again!** +You can also see how your ranking improves in the list of `Symfony Documentation Contributors`_. Your Next Documentation Contributions @@ -231,9 +232,9 @@ Your Next Documentation Contributions Now that you've made two contributions to the Symfony documentation, you are probably comfortable with all the Git-magic involved in the process. That's -why your next contributions would be much faster and easier. Here you can find -the complete steps to contribute to Symfony documentation, which you can use as -a **checklist**: +why your next contributions would be much faster. Here you can find the complete +steps to contribute to the Symfony documentation, which you can use as a +**checklist**: .. code-block:: bash @@ -273,8 +274,8 @@ You guessed right: after all this hard work, it's **time to celebrate again!** Frequently Asked Questions -------------------------- -Why Do my Changes so Long to Be Reviewed and/or Merged? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Why Do my Changes Take so Long to Be Reviewed and/or Merged? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please be patient. It can take up to several days before your pull request can be fully reviewed. After merging the changes, it could take again several hours @@ -301,7 +302,7 @@ What If I Want to Submit my Work without Fully Finishing It? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can do it. But please use one of these two prefixes to let reviewers know -which is the state of your work: +about the state of your work: * ``[WIP]`` (Work in Progress) is used when you are not yet finished with your pull request, but you would like it to be reviewed. The pull request won't @@ -312,14 +313,15 @@ which is the state of your work: will not be merged until it is merged in the core code (or closed if the change is rejected). -Would You Admit a Huge Pull Request with Lots of Changes? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Would You Accept a Huge Pull Request with Lots of Changes? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ First, make sure that the changes are somewhat related. Otherwise, please create separate pull requests. Anyway, before submitting a huge change, it's probably a good idea to open an issue in the Symfony Documentation repository to ask the managers if they agree with your proposed changes. Otherwise, they could refuse -your proposal after having made all the work and you would have wasted a lot of time. +your proposal after you put all that hard work into making the changes. We +definitely don't want you to waste your time! .. _`github.com/symfony/symfony-docs`: https://github.com/symfony/symfony-docs .. _reStructuredText: http://docutils.sourceforge.net/rst.html From 88210526e177502c8bf5d23eec0b1aa35db5189d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 5 Sep 2014 12:19:26 +0200 Subject: [PATCH 069/106] caution on `null` values in Expression constraint This adds a warning to the reference of the Expression constraint explaining that `null` values won't be validated in Symfony 2.4 and Symfony 2.5. --- reference/constraints/Expression.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index b6723ffc371..3bd90c6b0d7 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -217,6 +217,13 @@ more about the expression language syntax, see // ... } + .. caution:: + + In Symfony 2.4 and Symfony 2.5, if the property (e.g. ``isTechnicalPost``) + were ``null``, the expression would never be called and the value + would be seen as valid. To ensure that the value is not ``null``, + use the :doc:`NotNull constraint `. + For more information about the expression and what variables are available to you, see the :ref:`expression ` option details below. From e5ea1b1a4009e4ca314458c59020ed97175f831f Mon Sep 17 00:00:00 2001 From: Matthieu Auger Date: Mon, 15 Sep 2014 23:46:38 +0200 Subject: [PATCH 070/106] Move debug command to the debug namespace --- book/controller.rst | 7 +++++-- book/routing.rst | 9 ++++++--- book/service_container.rst | 11 +++++++---- book/testing.rst | 5 ++++- book/translation.rst | 15 +++++++++------ 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/book/controller.rst b/book/controller.rst index 17902efcf9e..f8b8cb0b41c 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -613,12 +613,15 @@ via the ``get()`` method. Here are several common services you might need:: $mailer = $this->get('mailer'); There are countless other services available and you are encouraged to define -your own. To list all available services, use the ``container:debug`` console +your own. To list all available services, use the ``debug:container`` console command: .. code-block:: bash - $ php app/console container:debug + $ php app/console debug:container + +.. versionadded:: 2.6 + Prior to Symfony 2.6, this command was called ``container:debug``. For more information, see the :doc:`/book/service_container` chapter. diff --git a/book/routing.rst b/book/routing.rst index 3b82cb3033a..69ce87f6429 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1192,12 +1192,15 @@ Visualizing & Debugging Routes While adding and customizing routes, it's helpful to be able to visualize and get detailed information about your routes. A great way to see every route -in your application is via the ``router:debug`` console command. Execute +in your application is via the ``debug:router`` console command. Execute the command by running the following from the root of your project. .. code-block:: bash - $ php app/console router:debug + $ php app/console debug:router + +.. versionadded:: 2.6 + Prior to Symfony 2.6, this command was called ``router:debug``. This command will print a helpful list of *all* the configured routes in your application: @@ -1216,7 +1219,7 @@ the route name after the command: .. code-block:: bash - $ php app/console router:debug article_show + $ php app/console debug:router article_show Likewise, if you want to test whether a URL matches a given route, you can use the ``router:match`` console command: diff --git a/book/service_container.rst b/book/service_container.rst index 34120f60ee7..f7b4808d7c7 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -1169,18 +1169,21 @@ console. To show all services and the class for each service, run: .. code-block:: bash - $ php app/console container:debug + $ php app/console debug:container + +.. versionadded:: 2.6 + Prior to Symfony 2.6, this command was called ``container:debug``. By default only public services are shown, but you can also view private services: .. code-block:: bash - $ php app/console container:debug --show-private + $ php app/console debug:container --show-private .. note:: If a private service is only used as an argument to just *one* other service, - it won't be displayed by the ``container:debug`` command, even when using + it won't be displayed by the ``debug:container`` command, even when using the ``--show-private`` option. See :ref:`Inline Private Services ` for more details. @@ -1189,7 +1192,7 @@ its id: .. code-block:: bash - $ php app/console container:debug my_mailer + $ php app/console debug:container my_mailer Learn more ---------- diff --git a/book/testing.rst b/book/testing.rst index f870ac58272..67c5f798f2b 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -459,7 +459,10 @@ injection container:: Be warned that this does not work if you insulate the client or if you use an HTTP layer. For a list of services available in your application, use the -``container:debug`` console task. +``debug:container`` console task. + +.. versionadded:: 2.6 + Prior to Symfony 2.6, this command was called ``container:debug``. .. tip:: diff --git a/book/translation.rst b/book/translation.rst index 8abe3c8da2c..63a98e8309b 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -662,10 +662,13 @@ Debugging Translations ---------------------- .. versionadded:: 2.5 - The ``translation:debug`` command was introduced in Symfony 2.5. + The ``debug:translation`` command was introduced in Symfony 2.5. + +.. versionadded:: 2.6 + Prior to Symfony 2.6, this command was called ``translation:debug``. When maintaining a bundle, you may use or remove the usage of a translation -message without updating all message catalogues. The ``translation:debug`` +message without updating all message catalogues. The ``debug:translation`` command helps you to find these missing or unused translation messages for a given locale. It shows you a table with the result when translating the message in the given locale and the result when the fallback would be used. @@ -774,7 +777,7 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run: .. code-block:: bash - $ php app/console translation:debug fr AcmeDemoBundle + $ php app/console debug:translation fr AcmeDemoBundle You will get this output: @@ -815,15 +818,15 @@ By default all domains are inspected, but it is possible to specify a single dom .. code-block:: bash - $ php app/console translation:debug en AcmeDemoBundle --domain=messages + $ php app/console debug:translation en AcmeDemoBundle --domain=messages When bundles have a lot of messages, it is useful to display only the unused or only the missing messages, by using the ``--only-unused`` or ``--only-missing`` switches: .. code-block:: bash - $ php app/console translation:debug en AcmeDemoBundle --only-unused - $ php app/console translation:debug en AcmeDemoBundle --only-missing + $ php app/console debug:translation en AcmeDemoBundle --only-unused + $ php app/console debug:translation en AcmeDemoBundle --only-missing Summary ------- From edd2f8d3e6e7a8cc33ce7064a50c54a30aa6eb67 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 15 Sep 2014 21:00:38 -0400 Subject: [PATCH 071/106] [#4166] Fixing small typo --- components/translation/custom_formats.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index a212b7b1910..cf2d899e4d7 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -21,7 +21,7 @@ message. A translation file would look like this: Creating a Custom Loader ------------------------ -To define a custom loader that is able to read this kind of files, you must create a +To define a custom loader that is able to read these kinds of files, you must create a new class that implements the :class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface`. The :method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load` From 28d10e2f3fc5d5173858501d6bbb47bcefd19970 Mon Sep 17 00:00:00 2001 From: burki94 Date: Fri, 12 Sep 2014 15:15:02 +0200 Subject: [PATCH 072/106] Cache needs be cleared The configuration is cached, so running assetic:dump before clearing the cache won't use the new configuration. --- cookbook/configuration/override_dir_structure.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index b3c275bcff1..c83e959dc32 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -147,9 +147,9 @@ file: 'read_from' => '%kernel.root_dir%/../../public_html', )); - Now you just need to dump the assets again and your application should + Now you just need to clear the cache and dump the assets again and your application should work: .. code-block:: bash - + $ php app/console cache:clear --env=prod $ php app/console assetic:dump --env=prod --no-debug From 3ad7d3c6abcb9e16f89dfda64d16e91ffd338cac Mon Sep 17 00:00:00 2001 From: burki94 Date: Tue, 16 Sep 2014 07:08:18 +0200 Subject: [PATCH 073/106] Update override_dir_structure.rst Added new line to make code-block work --- cookbook/configuration/override_dir_structure.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index c83e959dc32..957438871a4 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -151,5 +151,6 @@ file: work: .. code-block:: bash + $ php app/console cache:clear --env=prod $ php app/console assetic:dump --env=prod --no-debug From e1947af34a69645a1c0126f71c30b3f521039641 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 13:09:47 +0200 Subject: [PATCH 074/106] First draft of the bundle installation instructions --- cookbook/bundles/best_practices.rst | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 055e0bee5a7..5aeed8da238 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -268,6 +268,53 @@ semantic configuration described in the cookbook. If you are defining services, they should also be prefixed with the bundle alias. +Installation instructions +------------------------- + +In order to ease the installation process of third-party bundles, we propose +you to use the following standardized instructions in your ``README`` file: + +.. code-block:: + + Installation + ============ + + Step 1: Download the bundle + --------------------------- + + Use Composer to add the bundle as a new dependency of your project: + + .. code-block:: bash + + $ composer require "/:dev-master" + + This command requires to have installed Composer globally, as explained + `in the installation chapter `_ + of Composer documentation. + + Step 2: Enable the bundle + ------------------------- + + Then, enable the bundle adding the following line in the ``AppKernel`` class + of your project: + + .. code-block:: php + + \\(), + ); + } + + (optionally add *Step 3*, *Step 4*, etc. to explain other required + installation steps, such as registering routes or dumping assets) + Learn more from the Cookbook ---------------------------- From 8078bbe3e238bd94cb419fcfe9ac672b63942aea Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 17:52:17 +0200 Subject: [PATCH 075/106] Applied all the fixes and suggestions made by reviewers --- cookbook/bundles/best_practices.rst | 97 +++++++++++++++-------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 5aeed8da238..ce3b044a3e5 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -194,6 +194,56 @@ Extensive documentation should also be provided in the the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is the only mandatory file and must be the entry point for the documentation. +Installation instructions +~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to ease the installation process of third-party bundles, we propose +you to use the following standardized instructions in your ``README`` file. + +.. sidebar:: Bundle Instructions Template + + .. raw:: rst + + Installation + ============ + + Step 1: Download the Bundle + --------------------------- + + Use Composer to add the bundle as a new dependency of your project: + + .. code-block:: bash + + $ composer require "/:dev-master" + + This command requires to have installed Composer globally, as explained + `in the installation chapter `_ + of Composer documentation. + + Step 2: Enable the Bundle + ------------------------- + + Then, enable the bundle adding the following line in the ``AppKernel`` + class of your project: + + .. code-block:: php + + \\(), + ); + } + + (optionally add *Step 3*, *Step 4*, etc. to explain other required + installation steps, such as registering routes or dumping assets) + + Routing ------- @@ -268,53 +318,6 @@ semantic configuration described in the cookbook. If you are defining services, they should also be prefixed with the bundle alias. -Installation instructions -------------------------- - -In order to ease the installation process of third-party bundles, we propose -you to use the following standardized instructions in your ``README`` file: - -.. code-block:: - - Installation - ============ - - Step 1: Download the bundle - --------------------------- - - Use Composer to add the bundle as a new dependency of your project: - - .. code-block:: bash - - $ composer require "/:dev-master" - - This command requires to have installed Composer globally, as explained - `in the installation chapter `_ - of Composer documentation. - - Step 2: Enable the bundle - ------------------------- - - Then, enable the bundle adding the following line in the ``AppKernel`` class - of your project: - - .. code-block:: php - - \\(), - ); - } - - (optionally add *Step 3*, *Step 4*, etc. to explain other required - installation steps, such as registering routes or dumping assets) - Learn more from the Cookbook ---------------------------- From 5a95d43d0dcbf836d3c71687d2c889afdf2d877c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 17:54:00 +0200 Subject: [PATCH 076/106] Fixed minor typo --- cookbook/bundles/best_practices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index ce3b044a3e5..9b3d11f4a6a 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -200,7 +200,7 @@ Installation instructions In order to ease the installation process of third-party bundles, we propose you to use the following standardized instructions in your ``README`` file. -.. sidebar:: Bundle Instructions Template +.. sidebar:: Installation Instructions Template .. raw:: rst From b285fac5478912a3f774fefec8b68e6429e35877 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 18:17:42 +0200 Subject: [PATCH 077/106] More improvements based on reviewers' comments --- cookbook/bundles/best_practices.rst | 41 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 9b3d11f4a6a..fee75b9d816 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -202,7 +202,10 @@ you to use the following standardized instructions in your ``README`` file. .. sidebar:: Installation Instructions Template - .. raw:: rst + This template assumes that your bundle is in its ``1.x`` version. If not, + change the ``"~1"`` installation version accordingly (e.g. ``"~2"``). + + .. raw:: md Installation ============ @@ -212,36 +215,36 @@ you to use the following standardized instructions in your ``README`` file. Use Composer to add the bundle as a new dependency of your project: - .. code-block:: bash - - $ composer require "/:dev-master" + ``` + $ composer require "~1" + ``` This command requires to have installed Composer globally, as explained - `in the installation chapter `_ + in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of Composer documentation. Step 2: Enable the Bundle ------------------------- - Then, enable the bundle adding the following line in the ``AppKernel`` + Then, enable the bundle adding the following line in the `AppKernel` class of your project: - .. code-block:: php - - \\(), - ); - } + new \\(), + ); + } + ``` - (optionally add *Step 3*, *Step 4*, etc. to explain other required - installation steps, such as registering routes or dumping assets) + Optionally you can add *Step 3*, *Step 4*, etc. to explain other required + installation steps, such as registering routes or dumping assets. Routing From c0d447c89961af3f992fb90ee9fd021463a4df45 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 20:36:33 +0200 Subject: [PATCH 078/106] Fixed some code formatting --- cookbook/bundles/best_practices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index fee75b9d816..593012a38e3 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -198,14 +198,14 @@ Installation instructions ~~~~~~~~~~~~~~~~~~~~~~~~~ In order to ease the installation process of third-party bundles, we propose -you to use the following standardized instructions in your ``README`` file. +you to use the following standardized instructions in your ``README.md`` file. .. sidebar:: Installation Instructions Template This template assumes that your bundle is in its ``1.x`` version. If not, change the ``"~1"`` installation version accordingly (e.g. ``"~2"``). - .. raw:: md + .. code-block:: text Installation ============ From 242d4106f04e88d999ce5525df1de4c2c476b929 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 21:56:19 +0200 Subject: [PATCH 079/106] Removed the first person perspective and other minor fixes --- cookbook/bundles/best_practices.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 593012a38e3..fd1f5ba973d 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -194,11 +194,11 @@ Extensive documentation should also be provided in the the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is the only mandatory file and must be the entry point for the documentation. -Installation instructions +Installation Instructions ~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to ease the installation process of third-party bundles, we propose -you to use the following standardized instructions in your ``README.md`` file. +In order to ease the installation process of third-party bundles, consider using +the following standardized instructions in your ``README.md`` file. .. sidebar:: Installation Instructions Template From 376f0092b380afbdfc515824062e1100dda223b8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Aug 2014 22:02:59 +0200 Subject: [PATCH 080/106] More tweaks and fixes --- cookbook/bundles/best_practices.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index fd1f5ba973d..0072fa2b5f5 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -219,7 +219,7 @@ the following standardized instructions in your ``README.md`` file. $ composer require "~1" ``` - This command requires to have installed Composer globally, as explained + This command requires to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of Composer documentation. @@ -233,17 +233,18 @@ the following standardized instructions in your ``README.md`` file. \\(), ); } ``` - Optionally you can add *Step 3*, *Step 4*, etc. to explain other required + Optionally, you can add *Step 3*, *Step 4*, etc. to explain other required installation steps, such as registering routes or dumping assets. From aca99bb2c89517fac4fc1b774d7dc39ea106a06d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 23 Aug 2014 10:57:48 +0200 Subject: [PATCH 081/106] Minor fixes and tweaks --- cookbook/bundles/best_practices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 0072fa2b5f5..736733a3204 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -215,7 +215,7 @@ the following standardized instructions in your ``README.md`` file. Use Composer to add the bundle as a new dependency of your project: - ``` + ```bash $ composer require "~1" ``` @@ -239,7 +239,7 @@ the following standardized instructions in your ``README.md`` file. { $bundles = array( // ... - new \\(), + return new \\(), ); } ``` From ae1c12d30fe85c9978425172b66507e52b5e4876 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 23 Aug 2014 12:15:17 +0200 Subject: [PATCH 082/106] Removed the sidebar and made some minor tweaks --- cookbook/bundles/best_practices.rst | 72 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 736733a3204..7ac545dfc43 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -197,56 +197,54 @@ the only mandatory file and must be the entry point for the documentation. Installation Instructions ~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to ease the installation process of third-party bundles, consider using -the following standardized instructions in your ``README.md`` file. +In order to ease the installation of third-party bundles, consider using the +following standardized instructions in your ``README.md`` file. -.. sidebar:: Installation Instructions Template - - This template assumes that your bundle is in its ``1.x`` version. If not, - change the ``"~1"`` installation version accordingly (e.g. ``"~2"``). - - .. code-block:: text +.. code-block:: text - Installation - ============ + Installation + ============ - Step 1: Download the Bundle - --------------------------- + Step 1: Download the Bundle + --------------------------- - Use Composer to add the bundle as a new dependency of your project: + Use Composer to add the bundle as a new dependency of your project: - ```bash - $ composer require "~1" - ``` + ```bash + $ composer require "~1" + ``` - This command requires to have Composer installed globally, as explained - in the [installation chapter](https://getcomposer.org/doc/00-intro.md) - of Composer documentation. + This command requires to have Composer installed globally, as explained + in the [installation chapter](https://getcomposer.org/doc/00-intro.md) + of Composer documentation. - Step 2: Enable the Bundle - ------------------------- + Step 2: Enable the Bundle + ------------------------- - Then, enable the bundle adding the following line in the `AppKernel` - class of your project: + Then, enable the bundle adding the following line in the `AppKernel` + class of your project: - ```php - \\(), - ); - } - ``` + public function registerBundles() + { + $bundles = array( + // ... + return new \\(), + ); + } + ``` - Optionally, you can add *Step 3*, *Step 4*, etc. to explain other required - installation steps, such as registering routes or dumping assets. +This template assumes that your bundle is in its ``1.x`` version. If not, change +the ``"~1"`` installation version accordingly (``"~2"``, ``"~3"``, etc.) +Optionally, you can add more installation steps (*Step 3*, *Step 4*, etc.) to +explain other required installation tasks, such as registering routes or +dumping assets. Routing ------- From 7769b894dd266ecd07f5759afc820e5fcf13ae27 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 23 Aug 2014 12:29:14 +0200 Subject: [PATCH 083/106] Reworded a bit the installation instructions --- cookbook/bundles/best_practices.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 7ac545dfc43..97c70987952 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -208,7 +208,8 @@ following standardized instructions in your ``README.md`` file. Step 1: Download the Bundle --------------------------- - Use Composer to add the bundle as a new dependency of your project: + Open a command console, enter your project directory and execute the + following command to download the latest stable version of this bundle: ```bash $ composer require "~1" From 45d0e0080698c18467fb0a24897f9eecfba85c6c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 27 Aug 2014 16:11:18 +0200 Subject: [PATCH 084/106] Added the fixes suggested by Ryan --- cookbook/bundles/best_practices.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 97c70987952..51465b9d15a 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -215,15 +215,15 @@ following standardized instructions in your ``README.md`` file. $ composer require "~1" ``` - This command requires to have Composer installed globally, as explained + This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) - of Composer documentation. + of the Composer documentation. Step 2: Enable the Bundle ------------------------- - Then, enable the bundle adding the following line in the `AppKernel` - class of your project: + Then, enable the bundle by adding the following line in the `app/AppKernel.php` + file of your project: ```php Date: Mon, 8 Sep 2014 14:44:58 -0700 Subject: [PATCH 085/106] Handle "constraints" option in form unit testing In the current documentation, although a mocked `ValidatorInterface` is being passed to the `FormTypeValidatorExtension`, the actual `validate()` method in it is returning null. This causes any test against a form type that utilizes the extension's `constraints` option to fail, because of the following code in `Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener`: ```php // Validate the form in group "Default" $violations = $this->validator->validate($form); foreach ($violations as $violation) { // Allow the "invalid" constraint to be put onto // non-synchronized forms $allowNonSynchronized = Form::ERR_INVALID === $violation->getCode(); $this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized); } ``` Note the `foreach` loop that is expecting an array. Since the documentation uses the `ValidatorExtension` as a specific example, I think it would be nice for the example code to handle this case, preventing the user from having to dig deeper into the code to discover the problem. --- cookbook/form/unit_testing.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbook/form/unit_testing.rst b/cookbook/form/unit_testing.rst index 7a9100fda29..e3595367fdb 100644 --- a/cookbook/form/unit_testing.rst +++ b/cookbook/form/unit_testing.rst @@ -183,12 +183,15 @@ on other extensions. You need add those extensions to the factory object:: protected function setUp() { parent::setUp(); + + $validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface'); + $validator->method('validate')->will($this->returnValue(array())); $this->factory = Forms::createFormFactoryBuilder() ->addExtensions($this->getExtensions()) ->addTypeExtension( new FormTypeValidatorExtension( - $this->getMock('Symfony\Component\Validator\ValidatorInterface') + $validator ) ) ->addTypeGuesser( From 69f77cdeced8463f4ca5fb9e8c99e7ceaefe3f16 Mon Sep 17 00:00:00 2001 From: Shane Archer Date: Mon, 8 Sep 2014 16:43:06 -0700 Subject: [PATCH 086/106] Fixed return value Replaced `array()` with `new ConstraintViolationList()`. --- cookbook/form/unit_testing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/form/unit_testing.rst b/cookbook/form/unit_testing.rst index e3595367fdb..944ed25b372 100644 --- a/cookbook/form/unit_testing.rst +++ b/cookbook/form/unit_testing.rst @@ -177,6 +177,7 @@ on other extensions. You need add those extensions to the factory object:: use Symfony\Component\Form\Forms; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; + use Symfony\Component\Validator\ConstraintViolationList; class TestedTypeTest extends TypeTestCase { @@ -185,7 +186,7 @@ on other extensions. You need add those extensions to the factory object:: parent::setUp(); $validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface'); - $validator->method('validate')->will($this->returnValue(array())); + $validator->method('validate')->will($this->returnValue(new ConstraintViolationList())); $this->factory = Forms::createFormFactoryBuilder() ->addExtensions($this->getExtensions()) From 396f94fd58f525eec312dd8c2adeb87cd1422aab Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 16 Sep 2014 22:49:25 +0200 Subject: [PATCH 087/106] fix ContainerAwareEventDispatcher definition --- components/event_dispatcher/introduction.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 23a74e338ab..39e6c42b345 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -208,6 +208,8 @@ instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``:: .. sidebar:: Registering Event Listeners in the Service Container When you are using the + :class:`Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher` + and the :doc:`DependencyInjection component `, you can use the :class:`Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterListenersPass` @@ -216,16 +218,17 @@ instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``:: use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass; $containerBuilder = new ContainerBuilder(new ParameterBag()); $containerBuilder->addCompilerPass(new RegisterListenersPass()); // register the event dispatcher service - $containerBuilder->register( - 'event_dispatcher', - 'Symfony\Component\EventDispatcher\EventDispatcher' - ); + $containerBuilder->setDefinition('event_dispatcher', new Definition( + 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher', + array(new Reference('service_container')) + )); // register your event listener service $listener = new Definition('AcmeListener'); From 511c41841b5af325acdecc67574562d813fcfa9b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 18 Sep 2014 00:27:58 +0200 Subject: [PATCH 088/106] link translation DIC tags to components section The `translation.loader` and `translation.dumper` DIC tags link to the respective sections in the Translation component documentation. --- components/translation/custom_formats.rst | 4 +++ reference/dic_tags.rst | 33 +++++++---------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/components/translation/custom_formats.rst b/components/translation/custom_formats.rst index cf2d899e4d7..4378d249f86 100644 --- a/components/translation/custom_formats.rst +++ b/components/translation/custom_formats.rst @@ -18,6 +18,8 @@ message. A translation file would look like this: (goodbye)(au revoir) (hello)(bonjour) +.. _components-translation-custom-loader: + Creating a Custom Loader ------------------------ @@ -65,6 +67,8 @@ Once created, it can be used as any other loader:: It will print *"accueil"*. +.. _components-translation-custom-dumper: + Creating a Custom Dumper ------------------------ diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index a3788e8d94a..0cd97bff55e 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -1040,32 +1040,12 @@ translation.loader **Purpose**: To register a custom service that loads translations By default, translations are loaded from the filesystem in a variety of different -formats (YAML, XLIFF, PHP, etc). If you need to load translations from some -other source, first create a class that implements the -:class:`Symfony\\Component\\Translation\\Loader\\LoaderInterface` interface:: +formats (YAML, XLIFF, PHP, etc). - // src/Acme/MainBundle/Translation/MyCustomLoader.php - namespace Acme\MainBundle\Translation; - - use Symfony\Component\Translation\Loader\LoaderInterface; - use Symfony\Component\Translation\MessageCatalogue; - - class MyCustomLoader implements LoaderInterface - { - public function load($resource, $locale, $domain = 'messages') - { - $catalogue = new MessageCatalogue($locale); - - // some how load up some translations from the "resource" - // then set them into the catalogue - $catalogue->set('hello.world', 'Hello World!', $domain); - - return $catalogue; - } - } +.. seealso:: -Your custom loader's ``load`` method is responsible for returning a -:Class:`Symfony\\Component\\Translation\\MessageCatalogue`. + Learn how to :ref:`load custom formats ` + in the components section. Now, register your loader as a service and tag it with ``translation.loader``: @@ -1257,6 +1237,11 @@ This is the name that's used to determine which dumper should be used. ) ->addTag('translation.dumper', array('alias' => 'json')); +.. seealso:: + + Learn how to :ref:`dump to custom formats ` + in the components section. + .. _reference-dic-tags-twig-extension: twig.extension From ff157a46367a8be62b215a3837bd24c443b7217b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 13:42:54 +0200 Subject: [PATCH 089/106] provide node path on configuration If you no provide node path in assetic configuration, UglifyCssFilter throw a `RuntimeException: Path to node executable could not be resolved.` --- cookbook/assetic/uglifyjs.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 05d378b43d7..7498ea53c23 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -66,6 +66,7 @@ your JavaScripts: # app/config/config.yml assetic: + node: /usr/bin/nodejs filters: uglifyjs2: # the path to the uglifyjs executable From 36e9741a3ae66357a0cf7deb36a855dd9e708330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 15:49:54 +0200 Subject: [PATCH 090/106] Update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 7498ea53c23..431da7f9072 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -112,6 +112,34 @@ your JavaScripts: You now have access to the ``uglifyjs2`` filter in your application. +Configure the ``node binary`` +---------------------------------- + +he name of the binary is node you can skip this section. + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + assetic: + # the path to the node executable + node: /usr/bin/nodejs + + .. code-block:: xml + + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('assetic', array( + 'node' => '/usr/bin/nodejs', + )); + Minify your Assets ------------------ From 48b3194ea43ee6ff596ec852a4d14c211fba516c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Thu, 18 Sep 2014 15:52:31 +0200 Subject: [PATCH 091/106] Update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 431da7f9072..b100a4e0029 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -66,7 +66,6 @@ your JavaScripts: # app/config/config.yml assetic: - node: /usr/bin/nodejs filters: uglifyjs2: # the path to the uglifyjs executable From aa4c827fc388a838f0909f0db6d93b14c2e5004e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cervi=C3=B1o?= Date: Thu, 18 Sep 2014 16:08:38 +0200 Subject: [PATCH 092/106] update uglifyjs.rst --- cookbook/assetic/uglifyjs.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index b100a4e0029..5bf1b2cf996 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -111,10 +111,11 @@ your JavaScripts: You now have access to the ``uglifyjs2`` filter in your application. -Configure the ``node binary`` ----------------------------------- +Configure the ``node`` Binary +----------------------------- -he name of the binary is node you can skip this section. +Assetic tries to find the node binary automatically. If it cannot be found, you'll +be able to configure its location using the ``node`` key: .. configuration-block:: @@ -124,12 +125,19 @@ he name of the binary is node you can skip this section. assetic: # the path to the node executable node: /usr/bin/nodejs + filters: + uglifyjs2: + # the path to the uglifyjs executable + bin: /usr/local/bin/uglifyjs .. code-block:: xml + node="/usr/bin/nodejs" > + .. code-block:: php @@ -137,6 +145,10 @@ he name of the binary is node you can skip this section. // app/config/config.php $container->loadFromExtension('assetic', array( 'node' => '/usr/bin/nodejs', + 'uglifyjs2' => array( + // the path to the uglifyjs executable + 'bin' => '/usr/local/bin/uglifyjs', + ), )); Minify your Assets From 621a6c18d642c8c56a0a81ffa41f183e716f3f8d Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Thu, 18 Sep 2014 10:31:30 -0400 Subject: [PATCH 093/106] [#4249] Tiny tweak to language --- cookbook/assetic/uglifyjs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/assetic/uglifyjs.rst b/cookbook/assetic/uglifyjs.rst index 5bf1b2cf996..64d76c0a0f8 100644 --- a/cookbook/assetic/uglifyjs.rst +++ b/cookbook/assetic/uglifyjs.rst @@ -114,8 +114,8 @@ You now have access to the ``uglifyjs2`` filter in your application. Configure the ``node`` Binary ----------------------------- -Assetic tries to find the node binary automatically. If it cannot be found, you'll -be able to configure its location using the ``node`` key: +Assetic tries to find the node binary automatically. If it cannot be found, you +can configure its location using the ``node`` key: .. configuration-block:: From a86977c26b7e13ce47e6bcbaa59bb8ed7e8858c3 Mon Sep 17 00:00:00 2001 From: Vladimir Jimenez Date: Fri, 19 Sep 2014 08:09:25 -0700 Subject: [PATCH 094/106] Removed unnecessary comma --- cookbook/security/entity_provider.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index ae32cc78a4c..c2994ae7fd8 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -367,7 +367,7 @@ fetch the user from the database before checking the password validity. .. note:: By default, the entity provider uses the default entity manager to fetch - user information from the database. If you, + user information from the database. If you :doc:`use multiple entity managers `, you can specify which manager to use with the ``manager_name`` option: From 37f5010c136d5e3b0bf00761ddb0c69e5343a208 Mon Sep 17 00:00:00 2001 From: Ha!*!*y Date: Mon, 9 Jun 2014 19:45:11 -0700 Subject: [PATCH 095/106] Update remove.rst Add note about removing web/bundles/acmedemo directory --- cookbook/bundles/remove.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index 0a814d70d40..b8807bd0361 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -73,6 +73,12 @@ should remove the bundle from the filesystem. The bundle is located in the ``src/Acme/DemoBundle`` directory. You should remove this directory and you can remove the ``Acme`` directory as well. +3.1 Remove bundle resources +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Remove the Acme resource directory from the applications web folder. It can be found in ``web/bundles/acmedemo``. + + .. tip:: If you don't know the location of a bundle, you can use the From d6d4bcc538c58b6ae44495cce856efe6380ea4ec Mon Sep 17 00:00:00 2001 From: Ha!*!*y Date: Wed, 11 Jun 2014 00:00:04 -0700 Subject: [PATCH 096/106] Update remove.rst --- cookbook/bundles/remove.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index b8807bd0361..d34be404880 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -73,12 +73,6 @@ should remove the bundle from the filesystem. The bundle is located in the ``src/Acme/DemoBundle`` directory. You should remove this directory and you can remove the ``Acme`` directory as well. -3.1 Remove bundle resources -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Remove the Acme resource directory from the applications web folder. It can be found in ``web/bundles/acmedemo``. - - .. tip:: If you don't know the location of a bundle, you can use the @@ -87,6 +81,11 @@ Remove the Acme resource directory from the applications web folder. It can be f echo $this->container->get('kernel')->getBundle('AcmeDemoBundle')->getPath(); +3.1 Remove bundle resources +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Remove the Acme resource directory from the application's web folder. It can be found in ``web/bundles/acmedemo``. + 4. Remove Integration in other Bundles -------------------------------------- From 39f14b25f1d09b2449bc3085d08cf5cec67be61e Mon Sep 17 00:00:00 2001 From: Ha!*!*y Date: Wed, 11 Jun 2014 00:01:28 -0700 Subject: [PATCH 097/106] Update remove.rst --- cookbook/bundles/remove.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index d34be404880..9ba95fee76d 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -81,7 +81,7 @@ can remove the ``Acme`` directory as well. echo $this->container->get('kernel')->getBundle('AcmeDemoBundle')->getPath(); -3.1 Remove bundle resources +3.1 Remove Bundle Resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove the Acme resource directory from the application's web folder. It can be found in ``web/bundles/acmedemo``. From c785b83e375288f5bed27db9e9d894259d0c9a65 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 16 Sep 2014 15:37:44 +0200 Subject: [PATCH 098/106] Applied comments --- cookbook/bundles/remove.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index 9ba95fee76d..f289ecd144c 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -81,10 +81,11 @@ can remove the ``Acme`` directory as well. echo $this->container->get('kernel')->getBundle('AcmeDemoBundle')->getPath(); -3.1 Remove Bundle Resources -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +3.1 Remove Bundle Assets +~~~~~~~~~~~~~~~~~~~~~~~~ -Remove the Acme resource directory from the application's web folder. It can be found in ``web/bundles/acmedemo``. +Remove the assets of the bundle in the web/ directory (e.g. +``web/bundles/acmedemo`` for the AcmeDemoBundle). 4. Remove Integration in other Bundles -------------------------------------- From 4f14285e1acd2d1a1433ade95f06c196ea00bbe0 Mon Sep 17 00:00:00 2001 From: thewilkybarkid Date: Tue, 16 Sep 2014 19:47:58 +0100 Subject: [PATCH 099/106] Remove redundant references to trusting HttpCache --- book/http_cache.rst | 4 ---- components/http_foundation/trusting_proxies.rst | 6 ------ cookbook/request/load_balancer_reverse_proxy.rst | 6 ------ 3 files changed, 16 deletions(-) diff --git a/book/http_cache.rst b/book/http_cache.rst index 766f9303a9d..778fc287f7b 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -163,10 +163,6 @@ kernel:: The caching kernel will immediately act as a reverse proxy - caching responses from your application and returning them to the client. -Now that you're using a "proxy", you'll need to configure ``127.0.0.1`` under -the ``trusted_proxies`` configuration (see :ref:`the reference `). -Without this, the client's IP address and a few other things won't report correctly. - .. tip:: The cache kernel has a special ``getLog()`` method that returns a string diff --git a/components/http_foundation/trusting_proxies.rst b/components/http_foundation/trusting_proxies.rst index dc126617e5e..fbe9b30cdee 100644 --- a/components/http_foundation/trusting_proxies.rst +++ b/components/http_foundation/trusting_proxies.rst @@ -30,12 +30,6 @@ your proxy. // only trust proxy headers coming from this IP addresses Request::setTrustedProxies(array('192.0.0.1', '10.0.0.0/8')); -.. note:: - - When using Symfony's internal reverse proxy (``AppCache.php``) make sure to add - ``127.0.0.1`` to the list of trusted proxies. - - Configuring Header Names ------------------------ diff --git a/cookbook/request/load_balancer_reverse_proxy.rst b/cookbook/request/load_balancer_reverse_proxy.rst index 324cbd12838..e23e0ac01c2 100644 --- a/cookbook/request/load_balancer_reverse_proxy.rst +++ b/cookbook/request/load_balancer_reverse_proxy.rst @@ -11,12 +11,6 @@ special ``X-Forwarded-*`` headers. For example, instead of reading the ``REMOTE_ header (which will now be the IP address of your reverse proxy), the user's true IP will be stored in an ``X-Forwarded-For`` header. -.. tip:: - - If you're using Symfony's :ref:`AppCache` for caching, - then you *are* using a reverse proxy with the IP address ``127.0.0.1``. - You'll need to configure that address as a trusted proxy below. - If you don't configure Symfony to look for these headers, you'll get incorrect information about the client's IP address, whether or not the client is connecting via HTTPS, the client's port and the hostname being requested. From 61e1245636d356088c897bf5684b1a84d762c193 Mon Sep 17 00:00:00 2001 From: Denis Togbe Date: Fri, 11 Jul 2014 12:08:50 +0200 Subject: [PATCH 100/106] Clarify that route defaults don't need a placeholder --- book/routing.rst | 4 ++ cookbook/map.rst.inc | 1 + cookbook/routing/extra_information.rst | 63 ++++++++++++++++++++++++++ cookbook/routing/index.rst | 1 + 4 files changed, 69 insertions(+) create mode 100644 cookbook/routing/extra_information.rst diff --git a/book/routing.rst b/book/routing.rst index 69ce87f6429..434f13840f2 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1032,6 +1032,10 @@ see :ref:`route-parameters-controller-arguments`. You can also use a special ``$_route`` variable, which is set to the name of the route that was matched. +You can even add extra information to your route definition and access it +within your controller. For more information on this topic, +see :doc:`/cookbook/routing/extra_information`. + .. index:: single: Routing; Importing routing resources diff --git a/cookbook/map.rst.inc b/cookbook/map.rst.inc index 539c1217538..24a0cd78371 100644 --- a/cookbook/map.rst.inc +++ b/cookbook/map.rst.inc @@ -134,6 +134,7 @@ * :doc:`/cookbook/routing/service_container_parameters` * :doc:`/cookbook/routing/custom_route_loader` * :doc:`/cookbook/routing/redirect_trailing_slash` + * :doc:`/cookbook/routing/extra_information` * :doc:`/cookbook/security/index` diff --git a/cookbook/routing/extra_information.rst b/cookbook/routing/extra_information.rst new file mode 100644 index 00000000000..c2b29421219 --- /dev/null +++ b/cookbook/routing/extra_information.rst @@ -0,0 +1,63 @@ +.. index:: + single: Routing; Extra Information + +How to Pass Extra Information from a Route to a Controller +========================================================== + +Parameters inside the ``defaults`` collection don't necessarily have to +match a placeholder in the route ``path``. In fact, you can use the +``defaults`` array to specify extra parameters that will then be accessible as +arguments to your controller: + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/routing.yml + blog: + path: /blog/{page} + defaults: + _controller: AcmeBlogBundle:Blog:index + page: 1 + title: "Hello world!" + + .. code-block:: xml + + + + + + + AcmeBlogBundle:Blog:index + 1 + Hello world! + + + + .. code-block:: php + + // app/config/routing.php + use Symfony\Component\Routing\RouteCollection; + use Symfony\Component\Routing\Route; + + $collection = new RouteCollection(); + $collection->add('blog', new Route('/blog/{page}', array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'page' => 1, + 'title' => 'Hello world!', + ))); + + return $collection; + +Now, you can access this extra parameter in your controller:: + + public function indexAction($page, $title) + { + // ... + } + +As you can see, the ``$title`` variable was never defined inside the route path, +but you can still access its value from inside your controller. diff --git a/cookbook/routing/index.rst b/cookbook/routing/index.rst index 526839e77c5..c42cff1748d 100644 --- a/cookbook/routing/index.rst +++ b/cookbook/routing/index.rst @@ -11,3 +11,4 @@ Routing service_container_parameters custom_route_loader redirect_trailing_slash + extra_information From 984b46e294924a35ef93cebf7fac99840cb28c1a Mon Sep 17 00:00:00 2001 From: Stefano Sala Date: Mon, 7 Jul 2014 14:47:02 +0200 Subject: [PATCH 101/106] [Twig][Form] Moved twig.form.resources to a higher level --- cookbook/form/form_customization.rst | 28 +++++++++------------------ reference/configuration/twig.rst | 29 +++++++++++++++------------- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 64db0441321..78f2a15170f 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -455,18 +455,15 @@ form is rendered. # app/config/config.yml twig: - form: - resources: - - 'AcmeDemoBundle:Form:fields.html.twig' + form_themes: + - 'AcmeDemoBundle:Form:fields.html.twig' # ... .. code-block:: xml - - AcmeDemoBundle:Form:fields.html.twig - + AcmeDemoBundle:Form:fields.html.twig @@ -474,10 +471,8 @@ form is rendered. // app/config/config.php $container->loadFromExtension('twig', array( - 'form' => array( - 'resources' => array( - 'AcmeDemoBundle:Form:fields.html.twig', - ), + 'form_themes' => array( + 'AcmeDemoBundle:Form:fields.html.twig', ), // ... @@ -493,17 +488,14 @@ resource to use such a layout: # app/config/config.yml twig: - form: - resources: ['form_table_layout.html.twig'] + form_themes: ['form_table_layout.html.twig'] # ... .. code-block:: xml - - form_table_layout.html.twig - + form_table_layout.html.twig @@ -511,10 +503,8 @@ resource to use such a layout: // app/config/config.php $container->loadFromExtension('twig', array( - 'form' => array( - 'resources' => array( - 'form_table_layout.html.twig', - ), + 'form_themes' => array( + 'form_table_layout.html.twig', ), // ... diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index cdb3de3bd00..cd121710277 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -10,14 +10,13 @@ TwigBundle Configuration ("twig") twig: exception_controller: twig.controller.exception:showAction - form: - resources: + form_themes: - # Default: - - form_div_layout.html.twig + # Default: + - form_div_layout.html.twig - # Example: - - MyBundle::form.html.twig + # Example: + - MyBundle::form.html.twig globals: # Examples: @@ -54,9 +53,8 @@ TwigBundle Configuration ("twig") http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/doctrine/twig-1.0.xsd"> - - MyBundle::form.html.twig - + form_div_layout.html.twig + MyBundle::form.html.twig 3.14 @@ -65,10 +63,9 @@ TwigBundle Configuration ("twig") .. code-block:: php $container->loadFromExtension('twig', array( - 'form' => array( - 'resources' => array( - 'MyBundle::form.html.twig', - ) + 'form_themes' => array( + 'form_div_layout.html.twig', // Default + 'MyBundle::form.html.twig', ), 'globals' => array( 'foo' => '@bar', @@ -83,6 +80,12 @@ TwigBundle Configuration ("twig") 'strict_variables' => false, )); +.. caution:: + + The ``twig.form`` (```` tag for xml) configuration key + has been deprecated and will be removed in 3.0. Instead, use the ``twig.form_themes`` + option. + Configuration ------------- From 2e1488e4135775295fb17c5e76944c50423123db Mon Sep 17 00:00:00 2001 From: daFish Date: Thu, 29 Nov 2012 16:25:30 +0100 Subject: [PATCH 102/106] Created paragraph for prototype customization. --- cookbook/form/form_collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 9571ab4b551..7fba05b6aae 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -729,7 +729,7 @@ the relationship between the removed ``Tag`` and ``Task`` object. updated (whether you're adding new tags or removing existing tags) on each Tag object itself. -.. _cookbook-form-collections-custom-prototype: +.. _cookbook-form-collections-custom-prototype Render a custom prototype ------------------------- From 4590c01d9a41a700d438fce1f5402652da3976b6 Mon Sep 17 00:00:00 2001 From: daFish Date: Thu, 29 Nov 2012 16:48:42 +0100 Subject: [PATCH 103/106] Added twig-syntax for data-prototype. --- cookbook/form/form_collections.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 7fba05b6aae..f2f5fd128a7 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -803,5 +803,10 @@ contents of the collection when it already holds items: This makes sure the displayed items are the same as the newly inserted from the prototype. +But if you are in the situation were you need to have a complete custom prototype you can render it yourself: + + .. code-block:: html+jinja + data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" + .. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html .. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From 11e38cc02056e23c112d80b65c99253ce5b3ce7c Mon Sep 17 00:00:00 2001 From: daFish Date: Mon, 3 Dec 2012 15:33:31 +0100 Subject: [PATCH 104/106] Added reusing of prototype template for displaying items from collection. --- cookbook/form/form_collections.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index f2f5fd128a7..c0a06ebc55d 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -805,8 +805,18 @@ from the prototype. But if you are in the situation were you need to have a complete custom prototype you can render it yourself: - .. code-block:: html+jinja - data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" +.. code-block:: html+jinja + data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" + +The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can +also use this markup to render the contents of the collection when it already holds items: + +.. code-block:: html+jinja + {% for task in tasks %} + {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %} + {% endfor %} + +This makes sure the displayed items are the same as the newly inserted from the prototype. .. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html .. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From a3147d285eee80979be4aa206b6019d9b0033783 Mon Sep 17 00:00:00 2001 From: daFish Date: Mon, 3 Dec 2012 15:38:07 +0100 Subject: [PATCH 105/106] Formatting. --- cookbook/form/form_collections.rst | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index c0a06ebc55d..7fba05b6aae 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -803,20 +803,5 @@ contents of the collection when it already holds items: This makes sure the displayed items are the same as the newly inserted from the prototype. -But if you are in the situation were you need to have a complete custom prototype you can render it yourself: - -.. code-block:: html+jinja - data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}" - -The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can -also use this markup to render the contents of the collection when it already holds items: - -.. code-block:: html+jinja - {% for task in tasks %} - {% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %} - {% endfor %} - -This makes sure the displayed items are the same as the newly inserted from the prototype. - .. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html .. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ From ee3fc2983a220371204a9b28e25830b2a322f307 Mon Sep 17 00:00:00 2001 From: daFish Date: Fri, 19 Sep 2014 20:39:17 +0200 Subject: [PATCH 106/106] Capitalize the headline and add punctuation. --- cookbook/form/form_collections.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 7fba05b6aae..0e1556e2ef8 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -731,12 +731,12 @@ the relationship between the removed ``Tag`` and ``Task`` object. .. _cookbook-form-collections-custom-prototype -Render a custom prototype -------------------------- +Rendering a Custom Prototype +---------------------------- Most of the time the provided prototype will be sufficient for your needs and does not need to be changed. But if you are in the situation were -you need to have a complete custom prototype you can render it yourself: +you need to have a complete custom prototype, you can render it yourself: .. configuration-block::