Skip to content

Commit 7ad0c22

Browse files
authored
Update deprecated path alias apis. (#959)
1 parent ed8472c commit 7ad0c22

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • modules/graphql_core

modules/graphql_core/src/Plugin/GraphQL/Fields/Routing/InternalUrl/Alias.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
66
use Drupal\Core\Language\LanguageManagerInterface;
7-
use Drupal\Core\Path\AliasManagerInterface;
7+
use Drupal\path_alias\AliasManagerInterface;
88
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
99
use Drupal\Core\Url;
1010
use Drupal\graphql\GraphQL\Execution\ResolveContext;
@@ -29,7 +29,7 @@ class Alias extends FieldPluginBase implements ContainerFactoryPluginInterface {
2929
/**
3030
* Instance of an alias manager.
3131
*
32-
* @var \Drupal\Core\Path\AliasManagerInterface
32+
* @var \Drupal\path_alias\AliasManagerInterface
3333
*/
3434
protected $aliasManager;
3535

@@ -41,7 +41,7 @@ public static function create(ContainerInterface $container, array $configuratio
4141
$configuration,
4242
$pluginId,
4343
$pluginDefinition,
44-
$container->get('path.alias_manager')
44+
$container->get('path_alias.manager')
4545
);
4646
}
4747

@@ -54,7 +54,7 @@ public static function create(ContainerInterface $container, array $configuratio
5454
* The plugin id.
5555
* @param mixed $pluginDefinition
5656
* The plugin definition.
57-
* @param \Drupal\Core\Path\AliasManagerInterface $aliasManager
57+
* @param \Drupal\path_alias\AliasManagerInterface $aliasManager
5858
* The alias manager service
5959
*/
6060
public function __construct(

modules/graphql_core/tests/src/Kernel/Routing/RouteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\Tests\graphql_core\Kernel\Routing;
44

55
use Drupal\Core\GeneratedUrl;
6-
use Drupal\Core\Path\AliasManagerInterface;
6+
use Drupal\path_alias\AliasManagerInterface;
77
use Drupal\Core\Routing\UrlGeneratorInterface;
88
use Drupal\Tests\graphql_core\Kernel\GraphQLCoreTestBase;
99
use Prophecy\Argument;
@@ -39,7 +39,7 @@ protected function setUp() {
3939
->generateFromRoute('graphql_context_test.a', [], ['query' => []], TRUE)
4040
->willReturn((new GeneratedUrl())->setGeneratedUrl('/my/other/alias'));
4141

42-
$this->container->set('path.alias_manager', $aliasManager->reveal());
42+
$this->container->set('path_alias.manager', $aliasManager->reveal());
4343
$this->container->set('url_generator', $urlGenerator->reveal());
4444
}
4545

0 commit comments

Comments
 (0)