diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3ddd8c5..aeb490e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,14 @@
Changelog
=========
+2.1.1
+-----
+
+* **2018-11-13**: [BUGFIX] Older template path `CmfBlockBundl:Block:some-template.html.twig` is replaced to `@CmfBlock/Block/some-template.html.twig` to be recognized by newer Symfony versions
+
+2.1.0
+-----
+
* **2017-11-16**: Removed php 5.6 and 7.0 support, removed Symfony 3.0.* and 3.1.* support
2.0.0
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 5223ea29..9e2fa8ea 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -5,8 +5,13 @@
bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php"
>
-
- ./tests/
+
+ ./tests/Unit
+
+
+
+ ./tests/WebTest
+ ./tests/Functional
diff --git a/src/Block/ContainerBlockService.php b/src/Block/ContainerBlockService.php
index 7a14f008..b6b07e5c 100644
--- a/src/Block/ContainerBlockService.php
+++ b/src/Block/ContainerBlockService.php
@@ -30,7 +30,7 @@ class ContainerBlockService extends AbstractBlockService implements BlockService
/**
* @var string
*/
- protected $template = 'CmfBlockBundle:Block:block_container.html.twig';
+ protected $template = '@CmfBlock/Block/block_container.html.twig';
/**
* @param string $name
diff --git a/src/Block/MenuBlockService.php b/src/Block/MenuBlockService.php
index b0275b7c..5cf2c0c3 100644
--- a/src/Block/MenuBlockService.php
+++ b/src/Block/MenuBlockService.php
@@ -25,7 +25,7 @@
*/
class MenuBlockService extends AbstractBlockService implements BlockServiceInterface
{
- protected $template = 'CmfBlockBundle:Block:block_menu.html.twig';
+ protected $template = '@CmfBlock/Block/block_menu.html.twig';
public function __construct($name, $templating, $template = null)
{
diff --git a/src/Block/SimpleBlockService.php b/src/Block/SimpleBlockService.php
index c28d7da8..f8b36c0f 100644
--- a/src/Block/SimpleBlockService.php
+++ b/src/Block/SimpleBlockService.php
@@ -20,7 +20,7 @@
class SimpleBlockService extends AbstractBlockService implements BlockServiceInterface
{
- protected $template = 'CmfBlockBundle:Block:block_simple.html.twig';
+ protected $template = '@CmfBlock/Block/block_simple.html.twig';
public function __construct($name, $templating, $template = null)
{
diff --git a/src/Block/StringBlockService.php b/src/Block/StringBlockService.php
index 5aa8fb52..47cf5fe6 100644
--- a/src/Block/StringBlockService.php
+++ b/src/Block/StringBlockService.php
@@ -20,7 +20,7 @@
class StringBlockService extends AbstractBlockService implements BlockServiceInterface
{
- protected $template = 'CmfBlockBundle:Block:block_string.html.twig';
+ protected $template = '@CmfBlock/Block/block_string.html.twig';
public function __construct($name, $templating, $template = null)
{
diff --git a/src/DependencyInjection/CmfBlockExtension.php b/src/DependencyInjection/CmfBlockExtension.php
index 9c14fac9..a2b39d09 100644
--- a/src/DependencyInjection/CmfBlockExtension.php
+++ b/src/DependencyInjection/CmfBlockExtension.php
@@ -31,7 +31,7 @@ public function prepend(ContainerBuilder $container)
if (isset($bundles['SonataBlockBundle'])) {
$config = [
'templates' => [
- 'block_base' => 'CmfBlockBundle:Block:block_base.html.twig',
+ 'block_base' => '@CmfBlock/Block/block_base.html.twig',
],
'blocks_by_class' => [
0 => [
@@ -40,7 +40,7 @@ public function prepend(ContainerBuilder $container)
'title' => 'Insert the rss title',
'url' => false,
'maxItems' => 10,
- 'template' => 'CmfBlockBundle:Block:block_rss.html.twig',
+ 'template' => '@CmfBlock/Block/block_rss.html.twig',
'itemClass' => 'Symfony\\Cmf\\Bundle\\BlockBundle\\Model\\FeedItem',
],
],
@@ -93,9 +93,9 @@ private function loadPhpcr(array $config, XmlFileLoader $loader, ContainerBuilde
$bundles = $container->getParameter('kernel.bundles');
if (isset($bundles['CmfCreateBundle'])) {
$blockLoader = $container->getDefinition('cmf.block.simple');
- $blockLoader->addMethodCall('setTemplate', ['CmfBlockBundle:Block:block_simple_createphp.html.twig']);
+ $blockLoader->addMethodCall('setTemplate', ['@CmfBlock/Block/block_simple_createphp.html.twig']);
$blockLoader = $container->getDefinition('cmf.block.string');
- $blockLoader->addMethodCall('setTemplate', ['CmfBlockBundle:Block:block_string_createphp.html.twig']);
+ $blockLoader->addMethodCall('setTemplate', ['@CmfBlock/Block/block_string_createphp.html.twig']);
}
if (isset($bundles['CmfMenuBundle'])) {
diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml
index 885c820d..95c1f4d3 100644
--- a/src/Resources/config/services.xml
+++ b/src/Resources/config/services.xml
@@ -47,7 +47,7 @@
cmf.block.slideshow
- CmfBlockBundle:Block:block_slideshow.html.twig
+ @CmfBlock/Block/block_slideshow.html.twig