@@ -169,40 +169,3 @@ Using Configuration to Change the Services
169169The Extension is also the class that handles the configuration for that
170170particular bundle (e.g. the configuration in ``config/packages/<bundle_alias>.yaml ``).
171171To read more about it, see the ":doc: `/bundles/configuration `" article.
172-
173- Adding Classes to Compile
174- -------------------------
175-
176- Bundles can hint Symfony about which of their classes contain annotations so
177- they are compiled when generating the application cache to improve the overall
178- performance. Define the list of annotated classes to compile in the
179- ``addAnnotatedClassesToCompile() `` method::
180-
181- public function load(array $configs, ContainerBuilder $container): void
182- {
183- // ...
184-
185- $this->addAnnotatedClassesToCompile([
186- // you can define the fully qualified class names...
187- 'Acme\\BlogBundle\\Controller\\AuthorController',
188- // ... but glob patterns are also supported:
189- 'Acme\\BlogBundle\\Form\\**',
190-
191- // ...
192- ]);
193- }
194-
195- .. note ::
196-
197- If some class extends from other classes, all its parents are automatically
198- included in the list of classes to compile.
199-
200- Patterns are transformed into the actual class namespaces using the classmap
201- generated by Composer. Therefore, before using these patterns, you must generate
202- the full classmap executing the ``dump-autoload `` command of Composer.
203-
204- .. warning ::
205-
206- This technique can't be used when the classes to compile use the ``__DIR__ ``
207- or ``__FILE__ `` constants, because their values will change when loading
208- these classes from the ``classes.php `` file.
0 commit comments