Skip to content

Commit d020046

Browse files
author
noel
committed
ORM content repository implementation was already included in the bundle but not loaded, now it is
1 parent 5318a50 commit d020046

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

DependencyInjection/CmfRoutingExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
118118
if ($config['persistence']['orm']['enabled']) {
119119
$this->loadOrmProvider($config['persistence']['orm'], $loader, $container, $locales, $config['match_implicit_locale']);
120120
$hasProvider = true;
121+
$hasContentRepository = true;
121122
}
122123

123124
if (isset($config['route_provider_service_id'])) {
@@ -304,6 +305,10 @@ public function loadOrmProvider($config, XmlFileLoader $loader, ContainerBuilder
304305
$definition = $container->getDefinition($this->getAlias() . '.orm_candidates');
305306
$definition->setArguments(array());
306307
}
308+
$container->setAlias(
309+
$this->getAlias() . '.content_repository',
310+
$this->getAlias() . '.orm_content_repository'
311+
);
307312
}
308313

309314
/**

Resources/config/provider-orm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<services>
1414

15-
<service id="cmf_routing.content_repository" class="%cmf_routing.orm.content_repository.class%">
15+
<service id="cmf_routing.orm_content_repository" class="%cmf_routing.orm.content_repository.class%">
1616
<argument type="service" id="doctrine"/>
1717
<call method="setManagerName"><argument>%cmf_routing.dynamic.persistence.orm.manager_name%</argument></call>
1818
</service>

0 commit comments

Comments
 (0)