Problem/Motivation

We did

   * @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0.
   *   Use Drupal\Core\Entity\EntityTypeInterface::entityClassImplements()
   *   instead.
   */
  public function isSubclassOf($class);

prior to the deprecation policy and triggering silenced errors.

Proposed resolution

  • Trigger a deprecation error to prove it's not used and help contrib upgrade.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

This method is being removed in #3069696: Remove BC layers from the entity system. I was incorrect that this is being used in core - it is being used in contrib though. So what we could do here is add an @trigger_error to the method as this gives yet another indication to contrib that's it being removed.

Berdir’s picture

4.something pages of results on http://grep.xnddx.ru/search?text=isSubclassOf&page=4, https://dev.acquia.com/drupal9/deprecation_status/errors?message=isSubcl... only has 18 calls but I guess for most it doesn't know the right type

Not sure how many of these modules have tests, but yeah, a @trigger_error() wouldn't hurt for 8.9. bug or task? :)

alexpott’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.25 KB
longwave’s picture

longwave’s picture

Status: Needs review » Needs work

I think we agreed this is too late now and the deprecation message needs to be moved to D10?

alexpott’s picture

I don't see any harm in pushing this out to D10.

alexpott’s picture

Status: Needs work » Needs review
FileSize
3.35 KB
47.36 KB

Let's do that and add some unit test coverage if we're going to keep it around...

alexpott’s picture

Ignore the patch in #8 :( forgot to rebase properly. the interdiff is good though.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks great.

  • catch committed cf0bc9a on 9.0.x
    Issue #3113020 by alexpott, longwave: Properly deprecate \Drupal\Core\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

So this was properly deprecated to the extent it was possible at the time.

Makes sense to me to backport only back to 8.9.x - we don't want a new deprecation error on 8.8.x sites for something that's not removed until 10.0.x (could maybe cause a custom test suite to fail), but we should have it documented properly in 8.9.x

Committed cf0bc9a and pushed to 9.0.x + cherry-picked to 8.9.x. Thanks!

  • catch committed fe1acc0 on 8.9.x
    Issue #3113020 by alexpott, longwave: Properly deprecate \Drupal\Core\...

Status: Fixed » Closed (fixed)

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