Skip to content

Commit 46096d3

Browse files
committed
Merge branch '2.8'
2 parents 0e3f25b + 3da6681 commit 46096d3

File tree

9 files changed

+315
-162
lines changed

9 files changed

+315
-162
lines changed

book/forms.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,11 @@ The ``_token`` field is a hidden field and will be automatically rendered
17821782
if you include the ``form_end()`` function in your template, which ensures
17831783
that all un-rendered fields are output.
17841784

1785+
.. caution::
1786+
1787+
Since the token is stored in the session, a session is started automatically
1788+
as soon as you render a form with CSRF protection.
1789+
17851790
The CSRF token can be customized on a form-by-form basis. For example::
17861791

17871792
use Symfony\Component\OptionsResolver\OptionsResolver;

changelog.rst

+57
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,63 @@ documentation.
1313
Do you also want to participate in the Symfony Documentation? Take a look
1414
at the ":doc:`/contributing/documentation/overview`" article.
1515

16+
September, 2015
17+
---------------
18+
19+
New Documentation
20+
~~~~~~~~~~~~~~~~~
21+
22+
* `#5555 <https://github.com/symfony/symfony-docs/pull/5555>`_ added result yaml and xml from example code (OskarStark)
23+
* `#5631 <https://github.com/symfony/symfony-docs/pull/5631>`_ Updated the Quick Tour to the latest changes introduced by Symfony (javiereguiluz)
24+
* `#5497 <https://github.com/symfony/symfony-docs/pull/5497>`_ Simplified the Quick tour explanation about Symfony Installation (DQNEO)
25+
26+
Fixed Documentation
27+
~~~~~~~~~~~~~~~~~~~
28+
29+
* `#5629 <https://github.com/symfony/symfony-docs/pull/5629>`_ Fixing web user permission (BenoitLeveque)
30+
* `#5673 <https://github.com/symfony/symfony-docs/pull/5673>`_ Update http_cache.rst (szyszka90)
31+
* `#5666 <https://github.com/symfony/symfony-docs/pull/5666>`_ Fix EntityManager namespace (JhonnyL)
32+
* `#5656 <https://github.com/symfony/symfony-docs/pull/5656>`_ Fix monolog line formatter in logging cookbook example. (vmarquez)
33+
* `#5507 <https://github.com/symfony/symfony-docs/pull/5507>`_ Path fixed (carlosreig)
34+
35+
Minor Documentation Changes
36+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
38+
* `#5740 <https://github.com/symfony/symfony-docs/pull/5740>`_ Fix typo in PdoSessionHandler Documentation (tobemedia)
39+
* `#5719 <https://github.com/symfony/symfony-docs/pull/5719>`_ changed repo names to the new ones (fabpot)
40+
* `#5227 <https://github.com/symfony/symfony-docs/pull/5227>`_ [Cookbook] Fix doc on Generic Form Type Extensions (lemoinem)
41+
* `#5703 <https://github.com/symfony/symfony-docs/pull/5703>`_ comment old logic (OskarStark)
42+
* `#5683 <https://github.com/symfony/symfony-docs/pull/5683>`_ Improve the demo-warning. (GuGuss)
43+
* `#5690 <https://github.com/symfony/symfony-docs/pull/5690>`_ Updated the release process image (javiereguiluz)
44+
* `#5188 <https://github.com/symfony/symfony-docs/pull/5188>`_ Updated Cookies & Caching section (lukey78)
45+
* `#5710 <https://github.com/symfony/symfony-docs/pull/5710>`_ Fix grammar mistake in security.rst (zatikbalazs)
46+
* `#5706 <https://github.com/symfony/symfony-docs/pull/5706>`_ Update assetic.rst (Acinonux)
47+
* `#5705 <https://github.com/symfony/symfony-docs/pull/5705>`_ Update assetic.rst (Acinonux)
48+
* `#5685 <https://github.com/symfony/symfony-docs/pull/5685>`_ Fix indentation in some annotations (iamdto)
49+
* `#5704 <https://github.com/symfony/symfony-docs/pull/5704>`_ Fix typo in translation.rst (zatikbalazs)
50+
* `#5701 <https://github.com/symfony/symfony-docs/pull/5701>`_ Update testing.rst (hansallis)
51+
* `#5711 <https://github.com/symfony/symfony-docs/pull/5711>`_ removed service call from controller (sloba88)
52+
* `#5692 <https://github.com/symfony/symfony-docs/pull/5692>`_ Made a sentence slightly more english (GTheron)
53+
* `#5715 <https://github.com/symfony/symfony-docs/pull/5715>`_ Add missing code tag (zatikbalazs)
54+
* `#5720 <https://github.com/symfony/symfony-docs/pull/5720>`_ adding closing tag (InfoTracer)
55+
* `#5714 <https://github.com/symfony/symfony-docs/pull/5714>`_ Remove unnecessary word from http_cache.rst (zatikbalazs)
56+
* `#5680 <https://github.com/symfony/symfony-docs/pull/5680>`_ fix grammar mistake (greg0ire)
57+
* `#5682 <https://github.com/symfony/symfony-docs/pull/5682>`_ Fix grammar and CS (iamdto)
58+
* `#5652 <https://github.com/symfony/symfony-docs/pull/5652>`_ Do not use dynamic REQUEST_URI from $_SERVER as base url (senkal)
59+
* `#5654 <https://github.com/symfony/symfony-docs/pull/5654>`_ Doc about new way of running tests (nicolas-grekas)
60+
* `#5598 <https://github.com/symfony/symfony-docs/pull/5598>`_ [Cookbook][Security] proofread comments in voter article (xabbuh)
61+
* `#5560 <https://github.com/symfony/symfony-docs/pull/5560>`_ [2.3] [Contributing] [CS] Added missing docblocks in code snippet (phansys)
62+
* `#5674 <https://github.com/symfony/symfony-docs/pull/5674>`_ Update cookbook entries with best practices (JhonnyL)
63+
* `#5675 <https://github.com/symfony/symfony-docs/pull/5675>`_ [Contributing] add a link to the testing section (xabbuh)
64+
* `#5669 <https://github.com/symfony/symfony-docs/pull/5669>`_ Better explanation of implicit exception response status code (hvt)
65+
* `#5651 <https://github.com/symfony/symfony-docs/pull/5651>`_ [Reference][Constraints] follow best practices in the constraints reference (xabbuh)
66+
* `#5648 <https://github.com/symfony/symfony-docs/pull/5648>`_ Minor fixes for the QuestionHelper documentation (javiereguiluz)
67+
* `#5641 <https://github.com/symfony/symfony-docs/pull/5641>`_ Move important information out of versionadded (WouterJ)
68+
* `#5619 <https://github.com/symfony/symfony-docs/pull/5619>`_ Remove a caution note about StringUtils::equals() which is no longer true (javiereguiluz)
69+
* `#5571 <https://github.com/symfony/symfony-docs/pull/5571>`_ Some small fixes for upload files article (WouterJ)
70+
* `#5660 <https://github.com/symfony/symfony-docs/pull/5660>`_ Improved "Community Reviews" page (webmozart)
71+
72+
1673
August, 2015
1774
------------
1875

