diff --git a/core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php b/core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php index b5d527b1877fd33d351977cd9b6321d1d59fee94..774bcf12b57f08bafb9f9ce6da8177ffa59d02b9 100644 --- a/core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php +++ b/core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php @@ -11,11 +11,25 @@ * Url alias language code process. * * @MigrateProcessPlugin( - * id = "d6_url_alias_language" + * id = "d6_url_alias_language", + * no_ui = TRUE * ) + * + * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. No direct + * replacement is provided. + * + * @see https://www.drupal.org/node/3219051 */ class UrlAliasLanguage extends ProcessPluginBase { + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, $plugin_definition) { + @trigger_error(__CLASS__ . ' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3219051', E_USER_DEPRECATED); + parent::__construct($configuration, $plugin_id, $plugin_definition); + } + /** * {@inheritdoc} */ diff --git a/core/modules/path/tests/src/Unit/migrate/process/d6/UrlAliasLanguageDeprecatedTest.php b/core/modules/path/tests/src/Unit/migrate/process/d6/UrlAliasLanguageDeprecatedTest.php new file mode 100644 index 0000000000000000000000000000000000000000..46461af3c8c8006248f6be7e173d0f7d0169913e --- /dev/null +++ b/core/modules/path/tests/src/Unit/migrate/process/d6/UrlAliasLanguageDeprecatedTest.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\Tests\path\Unit\migrate\process\d6; + +use Drupal\path\Plugin\migrate\process\d6\UrlAliasLanguage; +use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase; + +/** + * Tests error message from deprecated UrlAliasLanguage process plugin. + * + * @group path + * @group legacy + * @coversDefaultClass \Drupal\path\Plugin\migrate\process\d6\UrlAliasLanguage + */ +class UrlAliasLanguageDeprecatedTest extends MigrateProcessTestCase { + + /** + * Tests legacy UrlAliasLanguage process plugin. + */ + public function testUrlAliasLanguageDeprecation() { + $this->expectDeprecation("Drupal\path\Plugin\migrate\process\d6\UrlAliasLanguage is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3219051"); + new UrlAliasLanguage([], 'test', []); + } + +}