Skip to content

Commit 926de06

Browse files
authored
Merge pull request #387 from symfony-cmf/remove-unused-config
remove unused content_basepath from phpcr configuration
2 parents 99576cc + f6b028c commit 926de06

File tree

11 files changed

+48
-10
lines changed

11 files changed

+48
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Changelog
22
=========
33

4+
* **2017-02-03**: [BC BREAK] Removed unused `cmf_routing.dynamic.persistence.phpcr.content_basepath`
5+
46
2.0.0-RC1
57
---------
68

UPGRADE-2.0.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,51 @@
6868
- cmf_sonata_admin_integration.routing.redirect_route_admin
6969
```
7070
71+
* The settings `admin_basepath` and `content_basepath` are only relevant for the admin and thus have been moved as well.
72+
73+
**Before**
74+
```yaml
75+
cmf_routing:
76+
# ...
77+
dynamic:
78+
persistence:
79+
phpcr:
80+
admin_basepath: '/cms/routes'
81+
content_basepath: '/cms/content'
82+
```
83+
```xml
84+
<config xmlns="http://cmf.symfony.com/schema/dic/routing">
85+
<dynamic>
86+
<persistence>
87+
<phpcr
88+
admin-basepath="/cms/routes"
89+
content-basepath="/cms/content"
90+
/>
91+
</persistence>
92+
</dynamic>
93+
</config>
94+
```
95+
96+
**After**
97+
```yaml
98+
cmf_sonata_phpcr_admin_integration:
99+
# ...
100+
bundles:
101+
routing:
102+
basepath: '/cms/routes'
103+
content_basepath: '/cms/content'
104+
```
105+
```xml
106+
<config xmlns="http://cmf.symfony.com/schema/dic/sonata-phpcr-admin-integration">
107+
<bundles>
108+
<routing
109+
basepath="/cms/routes"
110+
content-basepath="/cms/content"
111+
/>
112+
</bundles>
113+
</config>
114+
```
115+
71116
## Route Model
72117

73118
* Removed `getAddFormatPattern()`/`setAddFormatPattern()` from the model

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"suggest": {
3131
"doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents (^1.4)",
3232
"doctrine/phpcr-bundle": "To enable support for the PHPCR ODM documents",
33-
"doctrine/orm": "To enable support for the ORM entities (^2.5)",
34-
"symfony-cmf/content-bundle": "To optionally use the configured value for 'content_basepath' from the CoreBundle"
33+
"doctrine/orm": "To enable support for the ORM entities (^2.5)"
3534
},
3635
"conflict": {
3736
"doctrine/phpcr-odm": "<1.4"

src/DependencyInjection/CmfRoutingExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ private function loadPhpcrProvider(array $config, LoaderInterface $loader, Conta
214214
$container->setParameter('cmf_routing.backend_type_phpcr', true);
215215
$container->setParameter('cmf_routing.dynamic.persistence.phpcr.route_basepaths', array_values(array_unique($config['route_basepaths'])));
216216

217-
$container->setParameter('cmf_routing.dynamic.persistence.phpcr.content_basepath', $config['content_basepath']);
218217
$container->setParameter('cmf_routing.dynamic.persistence.phpcr.manager_name', $config['manager_name']);
219218

220219
if (0 === count($locales)) {

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ private function addDynamicSection(ArrayNodeDefinition $root)
117117
->prototype('scalar')->end()
118118
->defaultValue(['/cms/routes'])
119119
->end() // route_basepaths
120-
->scalarNode('content_basepath')->defaultValue('/cms/content')->end()
121120
->booleanNode('enable_initializer')
122121
->defaultValue(true)
123122
->end()

src/Resources/config/schema/routing-1.0.xsd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282

8383
<xsd:attribute name="enabled" type="xsd:boolean" />
8484
<xsd:attribute name="manager-name" type="xsd:string" />
85-
<xsd:attribute name="content-basepath" type="xsd:string" />
8685
<xsd:attribute name="enable-initializer" type="xsd:boolean" />
8786
</xsd:complexType>
8887

tests/Resources/Fixtures/config/config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
'/cms/routes',
3535
'/simple',
3636
],
37-
'content_basepath' => '/cms/content',
3837
'enable_initializer' => true,
3938
],
4039
],

tests/Resources/Fixtures/config/config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
<persistence>
2525
<phpcr
26-
content-basepath="/cms/content"
2726
enable-initializer="true"
2827
>
2928
<route-basepath>/cms/routes</route-basepath>

tests/Resources/Fixtures/config/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ cmf_routing:
1717
route_basepaths:
1818
- /cms/routes
1919
- /simple
20-
content_basepath: /cms/content
2120
enable_initializer: true
2221
locales: [en, fr]
2322
auto_locale_pattern: true

tests/Resources/Fixtures/config/config3.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<persistence>
44
<phpcr
55
manager-name="default"
6-
content-basepath="/cms/content"
76
enable-initializer="true"
87
>
98
<route-basepath>/cms/routes</route-basepath>

tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public function testSupportsAllConfigFormats()
5656
'/cms/routes',
5757
'/simple',
5858
],
59-
'content_basepath' => '/cms/content',
6059
'manager_name' => null,
6160
'enable_initializer' => true,
6261
],

0 commit comments

Comments
 (0)