Skip to content

Commit 9f370c6

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Improved the description of the Twig global variables Add a warning about using same user for cli and web server [DependencyInjection] Unquote services FQCN in parent-services examples
2 parents 574afd5 + b4d1839 commit 9f370c6

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

book/installation.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ If there are any issues, correct them now before moving on.
227227
configuration (e.g. commonly httpd.conf or apache2.conf for Apache) and setting
228228
its user to be the same as your CLI user (e.g. for Apache, update the ``User``
229229
and ``Group`` values).
230+
231+
.. caution::
232+
233+
If used in a production environment, be sure this user only has limited privileges
234+
(no access to private data or servers, launch of unsafe binaries, etc.)
235+
as a compromised server would give to the hacker those privileges.
230236

231237
**2. Using ACL on a system that supports chmod +a (MacOS X)**
232238

book/templating.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,15 +1198,22 @@ instance which will give you access to some application specific variables
11981198
automatically:
11991199

12001200
``app.security`` (deprecated as of 2.6)
1201-
The security context.
1201+
The :class:`Symfony\\Component\\Security\\Core\\SecurityContext` object or
1202+
``null`` if there is none.
12021203
``app.user``
1203-
The current user object.
1204+
The representation of the current user or ``null`` if there is none. The
1205+
value stored in this variable can be a :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`
1206+
object, any other object which implements a ``__toString()`` method or even
1207+
a regular string.
12041208
``app.request``
1205-
The request object.
1209+
The :class:`Symfony\\Component\\HttpFoundation\\Request` object that represents
1210+
the current request (depending on your application, this can be a sub-request
1211+
or a regular request, as explained later).
12061212
``app.session``
1207-
The session object.
1213+
The :class:`Symfony\\Component\\HttpFoundation\\Session\\Session` object that
1214+
represents the current user's session or ``null`` if there is none.
12081215
``app.environment``
1209-
The current environment (dev, prod, etc).
1216+
The name of the current environment (``dev``, ``prod``, etc).
12101217
``app.debug``
12111218
True if in debug mode. False otherwise.
12121219

components/dependency_injection/parentservices.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The service config for these classes would look something like this:
6767
- [setEmailFormatter, ['@my_email_formatter']]
6868
6969
greeting_card_manager:
70-
class: 'GreetingCardManager'
70+
class: GreetingCardManager
7171
calls:
7272
- [setMailer, ['@my_mailer']]
7373
- [setEmailFormatter, ['@my_email_formatter']]
@@ -196,11 +196,11 @@ a parent for a service.
196196
- [setEmailFormatter, ['@my_email_formatter']]
197197
198198
newsletter_manager:
199-
class: "NewsletterManager"
199+
class: NewsletterManager
200200
parent: mail_manager
201201
202202
greeting_card_manager:
203-
class: "GreetingCardManager"
203+
class: GreetingCardManager
204204
parent: mail_manager
205205
206206
.. code-block:: xml
@@ -324,13 +324,13 @@ to the ``NewsletterManager`` class, the config would look like this:
324324
- [setEmailFormatter, ['@my_email_formatter']]
325325
326326
newsletter_manager:
327-
class: 'NewsletterManager'
327+
class: NewsletterManager
328328
parent: mail_manager
329329
calls:
330330
- [setMailer, ['@my_alternative_mailer']]
331331
332332
greeting_card_manager:
333-
class: 'GreetingCardManager'
333+
class: GreetingCardManager
334334
parent: mail_manager
335335
336336
.. code-block:: xml

0 commit comments

Comments
 (0)