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 18bbf37

Browse filesBrowse files
committed
feature #21837 [FrameworkBundle] Lazy configuration of annotations' loader and @required (nicolas-grekas)
This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Lazy configuration of annotations' loader and `@required` | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This would remove the need for symfony/symfony-standard#1052 and for the `autoload.php` file altogether. Tested on symfony-demo with great success so far. Commits ------- d332b37 [FrameworkBundle] Lazy configuration of annotations' loader and `@required`
2 parents 2a99e16 + d332b37 commit 18bbf37
Copy full SHA for 18bbf37

File tree

1 file changed

+13
-1
lines changed
Filter options

1 file changed

+13
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml
+13-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.