Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d332b37

Browse files
[FrameworkBundle] Lazy configuration of annotations' loader and @required
1 parent 3d67aba commit d332b37

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@
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.reader" class="Doctrine\Common\Annotations\AnnotationReader" public="false">
9+
<call method="addGlobalIgnoredName">
10+
<argument>required</argument>
11+
<argument type="service">
12+
<!-- dummy arg to register class_exists as annotation loader only when required -->
13+
<service class="Doctrine\Common\Annotations\AnnotationRegistry">
14+
<call method="registerLoader">
15+
<argument>class_exists</argument>
16+
</call>
17+
</service>
18+
</argument>
19+
</call>
20+
</service>
921
<service id="Doctrine\Common\Annotations\Reader" alias="annotations.reader" public="false" />
1022

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

0 commit comments

Comments
 (0)