Skip to content

Commit 0f5b1a3

Browse files
committed
Added support for twig files being on PPMs watch list.
1 parent f7b5cda commit 0f5b1a3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Bootstraps/Symfony.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ public function postHandle($app)
117117
$container->get('debug.stopwatch')->__construct();
118118
}
119119

120+
//Symfony\Bundle\TwigBundle\Loader\FilesystemLoader
121+
//->Twig_Loader_Filesystem
122+
if ($container->has('twig.loader')) {
123+
$twigLoader = $container->get('twig.loader');
124+
Utils::bindAndCall(function() use ($twigLoader) {
125+
foreach ($twigLoader->cache as $path) {
126+
ppm_register_file($path);
127+
}
128+
}, $twigLoader);
129+
}
130+
120131
//reset all profiler stuff currently supported
121132
if ($container->has('profiler')) {
122133
$profiler = $container->get('profiler');

0 commit comments

Comments
 (0)