Skip to content

Commit 89cba1e

Browse files
committed
Merge branch '3.2'
* 3.2: Expanded the explanation and updated the example Update doctrine.rst Update console.rst [#7452] remove trailing whitespaces Added filename references to examples Fix Typo $response->setEtag(..) Fixed typo Replace array with null Added a note about the usual cURL certificate problem Fixed code syntax issues Fix typo Replaced tabs with white spaces Replace "chapter" by "article" where appropriate Minor tweak Use statement for InputOption added to example Use HTTPS to link to symfony.com when possible fixed Backward Compatibility typo Update cache_pools.rst [DependencyInjection][Fix] Missing RequestStack
2 parents f2a40f7 + ffee6a9 commit 89cba1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+208
-176
lines changed

_build/_theme/_templates/layout.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% extends '!layout.html' %}
22

3-
{% set css_files = ['http://symfony.com/css/compiled/v5/all.css?v=4'] %}
3+
{% set css_files = ['https://symfony.com/css/compiled/v5/all.css?v=4'] %}
44
{# make sure the Sphinx stylesheet isn't loaded #}
55
{% set style = '' %}
66
{% set isIndex = pagename is index %}
77

88
{% block extrahead %}
99
{# add JS to support tabs #}
10-
<script src="http://symfony.com/js/v5/all.js?v=4"></script>
10+
<script src="https://symfony.com/js/v5/all.js?v=4"></script>
1111

1212
{# pygment's styles are still loaded, undo some unwanted styles #}
1313
<style>
@@ -48,7 +48,7 @@ <h4>Pull request build</h4>
4848
<p>Each pull request of the Symfony Documentation is automatically deployed and hosted on <a href="https://platform.sh">Platform.sh</a>.<br>
4949
View this page on <a href="https://symfony.com/doc/current/{{ pagename }}">symfony.com</a>.</p>
5050
</div>
51-
51+
5252
{%- include "globaltoc.html" %}
5353

5454
{% if not isIndex %}
@@ -81,7 +81,7 @@ <h1 class="content_title">{{ title }}</h1>
8181
<a href="{{ next.link|e }}">{{ next.title|striptags|e }} »</a>
8282
</div>
8383
{% endif %}
84-
84+
8585
<div id="license">
8686
<p>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">License</a>.</p>
8787
</div>

best_practices/security.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,15 @@ more advanced use-case, you can always do the same security check in PHP:
235235
236236
if (!$post->isAuthor($this->getUser())) {
237237
$this->denyAccessUnlessGranted('edit', $post);
238-
239-
// or without the shortcut:
240-
//
241-
// use Symfony\Component\Security\Core\Exception\AccessDeniedException;
242-
// ...
243-
//
244-
// if (!$this->get('security.authorization_checker')->isGranted('edit', $post)) {
245-
// throw $this->createAccessDeniedException();
246-
// }
247238
}
239+
// equivalent code without using the "denyAccessUnlessGranted()" shortcut:
240+
//
241+
// use Symfony\Component\Security\Core\Exception\AccessDeniedException;
242+
// ...
243+
//
244+
// if (!$this->get('security.authorization_checker')->isGranted('edit', $post)) {
245+
// throw $this->createAccessDeniedException();
246+
// }
248247
249248
// ...
250249
}
@@ -398,6 +397,6 @@ If your company uses a user login method not supported by Symfony, you can
398397
develop :doc:`your own user provider </security/custom_provider>` and
399398
:doc:`your own authentication provider </security/custom_authentication_provider>`.
400399

401-
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
402-
.. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
400+
.. _`ParamConverter`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
401+
.. _`@Security annotation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
403402
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle

components/browser_kit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ into the client constructor::
188188
$cookieJar = new Cookie('flavor', 'chocolate', strtotime('+1 day'));
189189

190190
// create a client and set the cookies
191-
$client = new Client(array(), array(), $cookieJar);
191+
$client = new Client(array(), null, $cookieJar);
192192
// ...
193193

194194
History

components/cache/cache_pools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ item in the cache immediately (it returns ``true`` if the item was saved or
344344
``false`` if some error occurred)::
345345

346346
// ...
347-
$userFriends = $cache->get('user_'.$userId.'_friends');
347+
$userFriends = $cache->getItem('user_'.$userId.'_friends');
348348
$userFriends->set($user->getFriends());
349349
$isSaved = $cache->save($userFriends);
350350

components/http_foundation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ the
234234
method tells you if the request contains a session which was started in one of
235235
the previous requests.
236236

237-
Accessing `Accept-*` Headers Data
238-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237+
Accessing ``Accept-*`` Headers Data
238+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239239

240240
You can easily access basic data extracted from ``Accept-*`` headers
241241
by using the following methods:

components/options_resolver.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ the ``Mailer`` class makes a mistake?
9090
.. code-block:: php
9191
9292
$mailer = new Mailer(array(
93-
'usernme' => 'johndoe', // usernAme misspelled
93+
'usernme' => 'johndoe', // usernAme misspelled
9494
));
9595
9696
No error will be shown. In the best case, the bug will appear during testing,
@@ -376,7 +376,7 @@ is thrown::
376376
For options with more complicated validation schemes, pass a closure which
377377
returns ``true`` for acceptable values and ``false`` for invalid values::
378378

379-
379+
380380
// ...
381381
$resolver->setAllowedValues('transport', function ($value) {
382382
// return true or false

components/yaml/yaml_format.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ According to the official `YAML`_ website, YAML is "a human friendly data
88
serialization standard for all programming languages".
99

1010
Even if the YAML format can describe complex nested data structure, this
11-
chapter only describes the minimum set of features needed to use YAML as a
11+
article only describes the minimum set of features needed to use YAML as a
1212
configuration file format.
1313

1414
YAML is a simple language that describes data. As PHP, it has a syntax for

configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ specific bundle (i.e. ``FrameworkBundle`` and ``TwigBundle``).
9595

9696
.. sidebar:: Configuration Formats
9797

98-
Throughout the chapters, all configuration examples will be shown in
98+
Throughout the documentation, all configuration examples will be shown in
9999
three formats (YAML, XML and PHP). YAML is used by default, but you can
100100
choose whatever you like best. There is no performance difference:
101101

configuration/external_parameters.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
How to Set external Parameters in the Service Container
55
=======================================================
66

7-
In the chapter :doc:`/configuration`, you learned how to manage your application
8-
configuration. At times, it may benefit your application
9-
to store certain credentials outside of your project code. Database configuration
10-
is one such example. The flexibility of the Symfony service container allows
11-
you to easily do this.
7+
In the article :doc:`/configuration`, you learned how to manage your application
8+
configuration. At times, it may benefit your application to store certain
9+
credentials outside of your project code. Database configuration is one such
10+
example. The flexibility of the Symfony service container allows you to easily
11+
do this.
1212

1313
Environment Variables
1414
---------------------
@@ -22,7 +22,7 @@ will be resolved at runtime (once per request), so that dumped containers can be
2222
reconfigured dynamically even after being compiled.
2323

2424
For example, if you want to use the value of the ``DATABASE_HOST`` environment
25-
variable in you service container configuration, you can reference it using
25+
variable in your service container configuration, you can reference it using
2626
``%env(DATABASE_HOST)%`` in your configuration files:
2727

2828
.. configuration-block::

configuration/front_controllers_and_kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ This method is responsible for loading the application's
144144
configuration from the right *environment*.
145145

146146
Environments have been covered extensively
147-
:doc:`in the previous chapter </configuration/environments>`,
147+
:doc:`in the previous article </configuration/environments>`,
148148
and you probably remember that the Symfony Standard Edition comes with three
149149
of them - ``dev``, ``prod`` and ``test``.
150150

console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ method. Then you can optionally define a help message and the
5757

5858
// the full command description shown when running the command with
5959
// the "--help" option
60-
->setHelp("This command allows you to create users...")
60+
->setHelp('This command allows you to create users...')
6161
;
6262
}
6363

console/input.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ simply as a boolean flag without a value (e.g. ``--yell``).
118118
For example, add a new option to the command that can be used to specify
119119
how many times in a row the message should be printed::
120120

121+
// ...
122+
use Symfony\Component\Console\Input\InputOption;
123+
121124
$this
122125
// ...
123126
->addOption(

console/verbosity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ verbosity levels::
6868
These semantic methods are defined in the ``OutputInterface`` starting from
6969
Symfony 3.0. In previous Symfony versions they are defined in the different
7070
implementations of the interface (e.g. :class:`Symfony\\Component\\Console\\Output\\Output`)
71-
in order to keep backwards compatibility.
71+
in order to keep backward compatibility.
7272

7373
When the quiet level is used, all output is suppressed as the default
7474
:method:`Symfony\\Component\\Console\\Output\\Output::write` method returns

contributing/code/bc.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Our Backwards Compatibility Promise
2-
===================================
1+
Our Backward Compatibility Promise
2+
==================================
33

44
Ensuring smooth upgrades of your projects is our first priority. That's why
5-
we promise you backwards compatibility (BC) for all minor Symfony releases.
5+
we promise you backward compatibility (BC) for all minor Symfony releases.
66
You probably recognize this strategy as `Semantic Versioning`_. In short,
77
Semantic Versioning means that only major releases (such as 2.0, 3.0 etc.) are
8-
allowed to break backwards compatibility. Minor releases (such as 2.5, 2.6 etc.)
8+
allowed to break backward compatibility. Minor releases (such as 2.5, 2.6 etc.)
99
may introduce new features, but must do so without breaking the existing API of
1010
that release branch (2.x in the previous example).
1111

@@ -14,7 +14,7 @@ that release branch (2.x in the previous example).
1414
This promise was introduced with Symfony 2.3 and does not apply to previous
1515
versions of Symfony.
1616

17-
However, backwards compatibility comes in many different flavors. In fact, almost
17+
However, backward compatibility comes in many different flavors. In fact, almost
1818
every change that we make to the framework can potentially break an application.
1919
For example, if we add a new method to a class, this will break an application
2020
which extended this class and added the same method, but with a different
@@ -63,10 +63,10 @@ sticks to these rules.
6363
If you implement an interface, we promise that we won't ever break your code.
6464

6565
The following table explains in detail which use cases are covered by our
66-
backwards compatibility promise:
66+
backward compatibility promise:
6767

6868
+-----------------------------------------------+-----------------------------+
69-
| Use Case | Backwards Compatibility |
69+
| Use Case | Backward Compatibility |
7070
+===============================================+=============================+
7171
| **If you...** | **Then we guarantee BC...** |
7272
+-----------------------------------------------+-----------------------------+
@@ -97,10 +97,10 @@ public methods and properties.
9797
not be accessed by your own code.
9898

9999
To be on the safe side, check the following table to know which use cases are
100-
covered by our backwards compatibility promise:
100+
covered by our backward compatibility promise:
101101

102102
+-----------------------------------------------+-----------------------------+
103-
| Use Case | Backwards Compatibility |
103+
| Use Case | Backward Compatibility |
104104
+===============================================+=============================+
105105
| **If you...** | **Then we guarantee BC...** |
106106
+-----------------------------------------------+-----------------------------+

contributing/code/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Security Advisories
103103
This section indexes security vulnerabilities that were fixed in Symfony
104104
releases, starting from Symfony 1.0.0:
105105

106-
* May 9, 2016: `CVE-2016-2403: Unauthorized access on a misconfigured Ldap server when using an empty password <http://symfony.com/blog/cve-2016-2403-unauthorized-access-on-a-misconfigured-ldap-server-when-using-an-empty-password>`_ (2.8.0-2.8.5, 3.0.0-3.0.5)
106+
* May 9, 2016: `CVE-2016-2403: Unauthorized access on a misconfigured Ldap server when using an empty password <https://symfony.com/blog/cve-2016-2403-unauthorized-access-on-a-misconfigured-ldap-server-when-using-an-empty-password>`_ (2.8.0-2.8.5, 3.0.0-3.0.5)
107107
* May 9, 2016: `CVE-2016-4423: Large username storage in session <https://symfony.com/blog/cve-2016-4423-large-username-storage-in-session>`_ (2.3.0-2.3.40, 2.7.0-2.7.12, 2.8.0-2.8.5, 3.0.0-3.0.5)
108108
* January 18, 2016: `CVE-2016-1902: SecureRandom's fallback not secure when OpenSSL fails <https://symfony.com/blog/cve-2016-1902-securerandom-s-fallback-not-secure-when-openssl-fails>`_ (2.3.0-2.3.36, 2.6.0-2.6.12, 2.7.0-2.7.8)
109109
* November 23, 2015: `CVE-2015-8125: Potential Remote Timing Attack Vulnerability in Security Remember-Me Service <https://symfony.com/blog/cve-2015-8125-potential-remote-timing-attack-vulnerability-in-security-remember-me-service>`_ (2.3.35, 2.6.12 and 2.7.7)

contributing/community/releases.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ Version Feature Freeze Release End of Maintenance End of Life
140140
.. [2] Symfony 2.8 is the last version of the Symfony 2.x branch.
141141
.. [3] Symfony 3.0 is the first version to use the new release process based on five minor releases.
142142
143-
Backwards Compatibility
144-
-----------------------
143+
Backward Compatibility
144+
----------------------
145145

146-
Our :doc:`Backwards Compatibility Promise </contributing/code/bc>` is very
146+
Our :doc:`Backward Compatibility Promise </contributing/code/bc>` is very
147147
strict and allows developers to upgrade with confidence from one minor version
148148
of Symfony to the next one.
149149

contributing/community/reviews.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ status:
2222
* **Pull Requests**: Pull requests contain code that fixes a bug or implements
2323
new functionality. Reviews of pull requests ensure that they are implemented
2424
properly, are covered by test cases, don't introduce new bugs and maintain
25-
backwards compatibility.
25+
backward compatibility.
2626

2727
Note that **anyone who has some basic familiarity with Symfony and PHP can
2828
review bug reports and pull requests**. You don't need to be an expert to help.
@@ -140,12 +140,12 @@ Pick a pull request from the `PRs in need of review`_ and follow these steps:
140140
* Does the PR contain automated tests? Do those tests cover all relevant
141141
edge cases?
142142
* Does the PR contain sufficient comments to easily understand its code?
143-
* Does the code break backwards compatibility? If yes, does the PR header say
143+
* Does the code break backward compatibility? If yes, does the PR header say
144144
so?
145145
* Does the PR contain deprecations? If yes, does the PR header say so? Does
146146
the code contain ``trigger_error()`` statements for all deprecated
147147
features?
148-
* Are all deprecations and backwards compatibility breaks documented in the
148+
* Are all deprecations and backward compatibility breaks documented in the
149149
latest UPGRADE-X.X.md file? Do those explanations contain "Before"/"After"
150150
examples with clear upgrade instructions?
151151

@@ -210,7 +210,7 @@ Pick a pull request from the `PRs in need of review`_ and follow these steps:
210210
.. _bug reports in need of review: https://github.com/symfony/symfony/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22Bug%22+label%3A%22Status%3A+Needs+Review%22+
211211
.. _PRs in need of review: https://github.com/symfony/symfony/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Apr+label%3A%22Status%3A+Needs+Review%22+
212212
.. _Contribution Guidelines: https://github.com/symfony/symfony/blob/master/CONTRIBUTING.md
213-
.. _Symfony's Release Schedule: http://symfony.com/doc/current/contributing/community/releases.html#schedule
213+
.. _Symfony's Release Schedule: https://symfony.com/doc/current/contributing/community/releases.html#schedule
214214
.. _Symfony Roadmap: https://symfony.com/roadmap
215215
.. _Carson Bot: https://github.com/carsonbot/carsonbot
216216
.. _`Needs Review`: https://github.com/symfony/symfony/labels/Status%3A%20Needs%20Review

contributing/documentation/overview.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ memorable name for the new branch (if you are fixing a reported issue, use
126126

127127
.. code-block:: terminal
128128
129-
$ git checkout -b improve_install_chapter upstream/2.7
129+
$ git checkout -b improve_install_article upstream/2.7
130130
131-
In this example, the name of the branch is ``improve_install_chapter`` and the
131+
In this example, the name of the branch is ``improve_install_article`` and the
132132
``upstream/2.7`` value tells Git to create this branch based on the ``2.7``
133133
branch of the ``upstream`` remote, which is the original Symfony Docs repository.
134134

@@ -151,10 +151,10 @@ even remove any content and do your best to comply with the
151151

152152
.. code-block:: terminal
153153
154-
$ git push origin improve_install_chapter
154+
$ git push origin improve_install_article
155155
156156
The ``origin`` value is the name of the Git remote that corresponds to your
157-
forked repository and ``improve_install_chapter`` is the name of the branch you
157+
forked repository and ``improve_install_article`` is the name of the branch you
158158
created previously.
159159

160160
**Step 7.** Everything is now ready to initiate a **pull request**. Go to your
@@ -171,7 +171,7 @@ changes should be applied:
171171
In this example, the **base fork** should be ``symfony/symfony-docs`` and
172172
the **base** branch should be the ``2.7``, which is the branch that you selected
173173
to base your changes on. The **head fork** should be your forked copy
174-
of ``symfony-docs`` and the **compare** branch should be ``improve_install_chapter``,
174+
of ``symfony-docs`` and the **compare** branch should be ``improve_install_article``,
175175
which is the name of the branch you created and where you made your changes.
176176

177177
.. _pull-request-format:
@@ -192,7 +192,7 @@ changes and push the new changes:
192192
.. code-block:: terminal
193193
194194
$ cd projects/symfony-docs/
195-
$ git checkout improve_install_chapter
195+
$ git checkout improve_install_article
196196
197197
# ... do your changes
198198

contributing/documentation/translations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Translations
44
The Symfony documentation is not officially translated, though some community
55
groups still maintain some translations. For more information, see `this blog post`_.
66

7-
.. _`this blog post`: http://symfony.com/blog/discontinuing-the-symfony-community-translations
7+
.. _`this blog post`: https://symfony.com/blog/discontinuing-the-symfony-community-translations

contributing/map.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* :doc:`The Core Team </contributing/code/core_team>`
88
* :doc:`Security </contributing/code/security>`
99
* :doc:`Tests </contributing/code/tests>`
10-
* :doc:`Backwards Compatibility </contributing/code/bc>`
10+
* :doc:`Backward Compatibility </contributing/code/bc>`
1111
* :doc:`Coding Standards</contributing/code/standards>`
1212
* :doc:`Code Conventions</contributing/code/conventions>`
1313
* :doc:`Git</contributing/code/git>`

0 commit comments

Comments
 (0)