Skip to content

Commit 60e9d91

Browse files
committed
Merge branch '4.1' into 4.2
* 4.1: Update micro_kernel_trait.rst Minor tweaks Recommend registering the error handler in prod validator: comparison constraints value Minor fixes in the Doctrine listeners article
2 parents 91c0a16 + 1e104b5 commit 60e9d91

File tree

11 files changed

+18
-15
lines changed

11 files changed

+18
-15
lines changed

components/debug.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ tools.
3737

3838
.. caution::
3939

40-
You should never enable the debug tools in a production environment as
41-
they might disclose sensitive information to the user.
40+
You should never enable the debug tools, except for the error handler, in a
41+
production environment as they might disclose sensitive information to the user.
4242

4343
Enabling the Error Handler
4444
--------------------------
@@ -52,6 +52,9 @@ fatal errors)::
5252

5353
ErrorHandler::register();
5454

55+
This error handler is enabled by default in the production environment when the
56+
application uses the FrameworkBundle because it generates better error logs.
57+
5558
Enabling the Exception Handler
5659
------------------------------
5760

configuration/micro_kernel_trait.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
5555
{
5656
// kernel is a service that points to this class
5757
// optional 3rd argument is the route name
58-
$routes->add('/random/{limit}', 'Kernel::randomNumber');
58+
$routes->add('/random/{limit}', 'kernel::randomNumber');
5959
}
6060

6161
public function randomNumber($limit)

doctrine/event_listeners_subscribers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ entity), you should check for the entity's class type in your method
129129

130130
In Doctrine 2.4, a feature called Entity Listeners was introduced.
131131
It is a lifecycle listener class used for an entity. You can read
132-
about it in `the Doctrine Documentation`_.
132+
about it in `the DoctrineBundle documentation`_.
133133

134134
Creating the Subscriber Class
135135
-----------------------------
@@ -204,9 +204,6 @@ whenever possible.
204204
Starting from Symfony 4.2, Doctrine entity listeners are always lazy. In
205205
previous Symfony versions this behavior was configurable.
206206

207-
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
208-
.. _`the Doctrine Documentation`: https://symfony.com/doc/current/bundles/DoctrineBundle/entity-listeners.html
209-
210207
Priorities for Event Listeners
211208
------------------------------
212209

@@ -261,3 +258,6 @@ numbers mean that listeners are invoked earlier.
261258
->autowire(MyLowPriorityListener::class)
262259
->addTag('doctrine.event_listener', ['event' => 'postPersist', 'priority' => 1])
263260
;
261+
262+
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
263+
.. _`the DoctrineBundle documentation`: https://symfony.com/doc/current/bundles/DoctrineBundle/entity-listeners.html

reference/constraints/EqualTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ and that the ``age`` is ``20``, you could do the following:
7575
<class name="App\Entity\Person">
7676
<property name="firstName">
7777
<constraint name="EqualTo">
78-
<value>Mary</value>
78+
Mary
7979
</constraint>
8080
</property>
8181
<property name="age">

reference/constraints/GreaterThan.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following constraints ensure that:
7474
<class name="App\Entity\Person">
7575
<property name="siblings">
7676
<constraint name="GreaterThan">
77-
<value>5</value>
77+
5
7878
</constraint>
7979
</property>
8080
<property name="age">

reference/constraints/GreaterThanOrEqual.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following constraints ensure that:
7272
<class name="App\Entity\Person">
7373
<property name="siblings">
7474
<constraint name="GreaterThanOrEqual">
75-
<value>5</value>
75+
5
7676
</constraint>
7777
</property>
7878
<property name="age">

reference/constraints/IdenticalTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following constraints ensure that:
7878
<class name="App\Entity\Person">
7979
<property name="firstName">
8080
<constraint name="IdenticalTo">
81-
<value>Mary</value>
81+
Mary
8282
</constraint>
8383
</property>
8484
<property name="age">

reference/constraints/LessThan.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following constraints ensure that:
7474
<class name="App\Entity\Person">
7575
<property name="siblings">
7676
<constraint name="LessThan">
77-
<value>5</value>
77+
5
7878
</constraint>
7979
</property>
8080
<property name="age">

reference/constraints/LessThanOrEqual.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following constraints ensure that:
7272
<class name="App\Entity\Person">
7373
<property name="siblings">
7474
<constraint name="LessThanOrEqual">
75-
<value>5</value>
75+
5
7676
</constraint>
7777
</property>
7878
<property name="age">

reference/constraints/NotEqualTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ the following:
7777
<class name="App\Entity\Person">
7878
<property name="firstName">
7979
<constraint name="NotEqualTo">
80-
<value>Mary</value>
80+
Mary
8181
</constraint>
8282
</property>
8383
<property name="age">

reference/constraints/NotIdenticalTo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following constraints ensure that:
7878
<class name="App\Entity\Person">
7979
<property name="firstName">
8080
<constraint name="NotIdenticalTo">
81-
<value>Mary</value>
81+
Mary
8282
</constraint>
8383
</property>
8484
<property name="age">

0 commit comments

Comments
 (0)