Skip to content
Snippets Groups Projects
Unverified Commit 802719a5 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3100496 by amateescu, Donnyboypony, alexpott, Berdir, daffie,...

Issue #3100496 by amateescu, Donnyboypony, alexpott, Berdir, daffie, PapaGrande: Workspaces should only alter non-deprecated path_alias services
parent 88bdfdda
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,9 @@ public function alter(ContainerBuilder $container) { ...@@ -136,6 +136,9 @@ public function alter(ContainerBuilder $container) {
foreach ($services as $id => $class) { foreach ($services as $id => $class) {
if (!$container->hasDefinition($id)) { if (!$container->hasDefinition($id)) {
$definition = $container->register($id, $class); $definition = $container->register($id, $class);
// Mark the fallback services as deprecated in order to allow other
// modules to provide additional checks before relying or altering them.
$definition->setDeprecated(TRUE, 'The "%service_id%" service is in fallback mode. See https://drupal.org/node/3092086');
switch ($id) { switch ($id) {
case 'path_alias.subscriber': case 'path_alias.subscriber':
$definition->addArgument(new Reference('path.alias_manager')); $definition->addArgument(new Reference('path.alias_manager'));
......
...@@ -22,9 +22,14 @@ public function alter(ContainerBuilder $container) { ...@@ -22,9 +22,14 @@ public function alter(ContainerBuilder $container) {
$container->setParameter('renderer.config', $renderer_config); $container->setParameter('renderer.config', $renderer_config);
// Replace the class of the 'path_alias.repository' service. // Replace the class of the 'path_alias.repository' service.
$container->getDefinition('path_alias.repository') if ($container->hasDefinition('path_alias.repository')) {
->setClass(WorkspacesAliasRepository::class) $definition = $container->getDefinition('path_alias.repository');
->addMethodCall('setWorkspacesManager', [new Reference('workspaces.manager')]); if (!$definition->isDeprecated()) {
$definition
->setClass(WorkspacesAliasRepository::class)
->addMethodCall('setWorkspacesManager', [new Reference('workspaces.manager')]);
}
}
// Ensure that there's no active workspace while running database updates by // Ensure that there's no active workspace while running database updates by
// removing the relevant tag from all workspace negotiator services. // removing the relevant tag from all workspace negotiator services.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment