Skip to content

Commit

Permalink
Merge branch '2.3' into 2.7
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
xabbuh committed May 9, 2016
2 parents 574afd5 + b4d1839 commit 9f370c6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
6 changes: 6 additions & 0 deletions book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ If there are any issues, correct them now before moving on.
configuration (e.g. commonly httpd.conf or apache2.conf for Apache) and setting
its user to be the same as your CLI user (e.g. for Apache, update the ``User``
and ``Group`` values).

.. caution::

If used in a production environment, be sure this user only has limited privileges
(no access to private data or servers, launch of unsafe binaries, etc.)
as a compromised server would give to the hacker those privileges.

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

Expand Down
17 changes: 12 additions & 5 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1198,15 +1198,22 @@ instance which will give you access to some application specific variables
automatically:

``app.security`` (deprecated as of 2.6)
The security context.
The :class:`Symfony\\Component\\Security\\Core\\SecurityContext` object or
``null`` if there is none.
``app.user``
The current user object.
The representation of the current user or ``null`` if there is none. The
value stored in this variable can be a :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`
object, any other object which implements a ``__toString()`` method or even
a regular string.
``app.request``
The request object.
The :class:`Symfony\\Component\\HttpFoundation\\Request` object that represents
the current request (depending on your application, this can be a sub-request
or a regular request, as explained later).
``app.session``
The session object.
The :class:`Symfony\\Component\\HttpFoundation\\Session\\Session` object that
represents the current user's session or ``null`` if there is none.
``app.environment``
The current environment (dev, prod, etc).
The name of the current environment (``dev``, ``prod``, etc).
``app.debug``
True if in debug mode. False otherwise.

Expand Down
10 changes: 5 additions & 5 deletions components/dependency_injection/parentservices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The service config for these classes would look something like this:
- [setEmailFormatter, ['@my_email_formatter']]
greeting_card_manager:
class: 'GreetingCardManager'
class: GreetingCardManager
calls:
- [setMailer, ['@my_mailer']]
- [setEmailFormatter, ['@my_email_formatter']]
Expand Down Expand Up @@ -196,11 +196,11 @@ a parent for a service.
- [setEmailFormatter, ['@my_email_formatter']]
newsletter_manager:
class: "NewsletterManager"
class: NewsletterManager
parent: mail_manager
greeting_card_manager:
class: "GreetingCardManager"
class: GreetingCardManager
parent: mail_manager
.. code-block:: xml
Expand Down Expand Up @@ -324,13 +324,13 @@ to the ``NewsletterManager`` class, the config would look like this:
- [setEmailFormatter, ['@my_email_formatter']]
newsletter_manager:
class: 'NewsletterManager'
class: NewsletterManager
parent: mail_manager
calls:
- [setMailer, ['@my_alternative_mailer']]
greeting_card_manager:
class: 'GreetingCardManager'
class: GreetingCardManager
parent: mail_manager
.. code-block:: xml
Expand Down

0 comments on commit 9f370c6

Please sign in to comment.