8000 feature #27168 [HttpKernel] Add Kernel::getAnnotatedClassesToCompile(… · symfony/symfony@df02969 · GitHub
[go: up one dir, main page]

Skip to content

Commit df02969

Browse files
committed
feature #27168 [HttpKernel] Add Kernel::getAnnotatedClassesToCompile() (nicolas-grekas)
This PR was merged into the 4.1-dev branch. Discussion ---------- [HttpKernel] Add Kernel::getAnnotatedClassesToCompile() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Now that apps are usually bundle-less, we're missing a way to defined the classes to parse annotations for. Here is a PR fixing this by allowing ppl to define a new `getAnnotatedClassesToCompile()` on their kernel when needed. Commits ------- 1d2a49a [HttpKernel] Add Kernel::getAnnotatedClassesToCompile()
2 parents 9d5f50d + 1d2a49a commit df02969

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(Kernel $kernel)
3636
*/
3737
public function process(ContainerBuilder $container)
3838
{
39-
$annotatedClasses = array();
39+
$annotatedClasses = $this->kernel->getAnnotatedClassesToCompile();
4040
foreach ($container->getExtensions() as $extension) {
4141
if ($extension instanceof Extension) {
4242
$annotatedClasses = array_merge($annotatedClasses, $extension->getAnnotatedClassesToCompile());

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,14 @@ public function getCharset()
391391
return 'UTF-8';
392392
}
393393

394+
/**
395+
* Gets the patterns defining the classes to parse and cache for annotations.
396+
*/
397+
public function getAnnotatedClassesToCompile(): array
398+
{
399+
return array();
400+
}
401+
394402
/**
395403
* Initializes bundles.
396404
*

0 commit comments

Comments
 (0)
0