From f6b028cecc27a30850322850724636601f592e0a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Fri, 3 Feb 2017 11:02:14 +0100 Subject: [PATCH] remove unused content_basepath from phpcr configuration this configuration is only used in the sonata admin --- CHANGELOG.md | 2 + UPGRADE-2.0.md | 45 +++++++++++++++++++ composer.json | 3 +- .../CmfRoutingExtension.php | 1 - src/DependencyInjection/Configuration.php | 1 - src/Resources/config/schema/routing-1.0.xsd | 1 - tests/Resources/Fixtures/config/config.php | 1 - tests/Resources/Fixtures/config/config.xml | 1 - tests/Resources/Fixtures/config/config.yml | 1 - tests/Resources/Fixtures/config/config3.xml | 1 - .../DependencyInjection/ConfigurationTest.php | 1 - 11 files changed, 48 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a360c7f..2c13e994 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ Changelog ========= + * **2017-02-03**: [BC BREAK] Removed unused `cmf_routing.dynamic.persistence.phpcr.content_basepath` + 2.0.0-RC1 --------- diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md index d7157afc..54e2a075 100644 --- a/UPGRADE-2.0.md +++ b/UPGRADE-2.0.md @@ -68,6 +68,51 @@ - cmf_sonata_admin_integration.routing.redirect_route_admin ``` + * The settings `admin_basepath` and `content_basepath` are only relevant for the admin and thus have been moved as well. + + **Before** + ```yaml + cmf_routing: + # ... + dynamic: + persistence: + phpcr: + admin_basepath: '/cms/routes' + content_basepath: '/cms/content' + ``` + ```xml + + + + + + + + ``` + + **After** + ```yaml + cmf_sonata_phpcr_admin_integration: + # ... + bundles: + routing: + basepath: '/cms/routes' + content_basepath: '/cms/content' + ``` + ```xml + + + + + + ``` + ## Route Model * Removed `getAddFormatPattern()`/`setAddFormatPattern()` from the model diff --git a/composer.json b/composer.json index 02914f06..096a440c 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,7 @@ "suggest": { "doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents (^1.4)", "doctrine/phpcr-bundle": "To enable support for the PHPCR ODM documents", - "doctrine/orm": "To enable support for the ORM entities (^2.5)", - "symfony-cmf/content-bundle": "To optionally use the configured value for 'content_basepath' from the CoreBundle" + "doctrine/orm": "To enable support for the ORM entities (^2.5)" }, "conflict": { "doctrine/phpcr-odm": "<1.4" diff --git a/src/DependencyInjection/CmfRoutingExtension.php b/src/DependencyInjection/CmfRoutingExtension.php index 76d8d721..86a84696 100644 --- a/src/DependencyInjection/CmfRoutingExtension.php +++ b/src/DependencyInjection/CmfRoutingExtension.php @@ -214,7 +214,6 @@ private function loadPhpcrProvider(array $config, LoaderInterface $loader, Conta $container->setParameter('cmf_routing.backend_type_phpcr', true); $container->setParameter('cmf_routing.dynamic.persistence.phpcr.route_basepaths', array_values(array_unique($config['route_basepaths']))); - $container->setParameter('cmf_routing.dynamic.persistence.phpcr.content_basepath', $config['content_basepath']); $container->setParameter('cmf_routing.dynamic.persistence.phpcr.manager_name', $config['manager_name']); if (0 === count($locales)) { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 1a6e0da9..e0fe1203 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -117,7 +117,6 @@ private function addDynamicSection(ArrayNodeDefinition $root) ->prototype('scalar')->end() ->defaultValue(['/cms/routes']) ->end() // route_basepaths - ->scalarNode('content_basepath')->defaultValue('/cms/content')->end() ->booleanNode('enable_initializer') ->defaultValue(true) ->end() diff --git a/src/Resources/config/schema/routing-1.0.xsd b/src/Resources/config/schema/routing-1.0.xsd index 59546851..3d113665 100644 --- a/src/Resources/config/schema/routing-1.0.xsd +++ b/src/Resources/config/schema/routing-1.0.xsd @@ -82,7 +82,6 @@ - diff --git a/tests/Resources/Fixtures/config/config.php b/tests/Resources/Fixtures/config/config.php index 920616de..4f315c19 100644 --- a/tests/Resources/Fixtures/config/config.php +++ b/tests/Resources/Fixtures/config/config.php @@ -34,7 +34,6 @@ '/cms/routes', '/simple', ], - 'content_basepath' => '/cms/content', 'enable_initializer' => true, ], ], diff --git a/tests/Resources/Fixtures/config/config.xml b/tests/Resources/Fixtures/config/config.xml index b4764824..82696a31 100644 --- a/tests/Resources/Fixtures/config/config.xml +++ b/tests/Resources/Fixtures/config/config.xml @@ -23,7 +23,6 @@ /cms/routes diff --git a/tests/Resources/Fixtures/config/config.yml b/tests/Resources/Fixtures/config/config.yml index 1003e5b9..eba1f5af 100644 --- a/tests/Resources/Fixtures/config/config.yml +++ b/tests/Resources/Fixtures/config/config.yml @@ -17,7 +17,6 @@ cmf_routing: route_basepaths: - /cms/routes - /simple - content_basepath: /cms/content enable_initializer: true locales: [en, fr] auto_locale_pattern: true diff --git a/tests/Resources/Fixtures/config/config3.xml b/tests/Resources/Fixtures/config/config3.xml index 7f368f24..262b39b4 100644 --- a/tests/Resources/Fixtures/config/config3.xml +++ b/tests/Resources/Fixtures/config/config3.xml @@ -3,7 +3,6 @@ /cms/routes diff --git a/tests/Unit/DependencyInjection/ConfigurationTest.php b/tests/Unit/DependencyInjection/ConfigurationTest.php index 3c538ed3..3b2f1223 100644 --- a/tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/tests/Unit/DependencyInjection/ConfigurationTest.php @@ -56,7 +56,6 @@ public function testSupportsAllConfigFormats() '/cms/routes', '/simple', ], - 'content_basepath' => '/cms/content', 'manager_name' => null, 'enable_initializer' => true, ],