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

Appearance settings

Commit 0ddf3d2

Browse filesBrowse files
author
Noel
committed
moved the tips to an include fragment file
1 parent 84c1541 commit 0ddf3d2
Copy full SHA for 0ddf3d2

File tree

Expand file treeCollapse file tree

4 files changed

+22
-57
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+22
-57
lines changed
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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;

‎components/routing.rst

Copy file name to clipboardExpand all lines: components/routing.rst
+1-19Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -312,25 +312,7 @@ Last but not least there are
312312
route definitions from class annotations. The specific details are left
313313
out here.
314314

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\Autoload\ClassLoader;
326-
use Doctrine\Common\Annotations\AnnotationRegistry;
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
334316

335317
The all-in-one Router
336318
~~~~~~~~~~~~~~~~~~~~~

‎components/serializer.rst

Copy file name to clipboardExpand all lines: components/serializer.rst
+1-19Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -314,25 +314,7 @@ You are now able to serialize only attributes in the groups you want::
314314

315315
.. _ignoring-attributes-when-serializing:
316316

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\Autoload\ClassLoader;
328-
use Doctrine\Common\Annotations\AnnotationRegistry;
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
336318

337319
Ignoring Attributes
338320
-------------------

‎components/validator/resources.rst

Copy file name to clipboardExpand all lines: components/validator/resources.rst
+1-19Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,7 @@ method. It takes an optional annotation reader instance, which defaults to
119119
To disable the annotation loader after it was enabled, call
120120
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::disableAnnotationMapping`.
121121

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\Autoload\ClassLoader;
133-
use Doctrine\Common\Annotations\AnnotationRegistry;
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
141123

142124
Using Multiple Loaders
143125
----------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.