Skip to content

Commit b77b148

Browse files
committed
Merge branch '2.8'
* 2.8: [symfony#5444] Fixing missing public: false declarations and proofing Fix RST [Book][Routing] Change example to match multiple methods Custom voter example, fix missing curly brace TYPO: missing closing parantheses of the array Fixed an error in the auto_alias format value Fixed RST table syntax Reverted an unneeded change Minor grammar issue Minor fixes Remove the old voter article Rewrite new section Move access decision strategy section Fixed some errors and added a new note Removed an extra blank line Added the "versionadded: 2.7" directive Documented the "auto_alias" feature Minor reword Improved the explanation about the verbosity levels of the console
2 parents 2c6aa2f + 79a1902 commit b77b148

12 files changed

+358
-444
lines changed

Diff for: book/routing.rst

+20-20
Original file line numberDiff line numberDiff line change
@@ -830,36 +830,36 @@ be accomplished with the following route configuration:
830830
class MainController extends Controller
831831
{
832832
/**
833-
* @Route("/contact")
833+
* @Route("/news")
834834
* @Method("GET")
835835
*/
836-
public function contactAction()
836+
public function newsAction()
837837
{
838-
// ... display contact form
838+
// ... display your news
839839
}
840840
841841
/**
842842
* @Route("/contact")
843-
* @Method("POST")
843+
* @Method({"GET", "POST"})
844844
*/
845-
public function processContactAction()
845+
public function contactFormAction()
846846
{
847-
// ... process contact form
847+
// ... display and process a contact form
848848
}
849849
}
850850
851851
.. code-block:: yaml
852852
853853
# app/config/routing.yml
854-
contact:
855-
path: /contact
856-
defaults: { _controller: AppBundle:Main:contact }
854+
news:
855+
path: /news
856+
defaults: { _controller: AppBundle:Main:news }
857857
methods: [GET]
858858
859-
contact_process:
859+
contact_form:
860860
path: /contact
861-
defaults: { _controller: AppBundle:Main:processContact }
862-
methods: [POST]
861+
defaults: { _controller: AppBundle:Main:contactForm }
862+
methods: [GET, POST]
863863
864864
.. code-block:: xml
865865
@@ -870,12 +870,12 @@ be accomplished with the following route configuration:
870870
xsi:schemaLocation="http://symfony.com/schema/routing
871871
http://symfony.com/schema/routing/routing-1.0.xsd">
872872
873-
<route id="contact" path="/contact" methods="GET">
874-
<default key="_controller">AppBundle:Main:contact</default>
873+
<route id="news" path="/news" methods="GET">
874+
<default key="_controller">AppBundle:Main:news</default>
875875
</route>
876876
877-
<route id="contact_process" path="/contact" methods="POST">
878-
<default key="_controller">AppBundle:Main:processContact</default>
877+
<route id="contact_form" path="/contact" methods="GET|POST">
878+
<default key="_controller">AppBundle:Main:contactForm</default>
879879
</route>
880880
</routes>
881881
@@ -886,13 +886,13 @@ be accomplished with the following route configuration:
886886
use Symfony\Component\Routing\Route;
887887
888888
$collection = new RouteCollection();
889-
$collection->add('contact', new Route('/contact', array(
889+
$collection->add('news', new Route('/news', array(
890890
'_controller' => 'AppBundle:Main:contact',
891891
), array(), array(), '', array(), array('GET')));
892892
893-
$collection->add('contact_process', new Route('/contact', array(
894-
'_controller' => 'AppBundle:Main:processContact',
895-
), array(), array(), '', array(), array('POST')));
893+
$collection->add('contact_form', new Route('/contact', array(
894+
'_controller' => 'AppBundle:Main:contactForm',
895+
), array(), array(), '', array(), array('GET', 'POST')));
896896
897897
return $collection;
898898

Diff for: book/security.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -994,10 +994,10 @@ other users. Also, as the admin user, you yourself want to be able to edit
994994

995995
To accomplish this you have 2 options:
996996

997-
* :doc:`Voters </cookbook/security/voters_data_permission>` allow you to
998-
use business logic (e.g. the user can edit this post because they were
999-
the creator) to determine access. You'll probably want this option - it's
1000-
flexible enough to solve the above situation.
997+
* :doc:`Voters </cookbook/security/voters>` allow you to use business logic
998+
(e.g. the user can edit this post because they were the creator) to determine
999+
access. You'll probably want this option - it's flexible enough to solve the
1000+
above situation.
10011001

10021002
* :doc:`ACLs </cookbook/security/acl>` allow you to create a database structure
10031003
where you can assign *any* arbitrary user *any* access (e.g. EDIT, VIEW)
@@ -1378,7 +1378,7 @@ Learn More from the Cookbook
13781378

13791379
* :doc:`Forcing HTTP/HTTPS </cookbook/security/force_https>`
13801380
* :doc:`Impersonating a User </cookbook/security/impersonating_user>`
1381-
* :doc:`/cookbook/security/voters_data_permission`
1381+
* :doc:`/cookbook/security/voters`
13821382
* :doc:`Access Control Lists (ACLs) </cookbook/security/acl>`
13831383
* :doc:`/cookbook/security/remember_me`
13841384
* :doc:`/cookbook/security/multiple_user_providers`

Diff for: components/console/introduction.rst

+10-14
Original file line numberDiff line numberDiff line change
@@ -175,22 +175,18 @@ Verbosity Levels
175175
The ``VERBOSITY_VERY_VERBOSE`` and ``VERBOSITY_DEBUG`` constants were introduced
176176
in version 2.3
177177

178-
The console has 5 levels of verbosity. These are defined in the
178+
The console has five verbosity levels. These are defined in the
179179
:class:`Symfony\\Component\\Console\\Output\\OutputInterface`:
180180

181-
======================================= ==================================
182-
Mode Value
183-
======================================= ==================================
184-
OutputInterface::VERBOSITY_QUIET Do not output any messages
185-
OutputInterface::VERBOSITY_NORMAL The default verbosity level
186-
OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages
187-
OutputInterface::VERBOSITY_VERY_VERBOSE Informative non essential messages
188-
OutputInterface::VERBOSITY_DEBUG Debug messages
189-
======================================= ==================================
190-
191-
You can specify the quiet verbosity level with the ``--quiet`` or ``-q``
192-
option. The ``--verbose`` or ``-v`` option is used when you want an increased
193-
level of verbosity.
181+
=========================================== ================================== =====================
182+
Value Meaning Console option
183+
=========================================== ================================== =====================
184+
``OutputInterface::VERBOSITY_QUIET`` Do not output any messages ``-q`` or ``--quiet``
185+
``OutputInterface::VERBOSITY_NORMAL`` The default verbosity level (none)
186+
``OutputInterface::VERBOSITY_VERBOSE`` Increased verbosity of messages ``-v``
187+
``OutputInterface::VERBOSITY_VERY_VERBOSE`` Informative non essential messages ``-vv``
188+
``OutputInterface::VERBOSITY_DEBUG`` Debug messages ``-vvv``
189+
=========================================== ================================== =====================
194190

195191
.. tip::
196192

Diff for: cookbook/map.rst.inc

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
* :doc:`Security Authorization (Denying Access) </cookbook/security/index>`
178178

179179
* :doc:`/cookbook/security/voters`
180-
* :doc:`/cookbook/security/voters_data_permission`
181180
* :doc:`/cookbook/security/acl`
182181
* :doc:`/cookbook/security/acl_advanced`
183182
* :doc:`/cookbook/security/force_https`

Diff for: cookbook/security/acl.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the ACL system comes in.
1414
Using ACL's isn't trivial, and for simpler use cases, it may be overkill.
1515
If your permission logic could be described by just writing some code (e.g.
1616
to check if a Blog is owned by the current User), then consider using
17-
:doc:`voters </cookbook/security/voters_data_permission>`. A voter is passed the object
17+
:doc:`voters </cookbook/security/voters>`. A voter is passed the object
1818
being voted on, which you can use to make complex decisions and effectively
1919
implement your own ACL. Enforcing authorization (e.g. the ``isGranted``
2020
part) will look similar to what you see in this entry, but your voter

Diff for: cookbook/security/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Authorization (Denying Access)
3131
:maxdepth: 2
3232

3333
voters
34-
voters_data_permission
3534
acl
3635
acl_advanced
3736
force_https

Diff for: cookbook/security/voter_interface.rst.inc

-24
This file was deleted.

0 commit comments

Comments
 (0)