Problem/Motivation

This issue deals with all 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 11.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 11.0.x branch. Deprecation Removal
  • 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

Gábor Hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Status: Active » Postponed

Postponed for now.

catch’s picture

Version: 10.0.x-dev » 11.0.x-dev
gábor hojtsy’s picture

Title: [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch » [11.x] [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch
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

Issue summary: View changes
smustgrave’s picture

Didn't realize we this so closed #3423886: [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch as a duplicate and moved over all child issues from that meta to here.

quietone’s picture

Title: [11.x] [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch » [meta] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch
Status: Postponed » Active
quietone’s picture

Issue summary: View changes
gábor hojtsy’s picture

StatusFileSize
new134.6 KB

Great work on getting started with this :) According to my scripts, Feb 29 was the high point and its been going down steeply from there. Quite impressively!

andypost’s picture

andypost’s picture

quietone’s picture

Issue summary: View changes
catch’s picture

Issue summary: View changes
catch’s picture

gábor hojtsy’s picture

Even after the core module removals, this 97 mentions of @deprecated against Drupal 11 (and in two cases Drupal 10) remains. I think most bigger ones have issues above, but not all, in case someone wants to chip away at this :) (The list of E_USER_DEPRECATED is much longer, probably lots of these will remove many of that too).

core/misc/ajax.js:   * @deprecated in drupal:8.6.0 and is removed from drupal:10.0.0.
core/misc/ajax.js:   * @deprecated in drupal:8.6.0 and is removed from drupal:10.0.0.
core/tests/Drupal/Tests/RandomGeneratorTrait.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
core/tests/TestSuites/TestSuiteBase.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/tests/TestSuites/KernelTestSuite.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/tests/TestSuites/FunctionalJavascriptTestSuite.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/tests/TestSuites/BuildTestSuite.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/tests/TestSuites/UnitTestSuite.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/tests/TestSuites/FunctionalTestSuite.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/includes/bootstrap.inc: * @deprecated in drupal:8.3.0 and is removed from drupal:11.0.0.
core/lib/Drupal/Core/Password/PhpassHashedPassword.php: * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. The
core/lib/Drupal/Core/Logger/LoggerChannelFactory.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Asset/AssetCollectionOptimizerInterface.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. There is
core/lib/Drupal/Core/Test/TestSetupTrait.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/lib/Drupal/Core/Config/ConfigEvents.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Config/TypedConfigManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Config/TypedConfigManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Config/TypedConfigManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Config/TypedConfigManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Datetime/Element/Datetime.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
core/lib/Drupal/Core/Entity/Controller/EntityViewController.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Entity/EntityStorageInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Entity/EntityStorageInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Entity/EntityTypeManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0.
core/lib/Drupal/Core/Render/Element/Ajax.php: * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Return an
core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Only string
core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Updater/Module.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Controller/ArgumentResolver/Psr7RequestValueResolver.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
core/lib/Drupal/Core/Url.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/lib/Drupal/Core/Url.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/lib/Drupal/Core/Routing/UrlGenerator.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Only string
core/lib/Drupal/Core/Routing/UrlGenerator.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/lib/Drupal/Core/Session/PermissionsHashGenerator.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/modules/update/src/Controller/UpdateController.php:   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use
core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/file.api.php: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
core/modules/file/file.module: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/file.module: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/file.module: *  @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Upload/UploadedFileInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Upload/UploadedFileInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Upload/UploadedFileInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/file/src/Upload/FileUploadHandler.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0.
core/modules/contextual/js/contextual.js:     * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/contextual.js:     * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/contextual.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/toolbar/models/StateModel.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/toolbar/views/AuralView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/toolbar/views/VisualView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/models/StateModel.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/contextual.toolbar.js:     * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is
core/modules/contextual/js/views/KeyboardView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/views/AuralView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/views/RegionView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/contextual/js/views/VisualView.js:   * @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. There is no
core/modules/user/user.module: * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/user/user.module: * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/user/user.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use
core/modules/user/user.module: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use
core/modules/user/src/Form/UserLoginForm.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement.
core/modules/workspaces/src/Form/WorkspaceFormInterface.php: * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/workspaces/src/WorkspaceManagerInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/workspaces/src/WorkspaceManagerInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/workspaces/src/WorkspaceManagerInterface.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/modules/workspaces/src/WorkspaceAssociationInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use the
core/modules/field/tests/src/Traits/EntityReferenceTestTrait.php: * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use
core/modules/system/system.install:  // @deprecated The sequences table has been deprecated in drupal:10.2.0 and is
core/modules/system/tests/modules/deprecation_test/deprecation_test.module: * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. This is
core/modules/migrate/src/Plugin/migrate/id_map/Sql.php:   * @deprecated in drupal:9.5.0 and is removed from drupal:11.0.0. Use
core/modules/migrate/src/Plugin/MigrationInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/migrate/src/Plugin/MigrationInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/migrate/src/Plugin/MigrationInterface.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/migrate/src/Plugin/Migration.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
core/modules/path_alias/src/AliasManager.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no
core/modules/book/tests/src/Functional/BookTestTrait.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php:   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0 without replacement.
core/modules/views/js/ajax_view.js:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0.
core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php:   * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use
core/modules/views/src/Ajax/ScrollTopCommand.php: * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0.
quietone’s picture

Issue summary: View changes

The 2 in core/misc/ajax.js have an issue to add a deprecation notice, #2973400: Mark functions for wrapping Ajax response as deprecated

catch’s picture

catch’s picture

andypost’s picture

it went down to 50 ATM and views/ui issue should be ready #3442532: Removed deprecated code in views module

andypost’s picture

after file/view clean-up only 29 left

andypost’s picture

there's some deprecated found in responsive_image module

$ git grep deprecate -- core/modules/responsive_image/
core/modules/responsive_image/src/ResponsiveImageConfigUpdater.php:67:      @trigger_error(sprintf('The responsive image style multiplier re-ordering update for "%s" is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Profile, module and theme provided Responsive Image configuration should be updated. See https://www.drupal.org/node/3274803', $responsive_image_style->id()), E_USER_DEPRECATED);
core/modules/responsive_image/src/ResponsiveImageConfigUpdater.php:99:      @trigger_error(sprintf('The responsive image loading attribute update for "%s" is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Configuration should be updated. See https://www.drupal.org/node/3279032', $view_display->id()), E_USER_DEPRECATED);
andypost’s picture

smustgrave’s picture

Modules appears to be done but still appear to have a few hundred mentions in the lib folder.

andypost’s picture

Needs separate issue

composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php:157: is deprecated for 10.x \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::process()

I bet we can find more starting with git grep deprecated -- core/tests

andypost’s picture

There's leftover in

core/modules/system/config/schema$ ag deprecated
system.schema.yml
330:          deprecated: "The 'system.file:path.temporary' config property path is deprecated in drupal:8.8.0 and is removed from drupal 11.0.0. Use settings.php instead. See https://www.drupal.org/node/3039255."
smustgrave’s picture

Just opened a bunch of tickets to cover deprecations in /lib

Feel free to assign ones you are working on.

catch’s picture

Status: Active » Reviewed & tested by the community

I think we're done?

longwave’s picture

There's a few stragglers:

core/scripts/drupal.sh
16:trigger_error('drupal.sh is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3241346', E_USER_DEPRECATED);

core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
105:      @trigger_error(sprintf('%s called unnecessarily in a test is deprecated in drupal:10.2.0 and will throw an exception in drupal:11.0.0. See https://www.drupal.org/node/3401201', __METHOD__), E_USER_DEPRECATED);

core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
146:          @trigger_error('The "chromeOptions" array key is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use "goog:chromeOptions instead. See https://www.drupal.org/node/3422624', E_USER_DEPRECATED);

core/tests/Drupal/Tests/BrowserTestBase.php
385:      @trigger_error('Accessing the randomGenerator property is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use getRandomGenerator() instead. See https://www.drupal.org/node/3358445', E_USER_DEPRECATED);
457:        @trigger_error('Pushing requests without a session onto the request_stack is deprecated in drupal:10.3.0 and an error will be thrown from drupal:11.0.0. See https://www.drupal.org/node/3337193', E_USER_DEPRECATED);

core/tests/Drupal/Tests/UnitTestCase.php
72:      @trigger_error('Accessing the randomGenerator property is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use getRandomGenerator() instead. See https://www.drupal.org/node/3358445', E_USER_DEPRECATED);
xjm’s picture

Status: Reviewed & tested by the community » Needs work

For #32.

andypost’s picture

andypost’s picture

There's one more deprecation leftover with own issue #3352549: Remove deprecations in ajax.js

andypost’s picture

Issue summary: View changes

updated IS with remaining issues

andypost’s picture

All child issues are done, the only remaining is #3352549: Remove deprecations in ajax.js

So probably it could be closed

quietone’s picture

Status: Needs work » Fixed

The deprecation in the remaining issue was updated to be removed in Drupal 12.

So, yes, this can be closed.

Status: Fixed » Closed (fixed)

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

xjm’s picture

We should still credit the contibutors though. Did that now. :)

quietone’s picture

Version: 11.x-dev » 11.0.x-dev