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
#3213858: [META] Remove deprecated modules and themes from the Drupal 10 branch deals with removing deprecated modules. This plan issue is to deal with all the rest of the deprecated code to be removed that are outside of deprecated modules: classes, methods, procedural functions and code paths that are not in wholly deprecated modules.
Some of these can just be deleted when 10.x opens, which might even be scriptable.
Proposed resolution
- Open issues only if you are going to submit a patch for them. (We don't want lots of stub issues with no activity.) Look carefully for duplicates.
- Tag the issues with Deprecation Removal and file them against the 10.0.x branch.
- For large APIs, a single issue to remove the whole API is best. While we don't usually recommend scoping issues by module instead of concept, in this case, the API provided by a module can be considered a single API, especially for smaller modules. Issues can also be grouped by core subsystem namespace (e.g. things in
core/lib/Drupal/Core/Foo/
). - Remove only:
- The module's own API.
- Legacy tests of the removed API.
Remaining tasks
User interface changes
None.
API changes
Deprecated APIs will be removed.
Data model changes
None.
Comments
Comment #2
andypostFiled #3260615: Remove deprecated schema.inc removal of this and clean-up of other includes better to get in earlier to speed-up core tests and bootstrap
Comment #3
andypostFiled 2 child issues
- #3260765: Remove deprecated code from menu-related subsystems
- #3260766: Remove deprecated file.inc and its mentions for some reason existing clean-up issue is not available, see second linked issue https://www.drupal.org/node/2940031
Updated #2940025: Remove deprecated functions from file module
Comment #4
andypostand 3 remaining
- #3260778: Remove deprecated code from bootstrap.inc
- #3260780: Remove deprecated code from common.inc
- #3260781: Remove deprecated module.inc functions
Comment #5
andypostAnother 3
- #3260801: Remove deprecated code from core/lib/Drupal/Component/Utility
- #3260805: Remove deprecated code from core/lib/Drupal/Core/Routing
- #3260806: Remove deprecated code from core/lib/Drupal/Core/Config
Comment #6
andypostThere's set of issues #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service
Comment #7
andypostComment #8
andypostFiled
- #3261239: Remove deprecations from search module
- #3261240: Remove deprecated taxonomy module functions
- #3261241: Remove deprecated field module functions
Updated #2940025: Remove deprecated functions from file module
Comment #9
andypostAnother set
- #3261243: Remove deprecated comment module functions
- #3261244: Remove deprecated layout_builder module functions
- #3261245: Remove deprecated views module functions
Comment #10
andypostNew issues for review
- #3195193: Remove Shepherd shim code from Tour
- #3261248: Remove deprecated user.module functions
- #3261250: Remove deprecated update.module functions
- #3261251: Remove deprecated node module functions
Comment #11
andypostAnd migration system #3261004: Remove deprecated code from the migration system
Comment #12
andypostand a bit more
- #3261252: Remove deprecated system.module functions
- #3261253: Remove deprecated path.module functions
- #3115308: Remove _access_rest_csrf route requirement
Comment #13
quietone CreditAttribution: quietone at PreviousNext commented@andypost thanks for adding the deprecation of migration system issue, which I was forgot to do, and probably caused the need for some rerolls later. :-(
Noting here that the migration issue removes code from the following non-migrate* modules.
Comment #14
andypostUnblocked and ready for review #3260781: Remove deprecated module.inc functions
Comment #15
andypostThe blocker for views clean-up #3261486: Remove core updates added prior to 9.3.0 and adjust test coverage
Comment #16
andypostFiled
- #3264057: Remove deprecated media system functions
- #3264059: Remove deprecated jsonapi module functions
Comment #17
andypostAnd 2 more
- #3264061: Remove deprecated functions from image module
- #3264062: Remove deprecated functions from editor module
Comment #18
andypostFinished patches for
- #3264067: Remove deprecated code from session namespace
- #3244802: Remove BC layers in entity system
- #3264072: Remove deprecated code from Drupal\Core\Archiver
- #3264073: Remove deprecated code from Drupal\Core\Condition
Comment #19
andypostunpostponed #3188858: Remove the entity_reference module entirely on the Drupal 10 branch
Comment #20
andypostUpdated IS with remaining issues, btw few ones still should be filed
Removed #3265121: Remove Symfony 4 RequestStack BC shim in 11.0.x as it now targeted to D11
Comment #21
andypostThere's some usage in tests
Comment #22
andypostFiled #3265605: Remove constructor argument shim from core/lib/Drupal/Core/Config namespace
Comment #23
andypostComment #24
quietone CreditAttribution: quietone at PreviousNext commentedComment #25
longwaveAdded a few more:
#3269140: Remove deprecated config.storage.staging service
#3269141: Remove deprecated Drupal\Core\StringTranslation\TranslationWrapper to TranslatableMarkup in Drupal 11
#3269143: Remove deprecated theme key stylesheets-remove
#3269149: Remove deprecated settings
#3269152: Remove element_settings BC layer in ajax.js
Comment #26
longwave#3269153: Remove BC layers from the extension system
#3269154: Remove BC layers from the theme system
Comment #27
andypostNot clear how to deal with #3269141: Remove deprecated Drupal\Core\StringTranslation\TranslationWrapper to TranslatableMarkup in Drupal 11
Probably should be major
Comment #28
xjmComment #29
andypostIS is cleaned a bit
Comment #30
andypostadded
#3101620: Remove IE conditional comments support in Drupal 10
#3265121: Remove Symfony 4 RequestStack BC shim in 11.0.x
Comment #31
andypostremoved #3265121 as it's for 11.x
Comment #32
andypostOne more issue #3280399: Mark drupal/core-bridge 9.5.x as abandoned
Comment #33
andypostComment #34
andypostComment #35
andypostComment #36
catch#3261245: Remove deprecated views module functions is in.
Comment #37
catchI've just opened #3285131: Fix constructor deprecation in Drupal\Core\Theme\Registry::__construct(), which should have been straightforward but I think we made the original constructor change incorrectly.
Also opened #3285128: Remove deprecated code in Drupal\Core\UpdateUpdateRegistry which should be possible for a novice to tackle.
Comment #38
catchComment #39
catchOne more: #3285136: Remove a couple of constructor bc layers
Comment #40
catchComment #41
longwaveAdded the remaining constructors in #3285503: Remove deprecated code in constructors
Comment #42
catchComment #43
catchAdding #3290810: Remove updates added prior to 9.4.0 (9.4.4 for ckeditor) and add 9.4.0 database dumps.
Comment #44
catchActually, taking #3290810: Remove updates added prior to 9.4.0 (9.4.4 for ckeditor) and add 9.4.0 database dumps out again because it's not deprecated code removal and it has its own section in the 10.0.0-beta1 tracking issue.
Comment #45
andypostclean-up IS
Comment #46
andypostComment #47
catchWe're down to #3076684: Remove deprecated vendor cleanup scripts and #3269141: Remove deprecated Drupal\Core\StringTranslation\TranslationWrapper to TranslatableMarkup in Drupal 11
Comment #48
longwaveStill quite a few stragglers that don't have child issues yet - grep for
drupal:10
and excludedrupal:11
.Comment #49
longwaveWe have code in ajax.es6.js that has been deprecated since 8.6.0, but #2973400: Mark functions for wrapping Ajax response as deprecated was never completed - can we do this in 9.5.x for removal in 10.0.x?
Comment #50
catchIf we've got already-deprecated code that needs the deprecation documentation/trigger-error fixing, then that's fair game for 9.5.x for removal in 10.0.x still.
Comment #51
SpokjeI'll see your 8.6.0 and raise you
@todo Deprecated in Drupal 8.5.0
Note the very unorthodox use of
@todo
. Is this code "officially" deprecated?#2926958: Remove revision-related methods from EntityStorageInterface
https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/lib/Drupal/C...
Comment #52
catch8.5 might be from before we could actually deprecate things properly in core (deprecation tests etc.)
With something that old, we'd want a 9.5 issue to make the deprecation proper, if that shows there are no core usages, then maybe check for contrib usages, then we can decide if they should be for removal in 10.x or 11.x depending on how deprecated they really are. But either way better to fix the docs/trigger_error() in 9.5.x
Comment #53
SpokjeCopied the last two comments over to #2926958: Remove revision-related methods from EntityStorageInterface
Comment #54
catchComment #55
longwaveComment #56
catchOne more, not a straightforward removal:
#3293284: Throw an exception when Router::generate() is called.
Comment #57
catchEasy straggler #3293297: Remove bc layer in Drupal\Core\Theme\Registry::__construct()
Comment #58
catchComment #59
xjmComment #60
Gábor HojtsyThe first listed remaining task is resolved.
Comment #61
Gábor Hojtsy#3295421: Update TranslationWrapper deprecation to removal in 11.0.0 replaces #3269141: Remove deprecated Drupal\Core\StringTranslation\TranslationWrapper to TranslatableMarkup in Drupal 11 which is moving to Drupal 11.
Comment #62
andypostLooks we should clone the issue for D11 to start collect issues for it. It will be easy to use for upcoming deprecations
Comment #63
Gábor HojtsyCloned this to #3295574: [meta] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch for Drupal 11. Parenting #3269141: Remove deprecated Drupal\Core\StringTranslation\TranslationWrapper to TranslatableMarkup in Drupal 11 to there.
Also #3295421: Update TranslationWrapper deprecation to removal in 11.0.0 landed.
Comment #64
longwaveAdded three more
Comment #65
Gábor Hojtsy#3295625: Remove deprecated code from FormattableMarkup and #3295626: Remove BC layer in Drupal\file\Plugin\rest\resource\FileUploadResource landed.
Comment #66
Gábor HojtsyAdding #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service which was carried over from Drupal 9.
Comment #67
catchMoving #3203920: Replace Contextual Links BackboneJS usage with VanillaJS equivalent out of the issue summary since it's already under #3145958: [META] Re-evaluate use of Backbone.js in core which is listed explicitly in #3118149: [meta] Requirements for tagging Drupal 10.0.0-beta1.
Comment #68
catchSwitching the tabbable issue from #3278625: Deprecate/remove jquery.tabbable.shim to #3296096: Update tabbable deprecation messages to 11.x since we have missed the boat on completing the deprecation of the library there.
Comment #69
catchComment #70
Gábor HojtsyThe following @deprecated's are remainig in Drupal 10-dev (targeted at removal in Drupal 10), the last one is for testing purposes but the rest seem to be legit. Most of these don't seem to have a child issue here. Are they covered elsewhere for beta?
Comment #71
catchThe contextual deprecations were added in #3277311: Deprecate and mark internal contextual JS API and would be removed in #3203920: Replace Contextual Links BackboneJS usage with VanillaJS equivalent. Backbone removal is marked as a 'should have' in #3145958: [META] Re-evaluate use of Backbone.js in core.
I think this means that we should ignore those contextual js deprecations until the last minute, and if the backbone issue doesn't land, then update the deprecation message for removal in 11.0.0 (which could happen during beta since it'd just be a string change). Maybe we need an explicit, postponed, issue for doing that though.
--
core/misc/ajax.es6.js
The AJAX one looks like it never got finished properly to match the new js deprecations, it's mentioned in #3096679: JavaScript calls to deprecated APIs are not found (for Drupal 10) as a problem but I can't find a core issue - should probably have one.--
core/includes/bootstrap.inc: * @deprecated in drupal:8.3.0 and is removed from drupal:10.0.0.
This is #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service. If it doesn't get done, we should update the deprecation for removal in 11.0.0.
This is valid test fodder.
Comment #72
Gábor HojtsyAlso grepped for all the E_USER_DEPRECATED and manually removed the ones that are based on my review part of the infrastructure to raise the deprecation errors or were Drupal 11 targeted. That resulted in these 4 remaining E_USER_DEPRECATED:
The second is #3293090: Fail JavaScript tests on JavaScript errors which I just RTBC-ed :D The rest I am not sure, the first one does not even say for when it is deprecated (to be removed).
Comment #73
Berdir> $modules property must be declared protected
I've noticed this one still showing up in D10 instead of failing test.
Note that (probably because of the missing versions), it's also not discovered by either phpstan or rector, so your statistics and patches aren't including it. It's also very low impact and can't actually be enforced without custom PHP code, similar to the current warning. Because you can always make a protected property public in a child class, what you can't do is the opposite.
So it might be a good idea to move that to D11 (or just drop the message and maybe have a coding standard or phstan check for it to ensure that core complies). Also, the argumentation in https://www.drupal.org/node/2909426 about "lost developer time" is somewhat ironic as I'm fairly certain that at this point, a lot more developer time was spent on changing it than having to look up which one to use.
Comment #74
catchOpened #3301204: Properly deprecate ajax.js methods.
Comment #75
catchCovered by #3227033: Remove Quick Edit from core.
Also opened #3301205: Replace the test class protected $modules deprecation error with a phpstan-drupal rule.
Comment #76
catchRe-parented incomplete deprecations under #3301206: [meta] Fix incomplete/incorrect deprecations in Drupal core.
Comment #77
catchComment #78
Gábor Hojtsy#3296096: Update tabbable deprecation messages to 11.x landed.
Comment #79
catchJust committed #3293090: Fail JavaScript tests on JavaScript errors, which means this is done!
A lot of triage happened in here, so crediting people for that.
Comment #80
BerdirCreated one small follow-up/child issue: #3301663: Remove handling of node_type condition plugin in BlockForm::\Drupal\block\BlockForm::buildVisibilityInterface(), but I don't think we need to reopen this or anything, it's not a big deal, just a bit of dead code.