8000 [FrameworkBundle] Lazy configuration of annotations' loader and `@req… · symfony/symfony@311abd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 311abd7

Browse files
[FrameworkBundle] Lazy configuration of annotations' loader and @required
1 parent 75dffd1 commit 311abd7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
66

77
<services>
8-
<service id="annotations.reader" class="Doctrine\Common\Annotations\AnnotationReader" public="false" />
8+
<service id="annotations.registry" class="Doctrine\Common\Annotations\AnnotationRegistry" public="false">
9+
<call method="registerLoader">
10+
<argument>class_exists</argument>
11+
</call>
12+
</service>
13+
<service id="annotations.reader" class="Doctrine\Common\Annotations\AnnotationReader" public="false">
14+
<argument>null</argument>
15+
<argument type="service" id="annotations.registry" /><!-- dummy arg to register class_exists as annotation loader only when required -->
16+
<call method="addGlobalIgnoredName">
17+
<argument>required</argument>
18+
</call>
19+
</service>
920
<service id="Doctrine\Common\Annotations\Reader" alias="annotations.reader" public="false" />
1021

1122
<service id="annotations.cached_reader" class="Doctrine\Common\Annotations\CachedReader" public="false">

0 commit comments

Comments
 (0)
0