Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0cd5d0

Browse files
committed
minor#4285 Update security.rst (placid2000)
This PR was submitted for the 2.5 branch but it was merged into the 2.4 branch instead (closes#4285).Discussion----------Update security.rstHotfix: allow_if option might been added afterwards and seems to miss in the description above the listCommits-------6a0551c Update security.rst77d166b Merge branch '2.4' into 2.5e8a1501 feature#4201 [Components][Process] `mustRun()` documentation (xabbuh)ad6a340 [Components][Process] `mustRun()` documentation8c9847d Merge branch '2.4' into 2.5c289ac8 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.59dd3a77 Created August CHANGELOG84aaa10 Merge branch '2.4' into 2.5f42a300 Merge branch '2.4' into 2.5b50dd72 Merge branch '2.4' into 2.590c2cc1 Merge branch '2.4' into 2.573d44d1 Merge branch '2.4' into 2.5de0e355 Merge branch '2.4' into 2.5f732747 Merge branch '2.4' into 2.51018da8 Merge branch '2.4' into 2.58f01195 minor#4212 Missing backtick, thanks to@Baptouuuu (WouterJ)02d1091 bug#4209 Fix method for adding placholders in progressBar (danez)dadaea3 Missing backtick, thanks to@Baptouuuuf3ef9dc The name of the placeholder must not be encapsulated in %fb0e79c Fix method for adding placholders in progressBar4a7f973 Merge branch '2.4' into 2.50d2bf4f Merge branch '2.4' into 2.5cea3fa6 Merge branch '2.4' into 2.5936cb0f Merge branch '2.4' into 2.5e7a17ff Merge branch '2.4' into 2.5cd07f5f Merge branch '2.4' into 2.5bb39863 Merge branch '2.4' into 2.55ab5246 minor#4127 Second part of#3848 (WouterJ)c7d1791 Fixed typoscffd6b9 Merge branch '2.4' into 2.5bdd729a Merge branch '2.4' into 2.5d0ca865 Merge branch '2.4' into 2.5f40bb24 Merge branch '2.4' into 2.5b2a70d1 Added July changelog5e9fe63 Merge branch '2.4' into 2.5e9e57ce Merge branch '2.4' into 2.5b8687dd minor#4091 Put version into quotes, otherwise it fails in ZSH (dannykopping)6dc62a8 Put version into quotes, otherwise it fails30bb6c5 Merge branch '2.4' into 2.5b8481d8 Merge branch '2.4' into 2.561434a8 Merge branch '2.4' into 2.58804fe3 Merge branch '2.4' into 2.51c948c8 Merge branch '2.4' into 2.5ffa4360 Merge branch '2.4' into 2.55e5abd3 Merge branch '2.4' into 2.5eed8d64 minor#4026 Updating Symfony version from 2.4 to 2.5 (danielsan)aab4044 Merge branch '2.4' into 2.599932cf 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 version2299df0 Updating Symfony version from 2.4 to 2.574c2e94 Merge branch '2.4' into 2.58022f46 Merge branch '2.4' into 2.521e1df6 Merge branch '2.4' into 2.5a1435e5 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 ProgressBarb8f27ef Removed wrong reference to cookbook97c3894 [Console] Fixed QuestionHelper examples1f4dc76 [Console] Fix Console some $app to $this and getHelperSet()->get() to getHelper()1938c2f feature#3724 Updated ISBN validator docs (sprain)fcae3cd Updated ISBN validator1efcdba Merge branch '2.4' into 2.5071f583 Merge branch '2.4' into 2.5fc872a9 Merge branch '2.4' into 2.5a40a4c4 Merge branch '2.4' into 2.52b2d9d3 feature#3972 Added PSR-4 to Class Loaders list (dosten)f34eaed Added June changelog91ce3a7 Merge branch '2.4' into 2.5deb7835 Merge branch '2.4' into 2.5d1c95ce Added PSR-4 ClassLoader to list741ad05 Merge branch '2.4' into 2.584332ff bug#3945 Fixed missing component name in namespaces (WouterJ)9dfc088 Fixed missing component name in namespacesb879ad7 Merge branch '2.4' into 2.5b7a03f8 minor#3937 properly escape backslashes in class and method directives (xabbuh)6c4421b properly escape backslashes in class and method directivesc042934 Merge branch '2.4' into 2.5882471f minor#3935 Typo (greg0ire)0c2a9b3 minor#3931 [Component][EventDispatcher] 2.5 specific documentation for the TraceableEventDispatcher (xabbuh)46b21bd Merge branch '2.4' into 2.5c7c48b8 fix typocf667c9 update the TraceableEventDispatcher to reflect its movement to the EventDispatcher component in Symfony 2.5140e54e Merge branch '2.4' into 2.56629db8 Merge branch '2.4' into 2.5e19fd2a Merge branch '2.4' into 2.5db48945 Merge branch '2.4' into 2.55b8df28 Merge remote-tracking branch 'origin/2.5' into 2.5df9f31a 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 versionc5ca497 Added May changelogbfd8488 Merge branch '2.4' into 2.547ce3f1 Fixed syntaxeadf281 feature#3874 Updated the installation instructions for Symfony 2.5+ (javiereguiluz)9a533ce Merge branch '2.4' into 2.53e3004f minor#3865 Fixed link. (aitboudad)564f60d Fixed link.4fd1b49 feature#3753 [DependencyInjection] Add documentation about service decoration (romainneutron)e6bc038 Add documentation about service decoration6c87f99 Merge branch '2.4' into 2.5f913dd7 feature#3603 [Serializer] Support for is.* getters in GetSetMethodNormalizer (tiraeth)1f5d980 added a note about is* getters support with GetSetMethodNormalizer83bb723 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 WouterJ36f68b6 fix the wording in versionadded directives3e3b79d Merge branch '2.4'0fe1bfd Merge branch '2.4'fe5a39f fix literal positions6d00c3d [#3797] Reordered changelogc01e87c Added April changelog5e7092f 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 asseta9648e8 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 Marchb4a0fb0 Merge branch '2.4'eef3313 [#3752] Adding the question helper to the helper list and marking dialog as deprecated9e129bc 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 item319bf29 [#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 documentationf4ee337 [Console] Add documentation for QuestionHelpercedfdce 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 typo456da28 [Form] Deprecated max_length and pattern optionsf6af251 [Templating] Add documentation about generating versioned URLsd2faada 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() methods80045df 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@dirkluijk83adc87 fix class roles3bbccf7 fix PSR-3 link as mentioned by @max-voloshin9b0911b fix grammer mistakedd16589 add logger chapter to the component's map974cb18 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 consistent239b1b6 Some markup fixes0ee15d3 Fix versionadded295f109 Add reason for getEvent()ac484f4 Made suggested tweaks72d40a8 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 logger955526c Merge branch '2.4'70b55b5 fix literalddf5fe4 add firewall restriction document to security toctreea12aa41 Merge branch '2.4'15a9d25 minor#3697 [Console] Change Command namespaces (dunglas)0816a07 [Console] Change Command namespacese40733d Merge branch '2.4'450146e feature#3681 Enhanced Firewall Restrictions docs (danez)2f3f88b Merge branch '2.4'eafbab1 Enhanced Firewall Restrictions docs5fb6d21 Merge branch '2.4'27b3410 minor#3692 [Book][Translations] fixing a code block (xabbuh)a6a074c fixing a code block8673b59 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 function5b915c2 feature#3629 Added documentation for translation:debug (florianv)4dde2ca [Process] Add doc for Process::disableOutput and Process::enableOutputcb2be4a Moved versionadded block to the top.16fead4 Adjustments from comments by@bicpia05da41 Minor corrections.6f2a1a3 Adjustments from comments be@wouterj17166bd First shot of a documentation of the new PSR-4 class loader.37278d8 remove unnecessary code block directiveb6ac454 Fixed the issues739f43f minor#3669 Fixed syntax highlighting (rvanlaarhoven)38b2955 Improved the documentation with examples and images864b9f2 Merge branch 'master' of github.com:symfony/symfony-docs into translation-debug857725b Merge branch '2.4'df63740 feature#3627 added docs for the new Table console helper (fabpot)484b7b9 Added :7eb3051 Fixed syntax highlighting876a55d Merge remote-tracking branch 'origin/master'96bd81b feature#3626 added documentation for the new Symfony 2.5 progress bar (fabpot)153f97f Added 2.5 CHANGELOG6c7cb88 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 Container6adf160 Added documentation about new requests formats configuration8903e23 Merge branch '2.4'2d9647b Added documentation for translation:debug9e2727d added documentation for the new Symfony 2.5 progress barbd9cd26 added docs for the new Table console helper6f6c03f Fix formatting issues3ea9137 List the UUID constraint in the reference sectionf4afaab Documentation for the new Uuid constrainteefd0ab add versionadded directive for multiple optioncadca3b 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 section7e3c0e3 readd configuration block64602c8 fix referenced documents names2ca9bd5 Describe retrieval of StopwatchEventbdc6c3f 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@xabbuh2fbf17c [#3491] Moving the new named algorithms into their own cookbook entry and making some minor tweaks8ccfe85 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@xabbuh11e079b 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 encoders257c483 Blank line restoredda6002d Wrapping lineb1b9090 Adding versionadded detail53f156c Updating references to match doc format6fd3f93 Documenting createAccessDeniedException() methodc50f041 CSa0dd460 Lowercase and link label8231230 Fix according to PR commentsaa5aa61 Typo and link label8beb570 Fixed `versionadded` inconsistenciescce3b40 fixed typo517e4c5 Link moved and heading updatedf0b3b85 Version added and clarificationse4a0e2f Use of Sphinx markupfaa034b [WIP][Valiadtor] - EmailConstraint reference6db5f23 feature#3426 New Feature: Change the Default Command in the Console component (danielcsgomes)c1b2aad Applied suggestions from Ryanfdf4891 Documented deprecation of the apache router.5e97202 Applyed suggestions from@fabpot and@stof0f90fed Merge branch '2.4'94fe8dc Add info about callback in options resolverc23f34e Applied some suggestions012456d Moved `versionadded` to the right section730985f Updated references to the new documentaf9eac4 Changed the code to remove references to Symfony Framework since it's the standalone component60e2b3e Added the delete document to avoid broken urls and added a notice that the document was moved to another location11c7174 Added the version number where the setDefaultCommand was introducedb9f8b8d fix "versionadded" wordingb29ab89 Documented the Change the Default Command in the Console componentbb9004e Add "versionadded" directive for 2.5bfe3a20 [Validation] Add "hasser" supportb1e0886 Merge branch '2.4'33d27cc [#3362] Updating composer install version on the master branchd5fe901 Merge branch '2.4'8735384 Merge branch '2.4'42084dd [#3338] Adding versionaddedbd1e53e 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-6d31465b Merge branch '2.4'34551d2 [#3319] Fixing typos thanks to@xabbuh1401372 Merge branch '2.4'2a10a46 [#3319] Linking to the whole method06f2f74 Merge pull request#3319 from lemoinem/features/acl-update-security-idcc5c9a3 Merge branch '2.4'bf98517 fixed spacesa7b80a6 [Form] added multiple option to file type doc2f486ce [Security][Acl] Documentation for the new updateUserSecurityIdentity method in Dbal\MutableAclProvider9d4a138 Merge branch 'master' into eom-2-210fe8a4 Removed 2.2 references as it reached eom
2 parentsa6724f4 +6a0551c commitd0cd5d0

File tree

87 files changed

+2235
-370
lines changed

Some content is hidden

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

87 files changed

+2235
-370
lines changed

‎book/forms.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ the correct values of a number of field options.
711711
(i.e. is the field ``nullable``). This is very useful, as your client-side
712712
validation will automatically match your validation rules.
713713

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

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

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

728728
..index::
729729
single: Forms; Rendering in a template
@@ -1903,7 +1903,7 @@ Learn more from the Cookbook
19031903

19041904
.. _`Symfony Form component`:https://github.com/symfony/Form
19051905
.. _`DateTime`:http://php.net/manual/en/class.datetime.php
1906-
.. _`Twig Bridge`:https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bridge/Twig
1907-
.. _`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
1906+
.. _`Twig Bridge`:https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig
1907+
.. _`form_div_layout.html.twig`:https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
19081908
.. _`Cross-site request forgery`:http://en.wikipedia.org/wiki/Cross-site_request_forgery
1909-
.. _`view on GitHub`:https://github.com/symfony/symfony/tree/2.3/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
1909+
.. _`view on GitHub`:https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form

‎book/from_flat_php_to_symfony2.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ content:
435435
436436
{
437437
"require": {
438-
"symfony/symfony":"2.4.*"
438+
"symfony/symfony":"2.5.*"
439439
},
440440
"autoload": {
441441
"files": ["model.php","controllers.php"]

‎book/installation.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Distribution:
5959

6060
..code-block::bash
6161
62-
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony'2.4.*'
62+
$ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony'2.5.*'
6363
6464
..tip::
6565

@@ -106,10 +106,10 @@ one of the following commands (replacing ``###`` with your actual filename):
106106
..code-block::bash
107107
108108
# for .tgz file
109-
$ tar zxvf Symfony_Standard_Vendors_2.4.###.tgz
109+
$ tar zxvf Symfony_Standard_Vendors_2.5.###.tgz
110110
111111
# for a .zip file
112-
$ unzip Symfony_Standard_Vendors_2.4.###.zip
112+
$ unzip Symfony_Standard_Vendors_2.5.###.zip
113113
114114
If you've downloaded "without vendors", you'll definitely need to read the
115115
next section.

‎book/routing.rst‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ The route is simple:
6868
6969
return $collection;
7070
71-
..versionadded::2.2
72-
The ``path`` option was introduced in Symfony 2.2, ``pattern`` is used
73-
in older versions.
74-
7571
The path defined by the ``blog_show`` route acts like ``/blog/*`` where
7672
the wildcard is given the name ``slug``. For the URL ``/blog/my-blog-post``,
7773
the ``slug`` variable gets a value of ``my-blog-post``, which is available
@@ -733,10 +729,6 @@ be accomplished with the following route configuration:
733729
734730
return $collection;
735731
736-
..versionadded::2.2
737-
The ``methods`` option was introduced in Symfony 2.2. Use the ``_method``
738-
requirement in older versions.
739-
740732
Despite the fact that these two routes have identical paths (``/contact``),
741733
the first route will match only GET requests and the second route will match
742734
only POST requests. This means that you can display the form and submit the
@@ -749,9 +741,6 @@ form via the same URL, while using distinct controllers for the two actions.
749741
Adding a Host Requirement
750742
~~~~~~~~~~~~~~~~~~~~~~~~~
751743

752-
..versionadded::2.2
753-
Host matching support was introduced in Symfony 2.2
754-
755744
You can also match on the HTTP *host* of the incoming request. For more
756745
information, see:doc:`/components/routing/hostname_pattern` in the Routing
757746
component documentation.
@@ -1196,9 +1185,6 @@ from the new routing resource.
11961185
Adding a Host Requirement to Imported Routes
11971186
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11981187

1199-
..versionadded::2.2
1200-
Host matching support was introduced in Symfony 2.2
1201-
12021188
You can set the host regex on imported routes. For more information, see
12031189
:ref:`component-routing-host-imported`.
12041190

‎book/security.rst‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ can access ``/foo`` without being prompted to authenticate.
183183

184184
..tip::
185185

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

189190
..image::/images/book/security_anonymous_user_access.png
190191
:align:center
@@ -938,7 +939,7 @@ will match any ``ip``, ``host`` or ``method``:
938939
.....................
939940

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

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

11721173
// ...
1173-
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
11741174

11751175
public function helloAction($name)
11761176
{
11771177
if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) {
1178-
thrownew AccessDeniedException();
1178+
throw$this->createAccessDeniedException('Unable to access this page!');
11791179
}
11801180

11811181
// ...
11821182
}
11831183

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

1186+
..versionadded::2.5
1187+
The ``createAccessDeniedException`` method was introduced in Symfony 2.5.
1188+
1189+
The:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createAccessDeniedException`
1190+
method creates a special:class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
1191+
object, which ultimately triggers a 403 HTTP response inside Symfony.
1192+
11861193
Thanks to the SensioFrameworkExtraBundle, you can also secure your controller using annotations::
11871194

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

1555-
..versionadded::2.2
1556-
As of Symfony 2.2 you can also use the:ref:`PBKDF2<reference-security-pbkdf2>`
1557-
password encoder.
1562+
..tip::
1563+
1564+
It's also possible to use different hashing algorithms on a user-by-user
1565+
basis. See:doc:`/cookbook/security/named_encoders` for more details.
15581566

15591567
Determining the Hashed Password
15601568
...............................
@@ -2217,10 +2225,6 @@ cookie will be ever created by Symfony):
22172225
Utilities
22182226
---------
22192227

