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

Commit aa44506

Browse files
committed
Merge pull request #105 from symfony-cmf/configurable_basepath
Enable basepath to be specified in config
2 parents 337977e + c437af2 commit aa44506

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

DependencyInjection/CmfRoutingAutoExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function load(array $configs, ContainerBuilder $container)
4848
$container->setParameter('cmf_routing_auto.metadata.loader.resources', $resources);
4949

5050
if ($this->isConfigEnabled($container, $config['persistence']['phpcr'])) {
51-
$container->setParameter('cmf_routing_auto.persistence.phpcr.route_baseresource', $config['persistence']['phpcr']['route_baseresource']);
51+
$container->setParameter('cmf_routing_auto.persistence.phpcr.route_basepath', $config['persistence']['phpcr']['route_basepath']);
5252
}
5353
}
5454

Resources/config/auto_route.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<!-- Adapters -->
5454
<service id="cmf_routing_auto.adapter.phpcr_odm" class="%cmf_routing_auto.adapter.phpcr_odm.class%">
5555
<argument type="service" id="doctrine_phpcr.odm.default_document_manager"/>
56-
<argument>/test/auto-route</argument>
56+
<argument>%cmf_routing_auto.persistence.phpcr.route_basepath%</argument>
5757
</service>
5858

5959
<service id="cmf_routing_auto.phpcrodm_auto_route_listener" class="%cmf_routing_auto.phpcrodm_auto_route_listener.class%">

Tests/Resources/app/config/app_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ cmf_routing:
1616

1717
cmf_routing_auto:
1818
auto_mapping: false
19+
persistence:
20+
phpcr:
21+
route_basepath: /test/auto-route
1922
mapping:
2023
resources:
2124
- @CmfRoutingAutoBundle/Tests/Resources/app/config/routing_auto.yml

0 commit comments

Comments
 (0)