Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
use addAnnotatedClassesToCompile (#4572)
Browse files Browse the repository at this point in the history
* Bundles can hint Symfony about which of their classes contain annotations so they are compiled when generating the application cache to improve the overall performance. Define the list of annotated classes to compile in the addAnnotatedClassesToCompile() method:

https://symfony.com/doc/current/bundles/extension.html#adding-classes-to-compile
  • Loading branch information
craigh authored Jan 1, 2021
1 parent 8ab64d9 commit b0a0c88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DependencyInjection/ZikulaCoreInstallerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ public function load(array $configs, ContainerBuilder $container)
{
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yaml');

$this->addAnnotatedClassesToCompile([
'Zikula\\Bundle\\CoreInstallerBundle\\Controller\\',
]);
}
}

0 comments on commit b0a0c88

Please sign in to comment.