Skip to content

Commit cea26fc

Browse files
committed
Merge branch '3.1'
* 3.1: [#7044] minor tweak Add Nginx configuration to environment variables Update the Apache Router article to deprecate it entirely Fix typo in doctrine.rst (to manage) Changed RFC links from drafts to proposed standarts Remove a dead link to the PR header Minor improvements for the contribution guide use single quotes for YAML strings Fix incorrect callback validation example Fix a typo in the serializer doc Fix 404 error link for American English Oxford Dictionary Use strict comparison
2 parents cbe1aad + fe66a3b commit cea26fc

File tree

13 files changed

+61
-59
lines changed

13 files changed

+61
-59
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ Contributing
22
------------
33

44
We love contributors! For more information on how you can contribute to the
5-
Symfony documentation, please read [Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html)
6-
and notice the [Pull Request Format](https://symfony.com/doc/current/contributing/documentation/overview.html#pull-request-format)
7-
that helps us merge your pull requests faster!
5+
Symfony documentation, please read [Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html).

_build/redirection_map

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/cookbook/index /index
33
/book/stable_api /contributing/code/bc
44
/book/internals /reference/events
5+
/configuration/apache_router /routing
56
/cookbook/console/sending_emails /cookbook/console/request_context
67
/cookbook/deployment-tools /cookbook/deployment/tools
78
/cookbook/doctrine/migrations /bundles/DoctrineFixturesBundle/index
@@ -95,7 +96,7 @@
9596
/cookbook/cache/form_csrf_caching /http_cache/form_csrf_caching
9697
/cookbook/cache/varnish /http_cache/varnish
9798
/cookbook/composer /setup/composer
98-
/cookbook/configuration/apache_router /configuration/apache_router
99+
/cookbook/configuration/apache_router /routing
99100
/cookbook/configuration/configuration_organization /configuration/configuration_organization
100101
/cookbook/configuration/environments /configuration/environments
101102
/cookbook/configuration/external_parameters /configuration/external_parameters

components/routing.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ Learn more
536536
/routing/*
537537
/controller
538538
/controller/*
539-
/configuration/apache_router
540539

541540
.. _Packagist: https://packagist.org/packages/symfony/routing
542541
.. _PCRE Unicode properties: http://php.net/manual/en/regexp.reference.unicode.php

components/serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ There are several types of normalizers available:
492492
the "get"/"set"/"has"/"remove" prefix and converted to lower case) to property
493493
values.
494494

495-
The ``ObjectNormalizer`` is the most powerful normalizer. It is a configured
496-
by default when using the Symfony Standard Edition with the serializer enabled.
495+
The ``ObjectNormalizer`` is the most powerful normalizer. It is configured by
496+
default when using the Symfony Standard Edition with the serializer enabled.
497497

498498
:class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
499499
This normalizer reads the content of the class by calling the "getters"

configuration/apache_router.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

configuration/external_parameters.rst

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ applied to the resulting parameter name:
2222
* Double underscores are replaced with a period, as a period is not
2323
a valid character in an environment variable name.
2424

25-
For example, if you're using Apache, environment variables can be set using
26-
the following ``VirtualHost`` configuration:
25+
For example, if you're using Apache, environment variables can be set using the
26+
`SetEnv`_ directive with the following ``VirtualHost`` configuration:
2727

2828
.. code-block:: apache
2929
@@ -40,13 +40,41 @@ the following ``VirtualHost`` configuration:
4040
</Directory>
4141
</VirtualHost>
4242
43+
For Nginx web servers, the environment variables can be set with the `fastcgi_param`_
44+
directive. For example, in the configuration file where the ``fastcgi_params``
45+
file is included:
46+
47+
.. code-block:: nginx
48+
49+
server {
50+
server_name domain.tld www.domain.tld;
51+
root /var/www/project/web;
52+
53+
location / {
54+
try_files $uri /app.php$is_args$args;
55+
}
56+
57+
location ~ ^/app\.php(/|$) {
58+
fastcgi_pass unix:/var/run/php5-fpm.sock;
59+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
60+
include fastcgi_params;
61+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
62+
fastcgi_param DOCUMENT_ROOT $realpath_root;
63+
fastcgi_param SYMFONY__DATABASE__USER user;
64+
fastcgi_param SYMFONY__DATABASE__PASSWORD secret;
65+
internal;
66+
}
67+
68+
# ...
69+
}
70+
4371
.. note::
4472

45-
The example above is for an Apache configuration, using the `SetEnv`_
46-
directive. However, this will work for any web server which supports
47-
the setting of environment variables.
73+
The examples above are for an Apache and Nginx configuration. However, this
74+
will work for any web server which supports the setting of environment
75+
variables.
4876

49-
Also, in order for your console to work (which does not use Apache),
77+
Also, in order for your console to work (which does not use a web server),
5078
you must export these as shell variables. On a Unix system, you can run
5179
the following:
5280

@@ -148,3 +176,4 @@ the Symfony service container.
148176
$container->setParameter('drupal.database.url', $db_url);
149177
150178
.. _`SetEnv`: http://httpd.apache.org/docs/current/env.html
179+
.. _`fastcgi_param`: http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_param

contributing/documentation/overview.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ this value accordingly):
9090
.. code-block:: terminal
9191
9292
$ cd projects/
93-
$ git clone git://github.com/<YOUR GITHUB USERNAME>/symfony-docs.git
93+
$ git clone git://github.com/YOUR-GITHUB-USERNAME/symfony-docs.git
9494
9595
**Step 3.** Add the original Symfony docs repository as a "Git remote" executing
9696
this command:
@@ -106,8 +106,8 @@ your project:
106106
.. code-block:: terminal
107107
108108
$ git remote -v
109-
origin git@github.com:<YOUR GITHUB USERNAME>/symfony-docs.git (fetch)
110-
origin git@github.com:<YOUR GITHUB USERNAME>/symfony-docs.git (push)
109+
origin git@github.com:YOUR-GITHUB-USERNAME/symfony-docs.git (fetch)
110+
origin git@github.com:YOUR-GITHUB-USERNAME/symfony-docs.git (push)
111111
upstream https://github.com/symfony/symfony-docs.git (fetch)
112112
upstream https://github.com/symfony/symfony-docs.git (push)
113113
@@ -158,7 +158,7 @@ forked repository and ``improve_install_chapter`` 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
161-
forked repository at ``https//github.com/<YOUR GITHUB USERNAME>/symfony-docs``
161+
forked repository at ``https//github.com/YOUR-GITHUB-USERNAME/symfony-docs``
162162
and click on the **Pull Requests** link located in the sidebar.
163163

164164
Then, click on the big **New pull request** button. As GitHub cannot guess the
@@ -223,12 +223,14 @@ contribution to the Symfony docs:
223223
224224
# ... do your changes
225225
226-
# add and commit your changes
227-
$ git add xxx.rst # (optional) only if this is a new content
226+
# (optional) add your changes if this is a new content
227+
$ git add xxx.rst
228+
229+
# commit your changes and push them to your fork
228230
$ git commit xxx.rst
229231
$ git push origin my_changes
230232
231-
# go to GitHub and create the Pull Request
233+
# ... go to GitHub and create the Pull Request
232234
233235
# (optional) make the changes requested by reviewers and commit them
234236
$ git commit xxx.rst

contributing/documentation/standards.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ In addition, documentation follows these rules:
179179
.. _`Twig Coding Standards`: http://twig.sensiolabs.org/doc/coding_standards.html
180180
.. _`reserved by the IANA`: http://tools.ietf.org/html/rfc2606#section-3
181181
.. _`American English`: https://en.wikipedia.org/wiki/American_English
182-
.. _`American English Oxford Dictionary`: http://www.oxforddictionaries.com/definition/american_english/
182+
.. _`American English Oxford Dictionary`: http://en.oxforddictionaries.com/definition/american_english/
183183
.. _`headings and titles`: https://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles
184184
.. _`Serial (Oxford) Commas`: https://en.wikipedia.org/wiki/Serial_comma
185185
.. _`nosism`: https://en.wikipedia.org/wiki/Nosism

doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ list of all available types and more information, see Doctrine's
875875
Relationships and Associations
876876
------------------------------
877877

878-
Doctrine provides all the functionality you need to manager database relationships
878+
Doctrine provides all the functionality you need to manage database relationships
879879
(also known as associations). For info, see :doc:`/doctrine/associations`.
880880

881881
Final Thoughts

http_cache.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,8 @@ These four headers are used to help cache your responses via *two* different mod
193193

194194
All of the HTTP headers you'll read about are *not* invented by Symfony! They're
195195
part of an HTTP specification that's used by sites all over the web. To dig deeper
196-
into HTTP Caching, check out the original `RFC 2616`_ document, or these two
197-
other pieces: `P4 - Conditional Requests`_ and `P6 -
198-
Caching: Browser and intermediary caches`_.
196+
into HTTP Caching, check out the documents `RFC 7234 - Caching`_ and
197+
`RFC 7232 - Conditional Requests`_.
199198

200199
As a web developer, you are strongly urged to read the specification. Its
201200
clarity and power - even more than fifteen years after its creation - is
@@ -364,9 +363,8 @@ Learn more
364363
.. _`Cache Tutorial`: http://www.mnot.net/cache_docs/
365364
.. _`Varnish`: https://www.varnish-cache.org/
366365
.. _`Squid in reverse proxy mode`: http://wiki.squid-cache.org/SquidFaq/ReverseProxy
367-
.. _`RFC 2616`: http://tools.ietf.org/html/rfc2616
368366
.. _`HTTP Bis`: http://tools.ietf.org/wg/httpbis/
369-
.. _`P4 - Conditional Requests`: http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional
370-
.. _`P6 - Caching: Browser and intermediary caches`: http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache
367+
.. _`RFC 7234 - Caching`: https://tools.ietf.org/html/rfc7234
368+
.. _`RFC 7232 - Conditional Requests`: https://tools.ietf.org/html/rfc7232
371369
.. _`FOSHttpCacheBundle`: http://foshttpcachebundle.readthedocs.org/
372370
.. _`HTTP specification`: http://www.w3.org/Protocols/rfc2616/rfc2616.html

reference/constraints/Callback.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Configuration
6060
# src/AppBundle/Resources/config/validation.yml
6161
AppBundle\Entity\Author:
6262
constraints:
63-
- Callback: [validate]
63+
- Callback: validate
6464
6565
.. code-block:: xml
6666

setup/bundles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Before diving into the specifics of the most common edge cases, the general
173173
recommendation is to **not rely on the Symfony Kernel version** to decide which
174174
code to use::
175175

176-
if (Kernel::VERSION_ID <= 20800) {
176+
if (Kernel::VERSION_ID < 20800) {
177177
// code for Symfony 2.x
178178
} else {
179179
// code for Symfony 3.x

templating/namespaced_paths.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ directory:
4646
twig:
4747
# ...
4848
paths:
49-
"%kernel.root_dir%/../vendor/acme/foo-bar/templates": foo_bar
49+
'%kernel.root_dir%/../vendor/acme/foo-bar/templates': foo_bar
5050
5151
.. code-block:: xml
5252
@@ -96,9 +96,9 @@ specific template doesn't exist.
9696
twig:
9797
# ...
9898
paths:
99-
"%kernel.root_dir%/../vendor/acme/themes/theme1": theme
100-
"%kernel.root_dir%/../vendor/acme/themes/theme2": theme
101-
"%kernel.root_dir%/../vendor/acme/themes/common": theme
99+
'%kernel.root_dir%/../vendor/acme/themes/theme1': theme
100+
'%kernel.root_dir%/../vendor/acme/themes/theme2': theme
101+
'%kernel.root_dir%/../vendor/acme/themes/common': theme
102102
103103
.. code-block:: xml
104104

0 commit comments

Comments
 (0)