Create rule for 'Term::getVocabularyId()' deprecated method
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3238595. --> Reported by: [technoveltyco](https://www.drupal.org/user/853392) >>> <h2>Drupal version</h2> <p>Core 9.x</p> <h2>Drupal Rector version</h2> <p>0.11.3</p> <h2>Problem / Motivation</h2> <p><code>Call to undefined method Drupal\taxonomy\Entity\Term::getVocabularyId() in Drupal\unique_entity_title\Plugin\Validation\Constraint\UniqueEntityTitleValidator-&gt;validate()</code></p> <p>When using Drupal 9, getVocabularyId() has been <a href="https://api.drupal.org/api/drupal/core%21modules%21taxonomy%21src%21Entity%21Term.php/function/Term%3A%3AgetVocabularyId/8.8.x">removed </a>from Drupal 9.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Replace getVocabularyId() with bundle().</p>
issue