\Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait
has been moved to \Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait
.
\Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait
is deprecated.
If you have a test trying to use this trait that you want to work on both older (8.6.x + 8.7.x) and newer branches (8.8.x, 8.9.x, 9.0.x, etc). You'll need to do this near the top of your test file:
use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;
if (!trait_exists('\Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait')) {
class_alias('\Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait', '\Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait');
}
This way, your test will try to use the new (non-deprecated) version of the trait. If it can't be found at the new location, it will fall back to using the trait in the old location. This will continue to work on all branches, but not throw deprecation warnings on 8.8.x and above. When the 8.7.x series is officially End-of-Life (EOL) and unsupported, you can remove the if (!trait_exists(...)) { ... }
and simply have:
use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;