8000 Merge branch '4.0' · symfony/symfony-docs@d883641 · GitHub
[go: up one dir, main page]

Skip to content

Commit d883641

Browse files
committed
Merge branch '4.0'
2 parents a413a47 + 74cf715 commit d883641

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

routing/custom_route_loader.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ and configure the service and method to call:
7373

7474
.. code-block:: yaml
7575
76-
# app/config/routing.yml
76+
# config/routes.yaml
7777
admin_routes:
7878
resource: 'admin_route_loader:loadRoutes'
7979
type: service
8080
8181
.. code-block:: xml
8282
83-
<!-- app/config/routing.xml -->
83+
<!-- config/routes.xml -->
8484
<?xml version="1.0" encoding="UTF-8" ?>
8585
<routes xmlns="http://symfony.com/schema/routing"
8686
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -92,7 +92,7 @@ and configure the service and method to call:
9292
9393
.. code-block:: php
9494
95-
// app/config/routing.php
95+
// config/routes.php
9696
use Symfony\Component\Routing\RouteCollection;
9797
9898
$routes = new RouteCollection();
@@ -306,7 +306,7 @@ configuration file - you can call the
306306
{
307307
$routes = new RouteCollection();
308308

309-
$resource = '@ThirdPartyBundle/Resources/config/routing.yaml';
309+
$resource = '@ThirdPartyBundle/Resources/config/routes.yaml';
310310
$type = 'yaml';
311311

312312
$importedRoutes = $this->import($resource, $type);

security.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ be fooled by the "Yes" next to Authenticated, you're just an anonymous user:
129129

130130
You'll learn later how to deny access to certain URLs or controllers.
131131

132+
.. note::
133+
134+
If you do not see toolbar, make sure you installed the :doc:`profiler </profile>`
135+
using this command:
136+
137+
.. code-block:: terminal
138+
139+
$ composer require profiler --dev
140+
132141
.. tip::
133142

134143
Security is *highly* configurable and there's a

security/guard_authentication.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ property they use to access their account via the API::
2727

2828
/**
2929
* @ORM\Entity
30-
* @ORM\Table(name="user")
30+
* @ORM\Table(name="`user`")
3131
*/
3232
class User implements UserInterface
3333
{
@@ -71,6 +71,13 @@ property they use to access their account via the API::
7171
// more getters/setters
7272
}
7373

74+
.. caution::
75+
76+
In the example above, the table name is ``user``. This is a reserved SQL
77+
keyword and `must be quoted with backticks`_ in Doctrine to avoid errors.
78+
You might also change the table name (e.g. with ``app_users``) to solve
79+
this issue.
80+
7481
.. tip::
7582

7683
This User doesn't have a password, but you can add a ``password`` property if
@@ -544,3 +551,5 @@ Frequently Asked Questions
544551
to actually authenticate the user. You can continue doing that (see previous
545552
question) or use the ``User`` object from FOSUserBundle and create your own
546553
authenticator(s) (just like in this article).
554+
555+
.. _`must be quoted with backticks`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words

0 commit comments

Comments
 (0)
0