Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit e3bbc68

Browse files
committed
do not try to load the publish workflow service if the CmfCoreBundle is not loaded
1 parent c605b26 commit e3bbc68

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
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+
unreleased
5+
----------
6+
7+
* **2016-05-25** Use "auto" for publish workflow enabled flag. If auto and
8+
CmfCoreBundle is not instantiated, publish workflow integration is not enabled.
9+
410
2.0.0
511
-----
612

DependencyInjection/CmfMenuExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ public function load(array $configs, ContainerBuilder $container)
4444
$this->loadExtensions($config, $loader, $container);
4545
}
4646

47-
if ($config['publish_workflow']['enabled']) {
47+
if (true === $config['publish_workflow']['enabled']
48+
|| 'auto' === $config['publish_workflow']['enabled'] && isset($bundles['CmfCoreBundle'])
49+
) {
4850
$loader->load('publish-workflow.xml');
4951
}
5052
}

DependencyInjection/Configuration.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ public function getConfigTreeBuilder()
8181

8282
->arrayNode('publish_workflow')
8383
->addDefaultsIfNotSet()
84-
->canBeDisabled()
84+
->children()
85+
->enumNode('enabled')
86+
->values(array(true, false, 'auto'))
87+
->defaultValue('auto')
88+
->end()
89+
->end()
8590
->end()
8691
->end()
8792
;

Resources/config/schema/menu-1.0.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</xsd:complexType>
5252

5353
<xsd:complexType name="publish-workflow">
54-
<xsd:attribute name="enabled" type="xsd:boolean" />
54+
<xsd:attribute name="enabled" type="enable_auto" />
5555
</xsd:complexType>
5656

5757
<xsd:simpleType name="enable_auto">

0 commit comments

Comments
 (0)