Skip to content

Commit a3ee1c5

Browse files
committed
Revert "bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)"
This reverts commit 4d40852, reversing changes made to dd2fb85.
1 parent afd0b10 commit a3ee1c5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\TwigBundle\DependencyInjection;
1313

1414
use Symfony\Component\Config\FileLocator;
15-
use Symfony\Component\Config\Resource\DirectoryResource;
1615
use Symfony\Component\DependencyInjection\ContainerBuilder;
1716
use Symfony\Component\DependencyInjection\Reference;
1817
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
@@ -67,26 +66,22 @@ public function load(array $configs, ContainerBuilder $container)
6766
} else {
6867
$twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace));
6968
}
70-
$container->addResource(new DirectoryResource($path));
7169
}
7270

7371
// register bundles as Twig namespaces
7472
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
7573
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/'.$bundle.'/views')) {
7674
$this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle);
77-
$container->addResource(new DirectoryResource($dir));
7875
}
7976

8077
$reflection = new \ReflectionClass($class);
8178
if (is_dir($dir = dirname($reflection->getFilename()).'/Resources/views')) {
8279
$this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle);
83-
$container->addResource(new DirectoryResource($dir));
8480
}
8581
}
8682

8783
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/views')) {
8884
$twigFilesystemLoaderDefinition->addMethodCall('addPath', array($dir));
89-
$container->addResource(new DirectoryResource($dir));
9085
}
9186

9287
if (!empty($config['globals'])) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy