Skip to content

Commit eb635f7

Browse files
dbuElectricMaxxx
authored andcommitted
do not hard depend on symfony templating being activated (#255)
1 parent c81bf57 commit eb635f7

File tree

10 files changed

+923
-615
lines changed

10 files changed

+923
-615
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
2.1.0
5+
-----
6+
7+
* Symfony 4 support
8+
* Removed PHP 5.6 and 7.0 support, removed support for Symfony 3.0 - 3.2
9+
410
2.0.0
511
-----
612

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"symfony/security-bundle": "^2.8 || ^3.3 || ^4.0",
2323
"symfony/phpunit-bridge": "^3.3 || ^4.0",
2424
"mockery/mockery": "^0.9.4",
25-
"symfony-cmf/routing-bundle": "^2.1.0-RC1",
26-
"symfony-cmf/testing": "^2.1.0-RC1",
25+
"symfony-cmf/routing-bundle": "^2.1.0",
26+
"symfony-cmf/testing": "^2.1.0",
2727
"doctrine/dbal": "2.5.*",
2828
"doctrine/phpcr-odm": "^1.4|^2.0 ",
2929
"symfony/browser-kit": "^2.8 || ^3.3 || ^4.0",
@@ -34,12 +34,12 @@
3434
"symfony/asset": "^2.8 || ^3.3 || ^4.0"
3535
},
3636
"suggest": {
37-
"symfony/twig-bundle": "To get access to the CMF twig extension (^2.1)",
37+
"symfony/twig-bundle": "To get access to the CMF twig extension (^2.8 || ^3.3 || ^4.0)",
3838
"doctrine/phpcr-bundle": "To be able to use the CMF twig extension (^1.0)",
3939
"doctrine/phpcr-odm": "To be able to use the CMF twig extension (^1.0)",
40-
"symfony/security-bundle": "To be able to use the publish workflow system (^2.1)",
41-
"symfony-cmf/routing": "To be able to use the CMF twig extension functions cmf_prev_linkable/cmf_next_linkable (^2.0)",
42-
"symfony-cmf/routing-bundle": "To be able to enable the publish_workflow_listener (^2.0)",
40+
"symfony/security-bundle": "To be able to use the publish workflow system (^2.8 || ^3.3 || ^4.0)",
41+
"symfony-cmf/routing": "To be able to use the CMF twig extension functions cmf_prev_linkable/cmf_next_linkable (^2.1)",
42+
"symfony-cmf/routing-bundle": "To be able to enable the publish_workflow_listener (^2.1)",
4343
"symfony-cmf/sonata-admin-integration-bundle": "To provide an admin interface for the PHPCR ODM documents."
4444
},
4545
"autoload": {

src/DependencyInjection/CmfCoreExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function load(array $configs, ContainerBuilder $container)
257257
$container->setParameter($this->getAlias().'.persistence.phpcr.manager_name', $config['persistence']['phpcr']['manager_name']);
258258
$container->setParameter($this->getAlias().'.persistence.phpcr.basepath', $config['persistence']['phpcr']['basepath']);
259259

260-
$templatingHelper = $container->getDefinition($this->getAlias().'.templating.helper');
260+
$templatingHelper = $container->getDefinition($this->getAlias().'.templating.cmf');
261261
$templatingHelper->addMethodCall('setDoctrineRegistry', [
262262
new Reference($config['persistence']['phpcr']['manager_registry']),
263263
'%cmf_core.persistence.phpcr.manager_name%',

src/Resources/config/services.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010

1111
<services>
1212

13+
<service id="cmf_core.templating.cmf" class="Symfony\Cmf\Bundle\CoreBundle\Templating\Helper\Cmf" public="false">
14+
<argument type="service" id="cmf_core.publish_workflow.checker" on-invalid="ignore"/>
15+
</service>
16+
1317
<service id="cmf_core.twig.children_extension" class="Symfony\Cmf\Bundle\CoreBundle\Twig\Extension\CmfExtension" public="false">
14-
<argument type="service" id="cmf_core.templating.helper"/>
18+
<argument type="service" id="cmf_core.templating.cmf"/>
1519
<tag name="twig.extension"/>
1620
</service>
1721

1822
<service id="cmf_core.templating.helper" class="Symfony\Cmf\Bundle\CoreBundle\Templating\Helper\CmfHelper" public="false">
19-
<argument type="service" id="cmf_core.publish_workflow.checker" on-invalid="ignore"/>
23+
<argument type="service" id="cmf_core.templating.cmf"/>
2024
<tag name="templating.helper" alias="cmf"/>
2125
</service>
2226

0 commit comments

Comments
 (0)