Skip to content

Commit

Permalink
minor #4285 Update security.rst (placid2000)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.5 branch but it was merged into the 2.4 branch instead (closes #4285).

Discussion
----------

Update security.rst

Hotfix: allow_if option might been added afterwards and seems to miss in the description above the list

Commits
-------

6a0551c Update security.rst
77d166b Merge branch '2.4' into 2.5
e8a1501 feature #4201 [Components][Process] `mustRun()` documentation (xabbuh)
ad6a340 [Components][Process] `mustRun()` documentation
8c9847d Merge branch '2.4' into 2.5
c289ac8 bug #4279 Double-quotes instead of single quotes (UnexpectedValueException in Windows 8) (galdiolo)
ac4d9cd Double-quotes instead of single quotes (UnexpectedValueException in Windows 8)
0017bf4 Merge branch '2.4' into 2.5
9dd3a77 Created August CHANGELOG
84aaa10 Merge branch '2.4' into 2.5
f42a300 Merge branch '2.4' into 2.5
b50dd72 Merge branch '2.4' into 2.5
90c2cc1 Merge branch '2.4' into 2.5
73d44d1 Merge branch '2.4' into 2.5
de0e355 Merge branch '2.4' into 2.5
f732747 Merge branch '2.4' into 2.5
1018da8 Merge branch '2.4' into 2.5
8f01195 minor #4212 Missing backtick, thanks to @Baptouuuu (WouterJ)
02d1091 bug #4209 Fix method for adding placholders in progressBar (danez)
dadaea3 Missing backtick, thanks to @Baptouuuu
f3ef9dc The name of the placeholder must not be encapsulated in %
fb0e79c Fix method for adding placholders in progressBar
4a7f973 Merge branch '2.4' into 2.5
0d2bf4f Merge branch '2.4' into 2.5
cea3fa6 Merge branch '2.4' into 2.5
936cb0f Merge branch '2.4' into 2.5
e7a17ff Merge branch '2.4' into 2.5
cd07f5f Merge branch '2.4' into 2.5
bb39863 Merge branch '2.4' into 2.5
5ab5246 minor #4127 Second part of #3848 (WouterJ)
c7d1791 Fixed typos
cffd6b9 Merge branch '2.4' into 2.5
bdd729a Merge branch '2.4' into 2.5
d0ca865 Merge branch '2.4' into 2.5
f40bb24 Merge branch '2.4' into 2.5
b2a70d1 Added July changelog
5e9fe63 Merge branch '2.4' into 2.5
e9e57ce Merge branch '2.4' into 2.5
b8687dd minor #4091 Put version into quotes, otherwise it fails in ZSH (dannykopping)
6dc62a8 Put version into quotes, otherwise it fails
30bb6c5 Merge branch '2.4' into 2.5
b8481d8 Merge branch '2.4' into 2.5
61434a8 Merge branch '2.4' into 2.5
8804fe3 Merge branch '2.4' into 2.5
1c948c8 Merge branch '2.4' into 2.5
ffa4360 Merge branch '2.4' into 2.5
5e5abd3 Merge branch '2.4' into 2.5
eed8d64 minor #4026 Updating Symfony version from 2.4 to 2.5 (danielsan)
aab4044 Merge branch '2.4' into 2.5
99932cf bug #4010 [Console] Fixed documentation for ProgressBar (VasekPurchart)
12752c1 minor #4013 Removed wrong reference to cookbook (gquemener)
81d962f Configuring composer.json to use the 2.5 version
2299df0 Updating Symfony version from 2.4 to 2.5
74c2e94 Merge branch '2.4' into 2.5
8022f46 Merge branch '2.4' into 2.5
21e1df6 Merge branch '2.4' into 2.5
a1435e5 bug #3998 [Console] Fixed QuestionHelper examples (florianv)
ec832dc minor #3994 [Console] Fix Console component $app to $this and use of getHelper() method (eko)
4bc00df Fixed documentation for ProgressBar
b8f27ef Removed wrong reference to cookbook
97c3894 [Console] Fixed QuestionHelper examples
1f4dc76 [Console] Fix Console some $app to $this and getHelperSet()->get() to getHelper()
1938c2f feature #3724 Updated ISBN validator docs (sprain)
fcae3cd Updated ISBN validator
1efcdba Merge branch '2.4' into 2.5
071f583 Merge branch '2.4' into 2.5
fc872a9 Merge branch '2.4' into 2.5
a40a4c4 Merge branch '2.4' into 2.5
2b2d9d3 feature #3972 Added PSR-4 to Class Loaders list (dosten)
f34eaed Added June changelog
91ce3a7 Merge branch '2.4' into 2.5
deb7835 Merge branch '2.4' into 2.5
d1c95ce Added PSR-4 ClassLoader to list
741ad05 Merge branch '2.4' into 2.5
84332ff bug #3945 Fixed missing component name in namespaces (WouterJ)
9dfc088 Fixed missing component name in namespaces
b879ad7 Merge branch '2.4' into 2.5
b7a03f8 minor #3937 properly escape backslashes in class and method directives (xabbuh)
6c4421b properly escape backslashes in class and method directives
c042934 Merge branch '2.4' into 2.5
882471f minor #3935 Typo (greg0ire)
0c2a9b3 minor #3931 [Component][EventDispatcher] 2.5 specific documentation for the TraceableEventDispatcher (xabbuh)
46b21bd Merge branch '2.4' into 2.5
c7c48b8 fix typo
cf667c9 update the TraceableEventDispatcher to reflect its movement to the EventDispatcher component in Symfony 2.5
140e54e Merge branch '2.4' into 2.5
6629db8 Merge branch '2.4' into 2.5
e19fd2a Merge branch '2.4' into 2.5
db48945 Merge branch '2.4' into 2.5
5b8df28 Merge remote-tracking branch 'origin/2.5' into 2.5
df9f31a minor #3882 change version numbers in installation notes to be in line with the docu... (xabbuh)
c24d262 change version numbers in installation notes to be in line with the documented Symfony version
c5ca497 Added May changelog
bfd8488 Merge branch '2.4' into 2.5
47ce3f1 Fixed syntax
eadf281 feature #3874 Updated the installation instructions for Symfony 2.5+ (javiereguiluz)
9a533ce Merge branch '2.4' into 2.5
3e3004f minor #3865 Fixed link. (aitboudad)
564f60d Fixed link.
4fd1b49 feature #3753 [DependencyInjection] Add documentation about service decoration (romainneutron)
e6bc038 Add documentation about service decoration
6c87f99 Merge branch '2.4' into 2.5
f913dd7 feature #3603 [Serializer] Support for is.* getters in GetSetMethodNormalizer (tiraeth)
1f5d980 added a note about is* getters support with GetSetMethodNormalizer
83bb723 Updated the installation instructions to Symfony 2.5+
704d206 Merge branch '2.4'
797cbd5 minor #3794 Adds link to new QuestionHelper (weaverryan)
6b56422 Merge branch '2.4'
b760612 Merge branch '2.4'
00f60a8 minor #3837 More asset version details (weaverryan)
21a4b9d Merge branch '2.4'
681ddc8 minor #3843 [Changelog] fix literal positions (xabbuh)
1aa79d5 minor #3834 fix the wording in versionadded directives (for the master branch) (xabbuh)
4eafdbd [#3837] Fixes thanks to stof and WouterJ
36f68b6 fix the wording in versionadded directives
3e3b79d Merge branch '2.4'
0fe1bfd Merge branch '2.4'
fe5a39f fix literal positions
6d00c3d [#3797] Reordered changelog
c01e87c Added April changelog
5e7092f Merge branch '2.4'
baa9759 bug #3791 Property access tweaks (weaverryan)
d6474fc Merge branch '2.4'
560e010 Adding more details to be clear that you can set asset version globally or locally on an asset
a9648e8 feature #3742 [2.5][Templating] Add documentation about generating versioned URLs (romainneutron)
be6c79d Merge branch '2.4'
69b52c7 Merge branch '2.4'
c8bfde6 Merge branch '2.4'
98288fc Updated changelog for March
b4a0fb0 Merge branch '2.4'
eef3313 [#3752] Adding the question helper to the helper list and marking dialog as deprecated
9e129bc feature #3752 [Console] Add documentation for QuestionHelper (romainneutron)
552c780 Revert "[Console] Add Process Helper documentation"
64a924d feature #3756 [WCM][Console] Add Process Helper documentation (romainneutron)
fb9fe99 [#3729] Removing 3rd argument to isWritable - this doesn't exist in the final merged item
319bf29 [#3729] Making minor changes thansk to @wouterj and @xabbuh.
be4b9d3 feature #3729 Added documentation for the new PropertyAccessor::isReadable() and isWritable() methods (webmozart)
1705231 [Console] Add Process Helper documentation
f4ee337 [Console] Add documentation for QuestionHelper
cedfdce minor #3757 Fixed a typo in the request formats configuration page (gquemener)
c77835c Merge branch '2.4'
1934720 feature #3461 [Form] Deprecated max_length and pattern options (stefanosala)
efbe0f3 Fixed a typo
456da28 [Form] Deprecated max_length and pattern options
f6af251 [Templating] Add documentation about generating versioned URLs
d2faada Merge branch '2.4'
c062d81 feature #3469 [Validator] - EmailConstraint reference (egulias)
ec3aaca Merge branch '2.4'
a4ef0e1 Merge branch '2.4'
bb8e3ed Added documentation for the new PropertyAccessor::isReadable() and isWritable() methods
80045df Merge branch '2.4'
119064d Merge branch '2.4'
b34fb64 feature #3619 [Validator] Uuid constraint reference (colinodell)
d7027c0 feature #3418 [Validation] Add "hasser" support (bicpi)
cad38ae bug #3721 tweaks to the Console logger (xabbuh)
610eb6b code fixes as mentioned by @dirkluijk
83adc87 fix class roles
3bbccf7 fix PSR-3 link as mentioned by @max-voloshin
9b0911b fix grammer mistake
dd16589 add logger chapter to the component's map
974cb18 Merge branch '2.4'
4b611d6 minor #3717 [master] Fixed versionadded blocks (WouterJ)
4fd5fc1 feature #3539 [Stopwatch] Describe retrieval of StopwatchEvent (jochenvdv)
c703549 Merge branch '2.4'
8e6e550 Merge branch '2.4'
b3372cf Made versionadded consistent
239b1b6 Some markup fixes
0ee15d3 Fix versionadded
295f109 Add reason for getEvent()
ac484f4 Made suggested tweaks
72d40a8 Merge branch '2.4'
db1cda5 minor #3700 [Cookbook][Security] Firewall restrictions tweaks (xabbuh)
1908a15 feature #3696 [Console] Added standalone PSR-3 compliant logger (dunglas)
15628e6 [Console] Added standalone PSR-3 compliant logger
955526c Merge branch '2.4'
70b55b5 fix literal
ddf5fe4 add firewall restriction document to security toctree
a12aa41 Merge branch '2.4'
15a9d25 minor #3697 [Console] Change Command namespaces (dunglas)
0816a07 [Console] Change Command namespaces
e40733d Merge branch '2.4'
450146e feature #3681 Enhanced Firewall Restrictions docs (danez)
2f3f88b Merge branch '2.4'
eafbab1 Enhanced Firewall Restrictions docs
5fb6d21 Merge branch '2.4'
27b3410 minor #3692 [Book][Translations] fixing a code block (xabbuh)
a6a074c fixing a code block
8673b59 Merge branch '2.4'
dcf8e6e feature #3402 Added documentation about new requests formats configuration (gquemener)
842fd30 feature #3683 [TwigBundle] Add documentation about generating absolute URL with the asset function (romainneutron)
fc1576a feature #3664 [Process] Add doc for Process::disableOutput and Process::enableOutput (romainneutron)
3731e2e feature #3686 Documentation of the new PSR-4 class loader. (derrabus)
cd6d1de minor #3676 remove unnecessary code block directive (xabbuh)
bd947c7 [TwigBundle] Add documentation about generating absolute URL with the asset function
5b915c2 feature #3629 Added documentation for translation:debug (florianv)
4dde2ca [Process] Add doc for Process::disableOutput and Process::enableOutput
cb2be4a Moved versionadded block to the top.
16fead4 Adjustments from comments by @bicpi
a05da41 Minor corrections.
6f2a1a3 Adjustments from comments be @wouterj
17166bd First shot of a documentation of the new PSR-4 class loader.
37278d8 remove unnecessary code block directive
b6ac454 Fixed the issues
739f43f minor #3669 Fixed syntax highlighting (rvanlaarhoven)
38b2955 Improved the documentation with examples and images
864b9f2 Merge branch 'master' of github.com:symfony/symfony-docs into translation-debug
857725b Merge branch '2.4'
df63740 feature #3627 added docs for the new Table console helper (fabpot)
484b7b9 Added :
7eb3051 Fixed syntax highlighting
876a55d Merge remote-tracking branch 'origin/master'
96bd81b feature #3626 added documentation for the new Symfony 2.5 progress bar (fabpot)
153f97f Added 2.5 CHANGELOG
6c7cb88 Merge branch '2.4'
8eaf232 Merge branch '2.4'
0a65b6f minor #3608 [Reference][Forms] add versionadded directive for multiple option of file type (xabbuh)
e33be6d Merge branch '2.4'
5cda1c7 feature #3311 Use KernelTestCase instead of WebTestCase for testing code only requiring the Container (johnkary)
6c52b92 [#3311] Use KernelTestCase instead of WebTestCase for tests needing only a Container
6adf160 Added documentation about new requests formats configuration
8903e23 Merge branch '2.4'
2d9647b Added documentation for translation:debug
9e2727d added documentation for the new Symfony 2.5 progress bar
bd9cd26 added docs for the new Table console helper
6f6c03f Fix formatting issues
3ea9137 List the UUID constraint in the reference section
f4afaab Documentation for the new Uuid constraint
eefd0ab add versionadded directive for multiple option
cadca3b Merge branch '2.4'
2cb2c2d Merge branch '2.4'
642e776 bug #3544 Fix build errors (xabbuh)
46e0b52 remove empty_data from the list of inherited options, it's documented in the overriden options section
7e3c0e3 readd configuration block
64602c8 fix referenced documents names
2ca9bd5 Describe retrieval of StopwatchEvent
bdc6c3f Merge branch '2.4'
7e75b64 minor #3533 Moving the new named algorithms into their own cookbook entry (weaverryan)
34e69de [#3533] Lots of nice changes thanks to @xabbuh
2fbf17c [#3491] Moving the new named algorithms into their own cookbook entry and making some minor tweaks
8ccfe85 feature #3491 Added feature doc for named encoders (tamirvs)
46377b2 feature #3486 Documenting createAccessDeniedException() method (klaussilveira)
6058408 Merge branch '2.4'
8bd668e Merge branch '2.4'
2746067 minor #3472 Fixed `versionadded` inconsistencies in Symfony 2.5+ (danielcsgomes)
a87fe18 bug #3470 Fixed typo (danielcsgomes)
b6abafb [#3446] Minor tweaks as suggested by @xabbuh
11e079b feature #3446 [WCM] Documented deprecation of the apache router. (jakzal)
0a0bf4c feature #3437 Add info about callback in options resolver (marekkalnik)
c6ac96c Merge branch '2.4'
8cd63d0 Added feature doc for named encoders
257c483 Blank line restored
da6002d Wrapping line
b1b9090 Adding versionadded detail
53f156c Updating references to match doc format
6fd3f93 Documenting createAccessDeniedException() method
c50f041 CS
a0dd460 Lowercase and link label
8231230 Fix according to PR comments
aa5aa61 Typo and link label
8beb570 Fixed `versionadded` inconsistencies
cce3b40 fixed typo
517e4c5 Link moved and heading updated
f0b3b85 Version added and clarifications
e4a0e2f Use of Sphinx markup
faa034b [WIP][Valiadtor] - EmailConstraint reference
6db5f23 feature #3426 New Feature: Change the Default Command in the Console component (danielcsgomes)
c1b2aad Applied suggestions from Ryan
fdf4891 Documented deprecation of the apache router.
5e97202 Applyed suggestions from @fabpot and @stof
0f90fed Merge branch '2.4'
94fe8dc Add info about callback in options resolver
c23f34e Applied some suggestions
012456d Moved `versionadded` to the right section
730985f Updated references to the new document
af9eac4 Changed the code to remove references to Symfony Framework since it's the standalone component
60e2b3e Added the delete document to avoid broken urls and added a notice that the document was moved to another location
11c7174 Added the version number where the setDefaultCommand was introduced
b9f8b8d fix "versionadded" wording
b29ab89 Documented the Change the Default Command in the Console component
bb9004e Add "versionadded" directive for 2.5
bfe3a20 [Validation] Add "hasser" support
b1e0886 Merge branch '2.4'
33d27cc [#3362] Updating composer install version on the master branch
d5fe901 Merge branch '2.4'
8735384 Merge branch '2.4'
42084dd [#3338] Adding versionadded
bd1e53e Revert "[#3338] Removing delete_empty details because this is first being committed to 2.3"
7112444 Merge branch '2.4'
6c3d9eb Merge branch '2.4'
6b7d307 Merge branch '2.4'
6bdcdb1 Merge pull request #3354 from bamarni/patch-6
d31465b Merge branch '2.4'
34551d2 [#3319] Fixing typos thanks to @xabbuh
1401372 Merge branch '2.4'
2a10a46 [#3319] Linking to the whole method
06f2f74 Merge pull request #3319 from lemoinem/features/acl-update-security-id
cc5c9a3 Merge branch '2.4'
bf98517 fixed spaces
a7b80a6 [Form] added multiple option to file type doc
2f486ce [Security][Acl] Documentation for the new updateUserSecurityIdentity method in Dbal\MutableAclProvider
9d4a138 Merge branch 'master' into eom-2-2
10fe8a4 Removed 2.2 references as it reached eom
  • Loading branch information
wouterj committed Oct 3, 2014
2 parents a6724f4 + 6a0551c commit d0cd5d0
Show file tree
Hide file tree
Showing 87 changed files with 2,235 additions and 370 deletions.
12 changes: 6 additions & 6 deletions book/forms.rst
Expand Up @@ -711,8 +711,8 @@ the correct values of a number of field options.
(i.e. is the field ``nullable``). This is very useful, as your client-side
validation will automatically match your validation rules.

* ``max_length``: If the field is some sort of text field, then the ``max_length``
option can be guessed from the validation constraints (if ``Length`` or
* ``maxlength``: If the field is some sort of text field, then the ``maxlength``
option attribute can be guessed from the validation constraints (if ``Length`` or
``Range`` is used) or from the Doctrine metadata (via the field's length).

.. note::
Expand All @@ -723,7 +723,7 @@ the correct values of a number of field options.
If you'd like to change one of the guessed values, you can override it by
passing the option in the options field array::

->add('task', null, array('max_length' => 4))
->add('task', null, array('attr' => array('maxlength' => 4)))

.. index::
single: Forms; Rendering in a template
Expand Down Expand Up @@ -1903,7 +1903,7 @@ Learn more from the Cookbook

.. _`Symfony Form component`: https://github.com/symfony/Form
.. _`DateTime`: http://php.net/manual/en/class.datetime.php
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bridge/Twig
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
.. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
2 changes: 1 addition & 1 deletion book/from_flat_php_to_symfony2.rst
Expand Up @@ -435,7 +435,7 @@ content:
{
"require": {
"symfony/symfony": "2.4.*"
"symfony/symfony": "2.5.*"
},
"autoload": {
"files": ["model.php","controllers.php"]
Expand Down
6 changes: 3 additions & 3 deletions book/installation.rst
Expand Up @@ -59,7 +59,7 @@ Distribution:

.. code-block:: bash
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony '2.4.*'
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony '2.5.*'
.. tip::

Expand Down Expand Up @@ -106,10 +106,10 @@ one of the following commands (replacing ``###`` with your actual filename):
.. code-block:: bash
# for .tgz file
$ tar zxvf Symfony_Standard_Vendors_2.4.###.tgz
$ tar zxvf Symfony_Standard_Vendors_2.5.###.tgz
# for a .zip file
$ unzip Symfony_Standard_Vendors_2.4.###.zip
$ unzip Symfony_Standard_Vendors_2.5.###.zip
If you've downloaded "without vendors", you'll definitely need to read the
next section.
Expand Down
14 changes: 0 additions & 14 deletions book/routing.rst
Expand Up @@ -68,10 +68,6 @@ The route is simple:
return $collection;
.. versionadded:: 2.2
The ``path`` option was introduced in Symfony 2.2, ``pattern`` is used
in older versions.

The path defined by the ``blog_show`` route acts like ``/blog/*`` where
the wildcard is given the name ``slug``. For the URL ``/blog/my-blog-post``,
the ``slug`` variable gets a value of ``my-blog-post``, which is available
Expand Down Expand Up @@ -733,10 +729,6 @@ be accomplished with the following route configuration:
return $collection;
.. versionadded:: 2.2
The ``methods`` option was introduced in Symfony 2.2. Use the ``_method``
requirement in older versions.

Despite the fact that these two routes have identical paths (``/contact``),
the first route will match only GET requests and the second route will match
only POST requests. This means that you can display the form and submit the
Expand All @@ -749,9 +741,6 @@ form via the same URL, while using distinct controllers for the two actions.
Adding a Host Requirement
~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.2
Host matching support was introduced in Symfony 2.2

You can also match on the HTTP *host* of the incoming request. For more
information, see :doc:`/components/routing/hostname_pattern` in the Routing
component documentation.
Expand Down Expand Up @@ -1196,9 +1185,6 @@ from the new routing resource.
Adding a Host Requirement to Imported Routes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.2
Host matching support was introduced in Symfony 2.2

You can set the host regex on imported routes. For more information, see
:ref:`component-routing-host-imported`.

Expand Down
28 changes: 16 additions & 12 deletions book/security.rst
Expand Up @@ -183,8 +183,9 @@ can access ``/foo`` without being prompted to authenticate.

.. tip::

You can also match a request against other details of the request (e.g. host).
For more information and examples read :doc:`/cookbook/security/firewall_restriction`.
You can also match a request against other details of the request (e.g.
host, method). For more information and examples read
:doc:`/cookbook/security/firewall_restriction`.

.. image:: /images/book/security_anonymous_user_access.png
:align: center
Expand Down Expand Up @@ -938,7 +939,7 @@ will match any ``ip``, ``host`` or ``method``:
.....................

Once Symfony has decided which ``access_control`` entry matches (if any),
it then *enforces* access restrictions based on the ``roles`` and ``requires_channel``
it then *enforces* access restrictions based on the ``roles``, ``allow_if`` and ``requires_channel``
options:

* ``role`` If the user does not have the given role(s), then access is denied
Expand Down Expand Up @@ -1170,19 +1171,25 @@ fine-grained enough in certain cases. When necessary, you can easily force
authorization from inside a controller::

// ...
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

public function helloAction($name)
{
if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) {
throw new AccessDeniedException();
throw $this->createAccessDeniedException('Unable to access this page!');
}

// ...
}

.. _book-security-securing-controller-annotations:

.. versionadded:: 2.5
The ``createAccessDeniedException`` method was introduced in Symfony 2.5.

The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createAccessDeniedException`
method creates a special :class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
object, which ultimately triggers a 403 HTTP response inside Symfony.

Thanks to the SensioFrameworkExtraBundle, you can also secure your controller using annotations::

// ...
Expand Down Expand Up @@ -1552,9 +1559,10 @@ or via some online tool.
Supported algorithms for this method depend on your PHP version. A full list
is available by calling the PHP function :phpfunction:`hash_algos`.

.. versionadded:: 2.2
As of Symfony 2.2 you can also use the :ref:`PBKDF2 <reference-security-pbkdf2>`
password encoder.
.. tip::

It's also possible to use different hashing algorithms on a user-by-user
basis. See :doc:`/cookbook/security/named_encoders` for more details.

Determining the Hashed Password
...............................
Expand Down Expand Up @@ -2217,10 +2225,6 @@ cookie will be ever created by Symfony):
Utilities
---------

.. versionadded:: 2.2
The ``StringUtils`` and ``SecureRandom`` classes were introduced in Symfony
2.2

The Symfony Security component comes with a collection of nice utilities related
to security. These utilities are used by Symfony, but you should also use
them if you want to solve the problem they address.
Expand Down
50 changes: 38 additions & 12 deletions book/templating.rst
Expand Up @@ -373,11 +373,6 @@ When working with template inheritance, here are some tips to keep in mind:
Template Naming and Locations
-----------------------------

.. versionadded:: 2.2
Namespaced path support was introduced in 2.2, allowing for template names
like ``@AcmeDemo/layout.html.twig``. See :doc:`/cookbook/templating/namespaced_paths`
for more details.

By default, templates can live in two different locations:

* ``app/Resources/views/``: The applications ``views`` directory can contain
Expand Down Expand Up @@ -570,10 +565,6 @@ you set `with_context`_ to false).
maps (i.e. an array with named keys). If you needed to pass in multiple
elements, it would look like this: ``{'foo': foo, 'bar': bar}``.

.. versionadded:: 2.2
The `include() function`_ is a new Twig feature that's available in Symfony
2.2. Prior, the `{% include %} tag`_ tag was used.

.. index::
single: Templating; Embedding action

Expand Down Expand Up @@ -781,9 +772,6 @@ in your application configuration:
),
));
.. versionadded:: 2.2
Default templates per render function was introduced in Symfony 2.2

You can define default templates per ``render`` function (which will override
any global default template that is defined):

Expand Down Expand Up @@ -1014,6 +1002,44 @@ assets won't be cached when deployed. For example, ``/images/logo.png`` might
look like ``/images/logo.png?v2``. For more information, see the :ref:`ref-framework-assets-version`
configuration option.

.. _`book-templating-version-by-asset`:

.. versionadded:: 2.5
Setting versioned URLs on an asset-by-asset basis was introduced in Symfony 2.5.

If you need to set a version for a specific asset, you can set the fourth
argument (or the ``version`` argument) to the desired version:

.. configuration-block::

.. code-block:: html+jinja

<img src="{{ asset('images/logo.png', version='3.0') }}" alt="Symfony!" />

.. code-block:: html+php

<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, false, '3.0') ?>" alt="Symfony!" />

If you dont give a version or pass ``null``, the default package version
(from :ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
versioned URL will be deactivated for this asset.

.. versionadded:: 2.5
Absolute URLs for assets were introduced in Symfony 2.5.

If you need absolute URLs for assets, you can set the third argument (or the
``absolute`` argument) to ``true``:

.. configuration-block::

.. code-block:: html+jinja

<img src="{{ asset('images/logo.png', absolute=true) }}" alt="Symfony!" />

.. code-block:: html+php

<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, true) ?>" alt="Symfony!" />

.. index::
single: Templating; Including stylesheets and JavaScripts
single: Stylesheets; Including stylesheets
Expand Down

0 comments on commit d0cd5d0

Please sign in to comment.