We removed all the BC layers in #3096976: Remove taxonomy.module BC layers but we missed two methods that weren't tagged correctly:

  /**
   * Removed reference to terms from term_hierarchy.
   *
   * @param array $tids
   *   Array of terms that need to be removed from hierarchy.
   *
   * @todo Remove this method in Drupal 9.0.x. Now the parent references are
   *   automatically cleared when deleting a taxonomy term.
   *   https://www.drupal.org/node/2785693
   */
  public function deleteTermHierarchy($tids);

  /**
   * Updates terms hierarchy information with the hierarchy trail of it.
   *
   * @param \Drupal\Core\Entity\EntityInterface $term
   *   Term entity that needs to be added to term hierarchy information.
   *
   * @todo remove this method Drupal 9.0.x. Now the parent references are
   *   automatically updates when when a taxonomy term is added/updated.
   *   https://www.drupal.org/node/2785693
   */
  public function updateTermHierarchy(EntityInterface $term);

This is used in 3 contrib modules: http://grep.xnddx.ru/search?text=deleteTermHierarchy&filename= - so can we actually remove this or do we need to do the full trigger_error() deprecation dance?

This was originally flagged to be done in #2785693: Follow up #2543726: @todo deleteTermHierarchy and updateTermHierarchy but this was duplicated against a different issue and then never completed.

CommentFileSizeAuthor
#13 3110671-13.patch4.26 KBandypost
#2 3110671.patch1.82 KBlongwave

Issue fork drupal-3110671

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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new1.82 KB
andypost’s picture

Status: Needs review » Reviewed & tested by the community

As no usage left and methods are empty, looks good

catch’s picture

Status: Reviewed & tested by the community » Needs work

We need to properly deprecate these in 8.8.x/8.9.x so they can be removed. Can be a spin-off issue to complete the deprecation leaving this one for removal.

I think that probably needs to be a 10.x deprecation at this point but will get a second opinion. Were these included in a change record?

longwave’s picture

Change record for the related issue was https://www.drupal.org/node/2936675 but doesn't mention deprecation or that these methods are no-ops now.

I guess as they do nothing anyway leaving it until 10.x is not really a problem.

longwave’s picture

wim leers’s picture

Title: Remove remaining deprecated code from taxonomy.module » [PP-1] Remove remaining deprecated code from taxonomy.module
xjm’s picture

Version: 9.0.x-dev » 10.0.x-dev

It's too late to do the removal in D9 at this point, so we'll need to deprecate it in 9.1.x and remove it in 10.0.x. We probably don't actually need an issue open for the removal, since it'll get swept up in the D10 deprecation at this point, but moving to 10.0.x for now.

grcwolf’s picture

andypost’s picture

Title: [PP-1] Remove remaining deprecated code from taxonomy.module » Remove remaining deprecated code from taxonomy.module
Version: 10.0.x-dev » 11.0.x-dev
Status: Postponed » Needs work

The issue is targeted for 11.0.x according codebase for re-title and NW for patch

core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php:181:    $this->expectDeprecation('Drupal\taxonomy\TermStorage::deleteTermHierarchy() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. It is a no-op since 8.6.0. Parent references are automatically cleared when deleting a taxonomy term. See https://www.drupal.org/node/2936675');
andypost’s picture

Status: Needs work » Needs review
Issue tags: +Deprecation Removal
StatusFileSize
new4.26 KB
longwave’s picture

Status: Needs review » Postponed

11.0.x is not open for commits yet, but the patch is ready for when that happens.

gábor hojtsy’s picture

Title: Remove remaining deprecated code from taxonomy.module » [11.x] Remove remaining deprecated code from taxonomy.module
Version: 11.0.x-dev » 11.x-dev
Issue tags: +Major version only

Updating title, tags and version number based on recent announcement at https://www.drupal.org/about/core/blog/new-drupal-core-branching-scheme-...

quietone’s picture

Status: Postponed » Needs work

This needs an MR.

quietone’s picture

Title: [11.x] Remove remaining deprecated code from taxonomy.module » Remove remaining deprecated code from taxonomy.module
wim leers’s picture

Issue tags: +Needs reroll

Patch in #2 should be converted to an MR.

samit.310@gmail.com made their first commit to this issue’s fork.

samitk’s picture

Assigned: Unassigned » samitk
Status: Needs work » Needs review
Issue tags: -Needs reroll

Hi Wim Leers,

Rerolled and MR has been created for #2, Please review.

https://git.drupalcode.org/project/drupal/-/merge_requests/6883

Thanks
Samit K.

smustgrave’s picture

Status: Needs review » Needs work

Failed checks.

andypost’s picture

There's more things to remove

andypost’s picture

Status: Needs work » Needs review
Related issues: +#3261261: Properly deprecate term_access query tag

Fixed CS and removed deprecated plugin, term_access has own issue #3261261: Properly deprecate term_access query tag

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Applied MR searched for "@deprecated" and "from drupal:11" and all instances appear to be replaced.

  • catch committed 4c6ea225 on 11.x
    Issue #3110671 by andypost, longwave: Remove remaining deprecated code...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

quietone’s picture

Assigned: samitk » Unassigned

Status: Fixed » Closed (fixed)

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