Skip to content

Commit ab57a7a

Browse files
dbuwouterj
authored andcommitted
throw exception on publish workflow with buggy version of php
1 parent c4dadd2 commit ab57a7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

DependencyInjection/CmfCoreExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,12 @@ public function setupFormTypes(ContainerBuilder $container, LoaderInterface $loa
344344
*/
345345
private function loadPublishWorkflow($config, XmlFileLoader $loader, ContainerBuilder $container)
346346
{
347+
// this check can be removed again for version 1.3+ as we increased the php version to 5.3.9
348+
if (version_compare(PHP_VERSION, '5.3.7', 'lt')) {
349+
// do not accept to work with bug in is_subclass_of
350+
throw new InvalidConfigurationException('You can not use the publish workflow with PHP < 5.3.7');
351+
}
352+
347353
$container->setParameter($this->getAlias().'.publish_workflow.view_non_published_role', $config['view_non_published_role']);
348354
$loader->load('publish-workflow.xml');
349355

0 commit comments

Comments
 (0)