File tree Expand file tree Collapse file tree 4 files changed +22
-57
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +22
-57
lines changed
Original file line number Diff line number Diff line change
1
+ .. note::
2
+
3
+ In order to use the annotation loader, you should have installed the
4
+ ``doctrine/annotations`` and ``doctrine/cache`` packages from `Packagist`_.
5
+
6
+ .. tip::
7
+
8
+ Remember that annotation classes aren't loaded automatically, so you should load
9
+ them like Symfony usually does in the ``app/autoload.php`` file::
10
+
11
+ use Composer\Autoload\ClassLoader;
12
+ use Doctrine\Common\Annotations\AnnotationRegistry;
13
+
14
+ /** @var ClassLoader $loader */
15
+ $loader = require __DIR__.'/../vendor/autoload.php';
16
+
17
+ AnnotationRegistry::registerLoader([$loader, 'loadClass']);
18
+
19
+ return $loader;
Original file line number Diff line number Diff line change @@ -312,25 +312,7 @@ Last but not least there are
312
312
route definitions from class annotations. The specific details are left
313
313
out here.
314
314
315
- .. note ::
316
-
317
- In order to use the annotation loader, you should have installed the
318
- ``doctrine/annotations `` and ``doctrine/cache `` packages from `Packagist `_.
319
-
320
- .. tip ::
321
-
322
- Remember that annotation classes aren't loaded automatically, so you should load
323
- them like Symfony usually does in the ``app/autoload.php `` file::
324
-
325
- use Composer\A utoload\C lassLoader;
326
- use Doctrine\C ommon\A nnotations\A nnotationRegistry;
327
-
328
- /** @var ClassLoader $loader */
329
- $loader = require __DIR__.'/../vendor/autoload.php';
330
-
331
- AnnotationRegistry::registerLoader([$loader, 'loadClass']);
332
-
333
- return $loader;
315
+ .. include :: /_includes/_rewrite_rule_tip.rst.inc
334
316
335
317
The all-in-one Router
336
318
~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -314,25 +314,7 @@ You are now able to serialize only attributes in the groups you want::
314
314
315
315
.. _ignoring-attributes-when-serializing :
316
316
317
- .. note ::
318
-
319
- In order to use the annotation loader, you should have installed the
320
- ``doctrine/annotations `` and ``doctrine/cache `` packages from `Packagist `_.
321
-
322
- .. tip ::
323
-
324
- Remember that annotation classes aren't loaded automatically, so you should load
325
- them like Symfony usually does in the ``app/autoload.php `` file::
326
-
327
- use Composer\A utoload\C lassLoader;
328
- use Doctrine\C ommon\A nnotations\A nnotationRegistry;
329
-
330
- /** @var ClassLoader $loader */
331
- $loader = require __DIR__.'/../vendor/autoload.php';
332
-
333
- AnnotationRegistry::registerLoader([$loader, 'loadClass']);
334
-
335
- return $loader;
317
+ .. include :: /_includes/_rewrite_rule_tip.rst.inc
336
318
337
319
Ignoring Attributes
338
320
-------------------
Original file line number Diff line number Diff line change @@ -119,25 +119,7 @@ method. It takes an optional annotation reader instance, which defaults to
119
119
To disable the annotation loader after it was enabled, call
120
120
:method: `Symfony\\ Component\\ Validator\\ ValidatorBuilder::disableAnnotationMapping `.
121
121
122
- .. note ::
123
-
124
- In order to use the annotation loader, you should have installed the
125
- ``doctrine/annotations `` and ``doctrine/cache `` packages from `Packagist `_.
126
-
127
- .. tip ::
128
-
129
- Remember that annotation classes aren't loaded automatically, so you should load
130
- them like Symfony usually does in the ``app/autoload.php `` file::
131
-
132
- use Composer\A utoload\C lassLoader;
133
- use Doctrine\C ommon\A nnotations\A nnotationRegistry;
134
-
135
- /** @var ClassLoader $loader */
136
- $loader = require __DIR__.'/../vendor/autoload.php';
137
-
138
- AnnotationRegistry::registerLoader([$loader, 'loadClass']);
139
-
140
- return $loader;
122
+ .. include :: /_includes/_rewrite_rule_tip.rst.inc
141
123
142
124
Using Multiple Loaders
143
125
----------------------
You can’t perform that action at this time.
0 commit comments