Drupal 8 has a bunch of the legacy include files.
As Drupal 9 planned to be released in 2020, it would be great to deprecate content of the legacy files as much as possible before release.
This is the issue for tracking the deprecation status of the legacy include files:
-
bootstrap.inc- #1577902: [META] Remove all usages of drupal_static() & drupal_static_reset()
- #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service
- #3000229: Add DrupalErrorHandler wrapping Symfony ErrorHandler component
- #2908079: Move some of the bootstrap.inc PHP-related constants to \Drupal and deprecate the old versions
- #2347783: Deprecate drupal_get_path() and drupal_get_filename() and replace with ExtensionList::getPath() and ExtensionList::getPathname()
- #3038513: Move drupal_generate_test_ua() into the test system
- #3052703: Deprecate drupal_installation_attempted()
- #3009377: Replace drupal_get_user_timezone with a date_default_timezone_get() and an event listener
- #3035274: Deprecate drupal_classloader_register() & system_register()
Kernel includes
-
common.inc -
schema.inc -
module.inc -
theme.inc -
menu.inc -
file.inc- #2669074: Convert file_create_url() & file_url_transform_relative() to service, deprecate it
- #3032390: Add an event to sanitize filenames during upload deprecates file_(un)munge_filename()
- #2620304: htaccess functions should be a service
- #2244513: Move the unmanaged file APIs to the file_system service (file.inc)
- #3021450: Add @trigger_error to deprecated functions in file.inc and replace their usages
- #3035312: Move file_scan_directory() to file_system service
- #3021434: Properly deprecate drupal_unlink()
- #3039026: Deprecate file_directory_temp() and move to FileSystem service
- #3068022: Properly deprecate drupal_realpath()
-
form.inc -
errors.inc unicode.inc🎉🎉🎉@deprecated🎉🎉🎉-
tablesort.inc🎉🎉🎉@deprecated🎉🎉🎉 -
database.inc🎉🎉🎉@deprecated🎉🎉🎉 -
pager.inc- 🎉🎉🎉@deprecated🎉🎉🎉 -
entity.inc- 🎉🎉🎉@deprecated🎉🎉🎉- #3000033: Deprecate entity_render_cache_clear function in entity.inc file
- #2490966: [Meta] Replace deprecated usage of entity_create with a direct call to the entity type class
- #2367933: Move entity_get_(form_)display() to the entity display repository
- #2974253: Remove remaining usages of entity_view and entity_view_multiple from core
- #2974258: Remove remaining usages of entity_view
- #2359437: [meta] Remove entity_load* family of functions usage from the code base
- #2928930: Properly deprecate entity_create() and remove all occurrences
Install includes
-
install.core.inc -
install.inc
Rest of the files
batch.inctheme.maintenance.incupdate.incutility.inclocale module
Comments
Comment #2
volegerComment #3
claudiu.cristeaA child issue #2908176: Deprecate archiver procedural functions.
Comment #4
volegerComment #5
volegerComment #6
claudiu.cristeaChild issue #2157945: Deprecate format_size() and use Drupal\Core\StringTranslation\ByteSizeMarkup instead.
Comment #7
mondrakeAdding the key issues related to
pager.incComment #8
mile23Adding the batch service, but there's no issue to deprecate the functional way.
+1 on this issue. :-)
Comment #9
volegerComment #10
volegerComment #11
voleger#1882552: Deprecate menu_list_system_menus() and menu_ui_get_menus()
Comment #12
volegerComment #13
claudiu.cristeaAdded #2999989: Deprecate date_iso8601().
Comment #14
claudiu.cristeaRemoved by mistake.
Comment #15
claudiu.cristeaComment #16
volegerRevert some changes
Comment #17
voleger#3000033: Deprecate entity_render_cache_clear function in entity.inc file
Comment #18
claudiu.cristeaRenamed to be clear that it's a META issue. Removed a duplicate issue from IS.
Comment #19
voleger#2909480: Move REQUIREMENT_* constants out of install.inc file
Comment #20
claudiu.cristeaAdding #2566619: Deprecate drupal_http_header_attributes().
Comment #21
claudiu.cristeaAdding #3000057: Deprecate drupal_set_time_limit() and file_upload_max_size() and move to Environment component.
Comment #22
claudiu.cristeaAdding #3000068: Deprecate drupal_process_states().
Comment #23
andyposttheme.inc probably covered by #2821399: [meta] Theme System Modernization Initiative
Comment #24
voleger#3000229: Add DrupalErrorHandler wrapping Symfony ErrorHandler component
Comment #25
mile23Comment #26
mile23Made this a child: #2044435: Convert pager.inc to a service
Comment #27
volegerFilled #3001201: Convert tablesort.inc functions to a static class
Comment #28
volegerShould we somehow mark the files that are ready to be removed before Drupal 9?
Comment #29
andypostFixed #2566619: Deprecate drupal_http_header_attributes()
Comment #30
jcnventuraComment #31
jcnventuraAdded:
Comment #32
volegerComment #33
volegerCreated issue for
update.incComment #34
voleger#2490966: [Meta] Replace deprecated usage of entity_create with a direct call to the entity type class
Comment #35
andypostAdded #2911606: Replace usage of the deprecated LOCALE_PLURAL_DELIMITER constant for common.inc
Comment #36
volegerAdd #3014752: Convert drupal_flush_all_caches() function to a Cache Clearer service
Comment #37
voleger-1 include file
Comment #38
volegerAdd #2873881: [meta] Add Change Record to @deprecated for common.inc
Comment #39
volegerMoved common.inc related issues into own meta #3015538: [META] Deprecate contents of common.inc
Comment #40
volegerComment #41
andypostAdded #2347783: Deprecate drupal_get_path() and drupal_get_filename() and replace with ExtensionList::getPath() and ExtensionList::getPathname()
Comment #42
andypostComment #43
alexpottThe splitting of issues like
is against the advice of our scoping recommendations. Let's not do this. See https://www.drupal.org/core/scope
Comment #44
jhedstromAdding #3020455: Deprecate system_time_zones() and move to TimeZoneFormHelper.
Comment #45
mile23I guess
install.core.incis just to terrifying to contemplate.Comment #46
volegerHere is #3021403: Deprecate contents of install.core.inc
Comment #47
volegerComment #48
voleger#3021450: Add @trigger_error to deprecated functions in file.inc and replace their usages
Looks like we should recheck the existing deprecated functions. Some of them not properly replaced from the core.
That possibly can block removal of some legacy code from the core in 9.x version.
Comment #49
volegeradd #2367933: Move entity_get_(form_)display() to the entity display repository
Comment #50
volegerAdded #2974253: Remove remaining usages of entity_view and entity_view_multiple from core
Comment #51
volegerAdded #2974258: Remove remaining usages of entity_view
Comment #52
volegerAdded #2359437: [meta] Remove entity_load* family of functions usage from the code base
Comment #53
claudiu.cristeaAdded #3035274: Deprecate drupal_classloader_register() & system_register() .
Comment #54
claudiu.cristeaAdded #2940189: Deprecate system_get_info().
Comment #55
claudiu.cristeaAdding #2260187: [PP-1] Deprecate drupal_static() and drupal_static_reset().
Comment #56
claudiu.cristeaAdded #3035288: Deprecate theme_get_setting().
Comment #57
kim.pepperComment #58
volkswagenchickComment #59
volkswagenchickComment #61
volegerAdd #3038513: Move drupal_generate_test_ua() into the test system
Comment #62
berdirFYI, for people looking for interesting parts in .inc files to deprecate, comment out the include files in DrupalKernel and watch Drupal explode.
For bootstrap.inc, that's currently #3038513: Move drupal_generate_test_ua() into the test system. If you apply that patch, it's warnings about the error/exception handler (so we need to replace those functions likely all of errors.inc) and then it fatals on drupal_installation_attempted(), another nasty one.
If you comment out common.inc, we actually get pretty far, it dies on drupal_pre_render_links and possibly some other render-related callbacks. Didn't find an issue for that yet either.
Comment #63
andypost@Berdir I guess #2999962: Unify Database/Log::findCaller and Utility/Error::getLastCaller is what you're looking for
Also per file issues mostly all filed
Comment #64
volegerThis one also related to the error handler deprecation replacements #3000229: Add DrupalErrorHandler wrapping Symfony ErrorHandler component
Comment #65
volegerComment #66
feuerwagenComment #67
phenaproxima#2367933: Move entity_get_(form_)display() to the entity display repository is in!
Comment #68
berdirComment #69
volegerFixed #3021434: Properly deprecate drupal_unlink() and #2367933: Move entity_get_(form_)display() to the entity display repository
Comment #70
volegerentity.inc - deprecated
Comment #71
volegerComment #72
berdirI worked a bit on bootstrap.inc related deprecation issues, and updated the issue summary with them, basically in the order in which they are first called. when combining the user agent + errors + drupal_installation_attempted() + user timezone patches, it is starting to bootstrap and load modules, with a lot of notices and warnings, e.g. due to REQUEST_TIME. Then dying on drupal_static() in node_access_view_all_nodes(), but that does mean I get as far as route access checking.
Comment #73
volegerComment #74
volegerAdd #3058881: Update MaintenanceMode service and deprecate legacy API
Comment #75
kim.pepperAdded #3039026: Deprecate file_directory_temp() and move to FileSystem service
Comment #76
volegerRemove duplication
Set #1577902: [META] Remove all usages of drupal_static() & drupal_static_reset() as meta in the scope of
bootstrap.incComment #77
kim.pepperComment #78
andypostUpdated summary with #2319859: [META] Deprecate contents of database.inc
Comment #79
volkswagenchickAdding this issue to the DrupalCamp Colorado contribution day queue. Aug4, 2019
Comment #80
andypostordered file.inc
Comment #81
andypostComment #82
volegerUpdate the current status of the issues in IS
Comment #83
andypostreordered issues to move commited down
Comment #84
voleger#1530756: [meta] Use a proper kernel for the installer added
Comment #86
andypostAdded #1834298: Unify name space in Locale module
Comment #87
volegerMake a title more specific.
Also referencing the issues where the deprecated files will be removed.
#3090988: Remove deprecated in Drupal 8 include files
#3087546: Remove deprecated entity manager
Comment #88
volegerpager.incis also deprecated now.Also
database.inc,tablesort.inc,entity.inc,unicode.incandpager.incalready removed in the drupal:9.0.x.Since no new deprecations allowed in the Drupal 8 we have to close this meta.
For new deprecations, before Drupal 10, I had created a new meta #3097045: [META] Provide modern replacements for and deprecate the legacy include files.
Comment #89
volegerThanks for everyone, see you in #3097045: [META] Provide modern replacements for and deprecate the legacy include files
Comment #90
andypostGreat, now needs to reassign all child issues to new one