Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce14399

Browse files
Merge branch '3.4'
* 3.4: (26 commits) [Routing] Fix resource miss [Security] Fixed auth provider authenticate() cannot return void [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml declare argument type Improving annotation loader message [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks Update UPGRADE-4.0.md streamed response should return $this $isClientIpsVali is not used [WebServerBundle] Prevent commands from being registered by convention content can be a resource Adding the Form default theme files to be warmed up in Twig's cache Remove BC Break label from `NullDumper` class Username and password in basic auth are allowed to contain '.' Remove obsolete PHPDoc from UriSigner [Serializer] YamlEncoder: throw if the Yaml component isn't installed [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed [PropertyInfo] Add support for the iterable type pdo session fix Fixed pathinfo calculation for requests starting with a question mark. - fix bad conflict resolving issue - port symfony/symfony#21968 to 3.3+ ...
2 parents 58a76bb + 2674b94 commit ce14399

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

DependencyInjection/Compiler/ExtensionPass.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ public function process(ContainerBuilder $container)
4343
if ($container->has('form.extension')) {
4444
$container->getDefinition('twig.extension.form')->addTag('twig.extension');
4545
$reflClass = new \ReflectionClass('Symfony\Bridge\Twig\Extension\FormExtension');
46-
$container->getDefinition('twig.loader.native_filesystem')->addMethodCall('addPath', array(dirname(dirname($reflClass->getFileName())).'/Resources/views/Form'));
46+
47+
$coreThemePath = dirname(dirname($reflClass->getFileName())).'/Resources/views/Form';
48+
$container->getDefinition('twig.loader.native_filesystem')->addMethodCall('addPath', array($coreThemePath));
49+
50+
$paths = $container->getDefinition('twig.cache_warmer')->getArgument(2);
51+
$paths[$coreThemePath] = null;
52+
$container->getDefinition('twig.cache_warmer')->replaceArgument(2, $paths);
53+
$container->getDefinition('twig.template_iterator')->replaceArgument(2, $paths);
4754
}
4855

4956
if ($container->has('router')) {

DependencyInjection/TwigExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public function load(array $configs, ContainerBuilder $container)
106106
}
107107
}
108108

109+
// paths are modified in ExtensionPass if forms are enabled
109110
$container->getDefinition('twig.cache_warmer')->replaceArgument(2, $config['paths']);
110111
$container->getDefinition('twig.template_iterator')->replaceArgument(2, $config['paths']);
111112

0 commit comments

Comments
 (0)