2220-
..versionadded::2.2
2221-
The ``StringUtils`` and ``SecureRandom`` classes were introduced in Symfony
2222-
2.2
2223-
22242228
The Symfony Security component comes with a collection of nice utilities related
22252229
to security. These utilities are used by Symfony, but you should also use
22262230
them if you want to solve the problem they address.

‎book/templating.rst‎

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ When working with template inheritance, here are some tips to keep in mind:
373373
Template Naming and Locations
374374
-----------------------------
375375

376-
..versionadded::2.2
377-
Namespaced path support was introduced in 2.2, allowing for template names
378-
like ``@AcmeDemo/layout.html.twig``. See:doc:`/cookbook/templating/namespaced_paths`
379-
for more details.
380-
381376
By default, templates can live in two different locations:
382377

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

573-
..versionadded::2.2
574-
The `include() function`_ is a new Twig feature that's available in Symfony
575-
2.2. Prior, the `{% include %} tag`_ tag was used.
576-
577568
..index::
578569
single: Templating; Embedding action
579570

@@ -781,9 +772,6 @@ in your application configuration:
781772
),
782773
));
783774
784-
..versionadded::2.2
785-
Default templates per render function was introduced in Symfony 2.2
786-
787775
You can define default templates per ``render`` function (which will override
788776
any global default template that is defined):
789777

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

