Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#9 | 3113020-9.patch | 3.21 KB | alexpott |
#8 | 3113020-8.patch | 47.36 KB | alexpott |
#8 | 4-8-interdiff.txt | 3.35 KB | alexpott |
#4 | 3113020-3.patch | 1.25 KB | alexpott |
Comments
Comment #2
alexpottThis 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.
Comment #3
Berdir4.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? :)
Comment #4
alexpottComment #5
longwaveComment #6
longwaveI think we agreed this is too late now and the deprecation message needs to be moved to D10?
Comment #7
alexpottI don't see any harm in pushing this out to D10.
Comment #8
alexpottLet's do that and add some unit test coverage if we're going to keep it around...
Comment #9
alexpottIgnore the patch in #8 :( forgot to rebase properly. the interdiff is good though.
Comment #10
longwaveLooks great.
Comment #12
catchSo 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!