components/dependency_injection/advanced.rst

+72
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,75 @@ You can change the inner service name if you want to:
218218
->addArgument(new Reference('bar.wooz'))
219219
->setPublic(false)
220220
->setDecoratedService('foo', 'bar.wooz');
221+
222+
Deprecating Services
223+
--------------------
224+
225+
.. versionadded:: 2.8
226+
The ``deprecated`` setting was introduced in Symfony 2.8.
227+
228+
Once you have decided to deprecate the use of a service (because it is outdated
229+
or you decided not to use and maintain it anymore), you can deprecate its
230+
definition:
231+
232+
.. configuration-block::
233+
234+
.. code-block:: yaml
235+
236+
acme.my_service:
237+
class: ...
238+
deprecated: The "%service_id%" service is deprecated since 2.8 and will be removed in 3.0.
239+
240+
.. code-block:: xml
241+
242+
<?xml version="1.0" encoding="UTF-8" ?>
243+
<container xmlns="http://symfony.com/schema/dic/services"
244+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
245+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
246+
247+
<services>
248+
<service id="acme.my_service" class="...">
249+
<deprecated>The "%service_id%" service is deprecated since 2.8 and will be removed in 3.0.</deprecated>
250+
</service>
251+
</services>
252+
</container>
253+
254+
.. code-block:: php
255+
256+
$container
257+
->register('acme.my_service', '...')
258+
->setDeprecated(
259+
true,
260+
'The "%service_id%" service is deprecated since 2.8 and will be removed in 3.0.'
261+
)
262+
;
263+
264+
Now, every time a service is created using this deprecated definition, a
265+
deprecation warning will be triggered, advising you to stop or to change your
266+
uses of that service.
267+
268+
The message is actually a message template, which will replace occurrences
269+
of the ``%service_id%`` by the service's id. You **must** have at least one
270+
occurrence of the ``%service_id%`` placeholder in your template.
271+
272+
.. note::
273+
274+
The deprecation message is optional. If not set, Symfony will show a default
275+
message ``The "%service_id%" service is deprecated. You should stop using it,
276+
as it will soon be removed.``.
277+
278+
.. tip::
279+
280+
It is strongly recommended that you fill the message template, to avoid a
281+
message that could be too generic such as the default one. A good message
282+
informs when this service was deprecated, and until when it will be
283+
maintained (look at the examples above).
284+
285+
For service decorators (see above), if the definition does not modify the
286+
deprecated status, it will inherit the status from the definition that is
287+
decorated.
288+
289+
.. caution::
290+
291+
The ability to "un-deprecate" a service is possible only when declaring the
292+
definition in PHP.