1005+
.. _`book-templating-version-by-asset`:
1006+
1007+
..versionadded::2.5
1008+
Setting versioned URLs on an asset-by-asset basis was introduced in Symfony 2.5.
1009+
1010+
If you need to set a version for a specific asset, you can set the fourth
1011+
argument (or the ``version`` argument) to the desired version:
1012+
1013+
..configuration-block::
1014+
1015+
..code-block::html+jinja
1016+
1017+
<img src="{{ asset('images/logo.png', version='3.0') }}" alt="Symfony!" />
1018+
1019+
..code-block::html+php
1020+
1021+
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, false, '3.0') ?>" alt="Symfony!" />
1022+
1023+
If you dont give a version or pass ``null``, the default package version
1024+
(from:ref:`ref-framework-assets-version`) will be used. If you pass ``false``,
1025+
versioned URL will be deactivated for this asset.
1026+
1027+
..versionadded::2.5
1028+
Absolute URLs for assets were introduced in Symfony 2.5.
1029+
1030+
If you need absolute URLs for assets, you can set the third argument (or the
1031+
``absolute`` argument) to ``true``:
1032+
1033+
..configuration-block::
1034+
1035+
..code-block::html+jinja
1036+
1037+
<img src="{{ asset('images/logo.png', absolute=true) }}" alt="Symfony!" />
1038+
1039+
..code-block::html+php
1040+
1041+
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, true) ?>" alt="Symfony!" />
1042+
10171043
..index::
10181044
single: Templating; Including stylesheets and JavaScripts
10191045
single: Stylesheets; Including stylesheets

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp