Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mstrelan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
Prior to Drupal 10.2.0 the KernelTestBase::register
method would disable the path alias path processor. This meant kernel tests that installed the path_alias module could load paths without having having the path_alias entity schema installed. The downside of this was that kernel tests that depended on path aliases would need to re-register the path processor manually like below:
Before
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
parent::register($container);
// Read the incoming path alias for these tests.
if ($container->hasDefinition('path_alias.path_processor')) {
$definition = $container->getDefinition('path_alias.path_processor');
$definition->addTag('path_processor_inbound');
$definition->addTag('path_processor_outbound');
}
}
After
Kernel tests that require the path_alias module should install the entity schema as below:
$this->installEntitySchema('path_alias');
Kernel tests that don't require the path_alias module should not install it.
Impacts:
Module developers