10.2: EntityReferenceTestTrait to EntityReferenceFieldCreationTrait rector using RenameClassRector
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3404121. -->
Reported by: [bbrala](https://www.drupal.org/user/3366066)
>>>
<p><a href="https://github.com/palantirnet/drupal-rector/pull/272">https://github.com/palantirnet/drupal-rector/pull/272</a></p>
<p>Fixes: <a href="https://www.drupal.org/node/3401941">https://www.drupal.org/node/3401941</a></p>
<p>When renaming it does not remove the old use statement. This should not error, but is ugly.</p>
<p>Can only be avoided if we start applying codestyle to the files. Which seem overkill. Although something like this could work maybe? rector-src/vendor/symplify/easy-coding-standard/config/set/common/namespaces.php</p>
> Related issue: [Issue #3371547](https://www.drupal.org/node/3371547)
issue