diff --git a/core/core.services.yml b/core/core.services.yml index 4da78a00d7211fa2ceb56e9f2d75f4eed70113fb..0fa5ab98a3a28dfb5438db501d568fdb967cd3ca 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -1351,7 +1351,6 @@ services: class: Drupal\Core\PathProcessor\PathProcessorFront tags: - { name: path_processor_inbound, priority: 200 } - - { name: path_processor_outbound, priority: 200 } arguments: ['@config.factory'] route_processor_current: class: Drupal\Core\RouteProcessor\RouteProcessorCurrent diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php index 8045dd371b4d5ced6c42a101d4437ae271a0c812..1136de701f2dfe8f8ad7ea2d20e6ba0e9d787491 100644 --- a/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php +++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php @@ -3,16 +3,13 @@ namespace Drupal\Core\PathProcessor; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Render\BubbleableMetadata; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Processes the inbound path by resolving it to the front page if empty. - * - * @todo - remove ::processOutbound() when we remove UrlGenerator::fromPath(). */ -class PathProcessorFront implements InboundPathProcessorInterface, OutboundPathProcessorInterface { +class PathProcessorFront implements InboundPathProcessorInterface { /** * A config factory for retrieving required config settings. @@ -56,15 +53,4 @@ public function processInbound($path, Request $request) { return $path; } - /** - * {@inheritdoc} - */ - public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) { - // The special path '<front>' links to the default front page. - if ($path === '/<front>') { - $path = '/'; - } - return $path; - } - } diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php index eac05d59f337f81b8a3e5a1e8b9b1b0ae3b2570f..df82584fa4ff2081f7a34a42652a35968e1dea14 100644 --- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php +++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php @@ -68,27 +68,4 @@ public function testProcessInboundBadConfig() { $processor->processInbound('/', new Request()); } - /** - * Tests basic outbound processing functionality. - * - * @covers ::processOutbound - * @dataProvider providerProcessOutbound - */ - public function testProcessOutbound($path, $expected) { - $config_factory = $this->prophesize(ConfigFactoryInterface::class); - $processor = new PathProcessorFront($config_factory->reveal()); - $this->assertEquals($expected, $processor->processOutbound($path)); - } - - /** - * Outbound paths and expected results. - */ - public function providerProcessOutbound() { - return [ - ['/<front>', '/'], - ['<front>', '<front>'], - ['/user', '/user'], - ]; - } - }