-
The Admin extensions where moved into
symfony-cmf/sonata-admin-integration-bundle. With the move, the admin extension service names also changed. If you are using one of the routing extensions, you need to adjust your configuration.Before:
# app/config/config.yml sonata_admin: extensions: cmf_routing.admin_extension.route_referrers: implements: - Symfony\Cmf\Component\Routing\RouteReferrersInterface cmf_core.admin_extension.publish_workflow.time_period: implements: - Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
After:
# app/config/config.yml sonata_admin: extensions: cmf_sonata_admin_integration.routing.extension.route_referrers: implements: - Symfony\Cmf\Component\Routing\RouteReferrersInterface cmf_sonata_admin_integration.routing.extension.frontend_link: implements: - Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
Admin service names also changed. If you are using the admin, you need to adjust your configuration, i.e. in the sonata dashboard:
Before:
# app/config/config.yml sonata_admin: dashboard: groups: content: label: URLs icon: '<i class="fa fa-file-text-o"></i>' items: - cmf_routing.route_admin - cmf_routing.redirect_route_admin
After:
# app/config/config.yml sonata_admin: dashboard: groups: content: label: URLs icon: '<i class="fa fa-file-text-o"></i>' items: - cmf_sonata_admin_integration.routing.route_admin - cmf_sonata_admin_integration.routing.redirect_route_admin
-
The settings
admin_basepathandcontent_basepathare only relevant for the admin and thus have been moved as well.Before:
cmf_routing: # ... dynamic: persistence: phpcr: admin_basepath: '/cms/routes' content_basepath: '/cms/content'
<config xmlns="http://cmf.symfony.com/schema/dic/routing"> <dynamic> <persistence> <phpcr admin-basepath="/cms/routes" content-basepath="/cms/content" /> </persistence> </dynamic> </config>
After:
cmf_sonata_phpcr_admin_integration: # ... bundles: routing: basepath: '/cms/routes' content_basepath: '/cms/content'
<config xmlns="http://cmf.symfony.com/schema/dic/sonata-phpcr-admin-integration"> <bundles> <routing basepath="/cms/routes" content-basepath="/cms/content" /> </bundles> </config>
-
Removed
getAddFormatPattern()/setAddFormatPattern()from the modelRouteandgetAddTrailingSlash()/setAddTrailingSlash()from the PHPCRRoute. UsegetOption()/setOption()with'add_format_pattern'or'add_trailing_slash'instead.Before:
$route->setAddFormatPattern(true); $route->setAddTrailingSlash(true); if ($route->getAddFormatPattern() || $route->getAddTrailingSlash()) { // ... }
After:
$route->setOption('add_format_pattern', true); $route->setOption('add_trailing_slash', true); if ($route->getOption('add_format_pattern') || $route->getOption('add_trailing_slash')) { // ... }
-
Removed
getParent()/setParent()from PHPCRRouteandRedirectRoute. UsegetParentDocument()/setParentDocument()instead.Before:
$route = new Route(); $route->setParent($routeRoot);
After:
$route = new Route(); $route->setParentDocument($routeRoot);
-
Removed the
route_basepathsetting, useroute_basepathsinstead.Before:
cmf_routing: # ... dynamic: persistence: phpcr: route_basepath: '/cms/routes'
<config xmlns="http://cmf.symfony.com/schema/dic/routing"> <dynamic> <persistence> <phpcr route-basepath="/cms/routes" /> </persistence> </dynamic> </config>
After:
cmf_routing: # ... dynamic: persistence: phpcr: route_basepaths: ['/cms/routes']
<config xmlns="http://cmf.symfony.com/schema/dic/routing"> <dynamic> <persistence> <phpcr> <route-basepath>/cms/routes</route-basepath> </phpcr> </persistence> </dynamic> </config>
-
The
contentTemplaterequest attribute is deprecated in favor oftemplate. The CmfContentBundle has been adjusted accordingly.Before:
public function documentAction($contentDocument, $contentTemplate) { // ... }
After:
public function documentAction($contentDocument, $template) { // ... }
The deprecated
contentTemplatewill be kept for backwards compatibility and will be removed in version 3.0.