Problem/Motivation
#1894396: Mark db_*() wrappers in database.inc as @deprecated for 9.x deprecated the db_* family of functions. Let's remove all usages in core.
Proposed resolution
For each function below:
- Find any usages. If there are none, mark that function as done in the list.
- If there are any sub-issues that are not RTBC, review them before proceeding to the next step.
- Open an issue (Category: Task, priority: Normal, make this issue the parent issue) to replace all usages of the function (except tests for the function itself) and link the issue below.
- Open follow-up issues to inject dependencies as appropriate.
- db_query #2875394: [PP-3] Replace all calls to db_query, which is deprecated
- db_insert #2853118: Replace all calls to db_insert, which is deprecated
- db_update #2848137: Replace all calls to db_update, which is deprecated
- db_delete #2850033: Replace all calls to db_delete, which is deprecated
- db_select #2873684: Replace all calls to db_select, which is deprecated
- db_like #2850037: Replace all calls to db_like(), which is deprecated
- db_find_tables #2848808: [PP-2] Replace all calls to db_find_tables, which is deprecated.
db_ignore_replica #2848804: Replace all calls to db_ignore_replica, which is deprecated.- (not a wrapper function) see #2286235: Deprecate db_ignore_replica() and convert it to service
Following functions have just been defined in Drupal Core but are not being used anywhere other than Tests.
- db_field_set_default #2993663: Deprecate Schema::fieldSetDefault and Schema::fieldSetNoDefault, they're not used
- db_field_set_no_default #2993663: Deprecate Schema::fieldSetDefault and Schema::fieldSetNoDefault, they're not used
- db_add_primary_key #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_drop_primary_key #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_add_unique_key #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_drop_unique_key #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_add_index
- db_drop_index #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_rename_table #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_truncate
- db_escape_table #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_escape_field #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_query_temporary
- db_driver #2994694: Properly deprecate db_driver, db_escape_field, db_escape_table, db_rename_table, db_drop_index, db_drop_unique_key, db_add_unique_key, db_drop_primary_key, db_add_primary_key
- db_field_exists
- db_index_exists
- db_query_range
Done:
- #2953385: Add a $connection property to DatabaseTestBase kernel test class to be used by extending classes
- #2991542: Introduce a DatabaseLegacyTest class for deprecation testing
- db_add_field #2993577: Properly deprecate db_add_field, db_drop_field, db_field_names
- db_and #2994556: Properly deprecate db_and, db_condition, db_or, db_xor
- db_change_field #2820179: Replace usages of deprecated method db_change_field()
- db_close #2848821: Replace all calls to db_close, which is deprecated
- db_condition #2994556: Properly deprecate db_and, db_condition, db_or, db_xor
- db_create_table #2994561: Properly deprecate db_create_table
- db_drop_field #2993577: Properly deprecate db_add_field, db_drop_field, db_field_names
- db_drop_table #2848479: Replace all calls to db_drop_table, which is deprecated.
- db_field_names #2993577: Properly deprecate db_add_field, db_drop_field, db_field_names
- db_merge #2848952: Replace all calls to db_merge(), which is deprecated
- db_next_id #2848815: Replace all calls to db_next_id, which is deprecated
- db_or #2994556: Properly deprecate db_and, db_condition, db_or, db_xor
- db_set_active #2848812: Replace all calls to db_set_active, which is deprecated.
- db_table_exists #2848817: Replace all calls to db_table_exists, which is deprecated.
- db_transaction #2848820: Replace all calls to db_transaction, which is deprecated
- db_xor #2994556: Properly deprecate db_and, db_condition, db_or, db_xor