contributing/documentation/index.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ Contributing Documentation
77
overview
88
format
99
standards
10-
translations
1110
license
11+
12+
.. toctree::
13+
:hidden:
14+
15+
translations

contributing/documentation/overview.rst

-5
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,6 @@ Please be patient. It can take up to several days before your pull request can
299299
be fully reviewed. After merging the changes, it could take again several hours
300300
before your changes appear on the symfony.com website.
301301

302-
What If I Want to Translate Some Documentation into my Language?
303-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304-
305-
Read the dedicated :doc:`document </contributing/documentation/translations>`.
306-
307302
Why Should I Use the Oldest Maintained Branch Instead of the Master Branch?
308303
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309304

+3-83
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,7 @@
11
Translations
22
============
33

4-
The Symfony documentation is written in English and many people are involved
5-
in the translation process.
4+
The Symfony documentation is not officially translated, though some community
5+
groups still maintain some translations. For more information, see `this blog post`_.
66

7-
.. note::
8-
9-
Symfony Project officially discourages from starting new translations for the
10-
documentation. As a matter of fact, there is `an ongoing discussion`_ in
11-
the community about the benefits and drawbacks of community driven translations.
12-
13-
Contributing
14-
------------
15-
16-
First, become familiar with the :doc:`markup language </contributing/documentation/format>`
17-
used by the documentation.
18-
19-
Finally, find the *master* repository for the language you want to contribute
20-
for. Here is the list of the official *master* repositories:
21-
22-
* *English*: https://github.com/symfony/symfony-docs
23-
* *French*: https://github.com/symfony-fr/symfony-docs-fr
24-
* *Italian*: https://github.com/garak/symfony-docs-it
25-
* *Japanese*: https://github.com/symfony-japan/symfony-docs-ja
26-
* *Portuguese (Brazilian)*: https://github.com/andreia/symfony-docs-pt-BR
27-
28-
.. note::
29-
30-
If you want to contribute translations for a new language, read the
31-
:ref:`dedicated section <translations-adding-a-new-language>`.
32-
33-
Joining the Translation Team
34-
----------------------------
35-
36-
If you want to help translating some documents for your language or fix some
37-
bugs, consider joining us; it's a very easy process:
38-
39-
* *(optional)* Ask which documents you can work on;
40-
* Fork the *master* repository for your language (click the "Fork" button on
41-
the GitHub page);
42-
* Translate some documents;
43-
* Ask for a pull request (click on the "Pull Request" from your page on
44-
GitHub);
45-
* The team manager accepts your modifications and merges them into the master
46-
repository;
47-
* The documentation website is updated every other night from the master
48-
repository.
49-
50-
.. _translations-adding-a-new-language:
51-
52-
Adding a new Language
53-
---------------------
54-
55-
This section gives some guidelines for starting the translation of the
56-
Symfony documentation for a new language.
57-
58-
As starting a translation is a lot of work, try to find motivated people
59-
willing to help.
60-
61-
When the team is ready, nominate a team manager; they will be responsible for
62-
the *master* repository.
63-
64-
Create the repository and copy the *English* documents.
65-
66-
The team can now start the translation process.
67-
68-
When the team is confident that the repository is in a consistent and stable
69-
state (everything is translated, or non-translated documents have been removed
70-
from the toctrees -- files named ``index.rst`` and ``map.rst.inc``), the team
71-
manager can ask that the repository is added to the list of official *master*
72-
repositories by sending an email to Fabien (fabien at symfony.com).
73-
74-
Maintenance
75-
-----------
76-
77-
Translation does not end when everything is translated. The documentation is a
78-
moving target (new documents are added, bugs are fixed, paragraphs are
79-
reorganized, ...). The translation team need to closely follow the English
80-
repository and apply changes to the translated documents as soon as possible.
81-
82-
.. caution::
83-
84-
Non maintained languages are removed from the official list of
85-
repositories as obsolete documentation is dangerous.
86-
87-
.. _`an ongoing discussion`: https://github.com/symfony/symfony-docs/issues/4078
7+
.. _`this blog post`: http://symfony.com/blog/discontinuing-the-symfony-community-translations

contributing/map.rst.inc

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* :doc:`Overview </contributing/documentation/overview>`
1818
* :doc:`Format </contributing/documentation/format>`
1919
* :doc:`Documentation Standards </contributing/documentation/standards>`
20-
* :doc:`Translations </contributing/documentation/translations>`
2120
* :doc:`License </contributing/documentation/license>`
2221

2322
* **Community**

0 commit comments

Comments
 (0)