Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Aug 2014 at 13:57 UTC
Updated:
9 Aug 2019 at 12:44 UTC
Jump to comment: Most recent
Comments
Comment #1
penyaskitoComment #2
jhodgdonI am not sure I agree with this. For DX, it is useful to have these wrappers, for use in hook_update_N() functions going forward.
Comment #3
joelpittetI agree with @jhodgdon to the extent that unless \Drupal\Core\Database\* has one-to-one statics I'd opt out on their removal.
Comment #4
penyaskitoI understand jhogdon concerns, but as developers will already need to learn OOP, IMHO this API (which has one-to-one function->method mapping) won't be a big impact in their DX.
There are one-to-one methods for this, except for db_ignore_replica(), which we can reproduce with a new Database::ignoreReplica() method.
Comment #5
joelpittetWell then cool! Just needs a good change record then. Which could be ripped off from your deprecation notices in #2319875: Deprecate all db_* functions I'm on board now:)
Comment #6
penyaskitoComment #7
mile23Comment #8
mile23Rescoping here a little bit since currently
database.incis very simple wrappers aroundDrupal\Core\Database\Database. Essentially the work has already been done. Yay.The only exception is the only non-deprecated function in
database.inc:db_ignore_replica(), which really should be refactored ontoDrupal\Core\Database\Database.Comment #12
cilefen commentedComment #13
cilefen commentedComment #14
daffie commentedComment #15
daffie commentedComment #16
cilefen commentedI thought we would keep those under #2848161: [meta] Replace calls to deprecated db_*() wrappers, so we have one meta for usages and one meta for documentation.
Comment #17
daffie commented@cilefen: You are right. My mistake.
Comment #20
andypostThe last non-deprecated function in database.inc #2286235: Deprecate db_ignore_replica() and convert it to service
Comment #22
volegerComment #24
voleger#2848161: [meta] Replace calls to deprecated db_*() wrappers is done
#2849745: Replace documentation recommending db_*() wrappers left
Comment #25
volegerComment #26
andypostSounds it should be fixed!
Comment #27
berdirYes!