Skip to content

Commit 5c9e512

Browse files
committed
fix typo in exception message and add some explanation
1 parent fcabe73 commit 5c9e512

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

DependencyInjection/CmfRoutingExtension.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,16 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
148148
if (!empty($config['templates_by_class'])) {
149149
$dynamic->addMethodCall('addRouteEnhancer', array(new Reference($this->getAlias() . '.enhancer.templates_by_class')));
150150

151+
/*
152+
* The CoreBundle prepends the controller from ContentBundle if the
153+
* ContentBundle is present in the project.
154+
* If you are sure you do not need a generic router, set the field
155+
* to false to disable explicitly. But you would need something
156+
* else to determine the controller in that case, as no controller
157+
* will not be set by the default route enhancers.
158+
*/
151159
if (null === $config['generic_controller']) {
152-
throw new InvalidConfigurationException('If you configure templates_by_class, you need to configure a generic_router. If you are sure you do not need a generic router, set the field to false to disable explicitly.');
160+
throw new InvalidConfigurationException('If you want to configure templates_by_class, you need to configure the generic_controller option.');
153161
}
154162

155163
if (is_string($config['generic_controller'])) {

0 commit comments

Comments
 (0)