Skip to content

Commit

Permalink
EZP-23866: Removed deprecated features
Browse files Browse the repository at this point in the history
* legacy_mode setting
* legacy_aware_routes setting
  • Loading branch information
lolautruche committed Jan 13, 2015
1 parent 302fee1 commit c53c78c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 23 deletions.
20 changes: 20 additions & 0 deletions doc/bc/changes-6.0.md
Expand Up @@ -18,3 +18,23 @@ Changes affecting version compatibility with former or future versions.

* `getLegacyKernel()` shorthand method in `eZ\Bundle\EzPublishCoreBundle\Controller` has been removed.
If you used it, please base your controller on `eZ\Bundle\EzPublishLegacyBundle\Controller` instead.

* `legacy_mode` setting has been removed.
Move your setting to `ez_publish_legacy` (LegacyBundle) namespace instead:

```yml
# This is deprecated
ezpublish:
system:
my_siteaccess:
legacy_mode: true

# New setting
ez_publish_legacy:
system:
my_siteaccess:
legacy_mode: true
```

* `legacy_aware_routes` setting has been removed.
Move your setting to `ez_publish_legacy` instead.
39 changes: 39 additions & 0 deletions doc/upgrade/6.0.md
@@ -0,0 +1,39 @@
# Upgrade steps from 5.4 to 6.0

## Legacy mode
`ezpublish.system.<siteaccessName>.legacy_mode` setting has been removed.
Move your setting to `ez_publish_legacy` (LegacyBundle) namespace instead.

*Before*:
```yml
ezpublish:
system:
my_siteaccess:
legacy_mode: true
```
*After*:
```yml
ez_publish_legacy:
system:
my_siteaccess:
legacy_mode: true
```

## Legacy aware routes
`ezpublish.router.default_router.legacy_aware_routes` setting has been removed.
Move your setting to `ez_publish_legacy` (LegacyBundle) namespace instead.

*Before*:
```yml
ezpublish:
router:
default_router:
legacy_aware_routes: ["my_route"]
```

*After*:
```yml
ez_publish_legacy:
legacy_aware_routes: ["my_route"]
```
Expand Up @@ -352,10 +352,6 @@ private function addRouterSection( ArrayNodeDefinition $rootNode )
->info( $nonSAAwareInfo )
->example( array( 'my_route_name', 'some_prefix_' ) )
->end()
->arrayNode( 'legacy_aware_routes' )
->prototype( 'scalar' )->end()
->info( 'DEPRECATED. Use ez_publish_legacy.legacy_aware_routes instead.' )
->end()
->end()
->end()
->end()
Expand Down
Expand Up @@ -77,10 +77,6 @@ public function addSemanticConfig( NodeBuilder $nodeBuilder )
->cannotBeEmpty()
->info( 'Directory where binary files (from ezbinaryfile field type) are stored. Default value is "original"' )
->end()
// @deprecated since 5.4.2. Will be removed in 6.0.
->booleanNode( 'legacy_mode' )
->info( 'DEPRECATED. Use ez_publish_legacy.system.your_siteaccess.legacy_mode instead.' )
->end()
// @deprecated since 5.3. Will be removed in 6.x.
->scalarNode( 'session_name' )
->info( 'DEPRECATED. Use session.name instead.' )
Expand Down Expand Up @@ -149,12 +145,6 @@ public function mapConfig( array &$scopeSettings, $currentScope, ContextualizerI
$this->addDatabaseConfigSuggestion( $currentScope, $scopeSettings['database'] );
if ( isset( $scopeSettings['repository'] ) )
$contextualizer->setContextualParameter( 'repository', $currentScope, $scopeSettings['repository'] );
// @deprecated since 5.4.2
if ( isset( $scopeSettings['legacy_mode'] ) )
{
$contextualizer->setContextualParameter( 'legacy_mode', $currentScope, $scopeSettings['legacy_mode'] );
$contextualizer->setContextualParameter( 'url_alias_router', $currentScope, !$scopeSettings['legacy_mode'] );
}
if ( isset( $scopeSettings['cache_pool_name'] ) )
$contextualizer->setContextualParameter( 'cache_pool_name', $currentScope, $scopeSettings['cache_pool_name'] );
if ( isset( $scopeSettings['var_dir'] ) )
Expand Down
Expand Up @@ -243,15 +243,6 @@ private function handleRouting( array $config, ContainerBuilder $container, File
)
);
}

// Define additional routes that are allowed with legacy_mode: true.
if ( isset( $config['router']['default_router']['legacy_aware_routes'] ) )
{
$container->setParameter(
'ezpublish.default_router.legacy_aware_routes',
$config['router']['default_router']['legacy_aware_routes']
);
}
}

/**
Expand Down

0 comments on commit c53c78c

Please sign in to comment.