From 9fdc69828b07d4c3d5a5cdf8b3bedafb7f932850 Mon Sep 17 00:00:00 2001 From: Karel Date: Thu, 7 Jun 2018 14:49:29 +0200 Subject: [PATCH 1/2] Fixed unit test (#218) --- src/Templating/Helper/BaseHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Templating/Helper/BaseHelper.php b/src/Templating/Helper/BaseHelper.php index 1a156d15..73d7d2d9 100644 --- a/src/Templating/Helper/BaseHelper.php +++ b/src/Templating/Helper/BaseHelper.php @@ -80,7 +80,7 @@ public static function getICUDataVersion() $info = explode("\n", $content); - if ('cli' == PHP_SAPI) { + if ('cli' == \PHP_SAPI) { foreach ($info as $line) { $results = []; From ca945a05e10d8321478b2ede1debbeae6f50765b Mon Sep 17 00:00:00 2001 From: Karel Souffriau Date: Wed, 6 Jun 2018 23:10:02 +0200 Subject: [PATCH 2/2] Improved autowiring support for templating helpers --- src/DependencyInjection/SonataIntlExtension.php | 1 + src/Resources/config/autowire.xml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 src/Resources/config/autowire.xml diff --git a/src/DependencyInjection/SonataIntlExtension.php b/src/DependencyInjection/SonataIntlExtension.php index e1a1e8e0..d95bda1a 100644 --- a/src/DependencyInjection/SonataIntlExtension.php +++ b/src/DependencyInjection/SonataIntlExtension.php @@ -36,6 +36,7 @@ public function load(array $configs, ContainerBuilder $container) $config = $processor->processConfiguration($configuration, $configs); $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('autowire.xml'); $loader->load('intl.xml'); $this->configureTimezone($container, $config); diff --git a/src/Resources/config/autowire.xml b/src/Resources/config/autowire.xml new file mode 100644 index 00000000..f9bb6b1c --- /dev/null +++ b/src/Resources/config/autowire.xml @@ -0,0 +1,8 @@ + + + + + + + +