Problem/Motivation

In PHPStorm, I often accidentally auto-import Drupal\Tests\token\Kernel\KernelTestBase instead of Drupal\KernelTests\KernelTestBase as it seems to come up first on the list.

Given how KernelTestBase is one of the most common class names in the core codebase, it would make it so much easier of token's KernelTestBase was renamed to something unique, like TokenKernelTestBase.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork token-3408043

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kim.pepper created an issue. See original summary.

kim.pepper’s picture

Status: Active » Needs review
berdir’s picture

Status: Needs review » Needs work

Agreed, happened to me too.

But just in case there are tests like that out there, lets keep and @deprecate the old class, that should also make it unlikely to be picked up by phpstorm like that.

kim.pepper’s picture

Status: Needs work » Needs review

Deprecated the old \Drupal\Tests\token\Kernel\KernelTestBase and added a CR.

tyler36’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed on Drupal 10.2.5.

- All Kernel tests classes are now using TokenKernelTestBase.
- Drupal\Tests\token\Kernel\KernelTestBase::class is marked as depreciated.

  • Berdir committed 723e377b on 8.x-1.x authored by kim.pepper
    Issue #3408043: Consider renaming KernelTestBase to something unique
    
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, would have been happy too without the change record, but won't say no to it now that you created it ;)

berdir’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.