Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Oct 2013 at 01:24 UTC
Updated:
17 Mar 2017 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Crell commentedIn concept I'm fine with this. I'd prefer something a bit less verbose than andConditionGroup(), but removing the wrapper functions is fine by me.
Comment #2
tim.plunkettCould just as easily be marked @deprecated. As long as we replace the usages in core, doesn't matter much to me.
Comment #3
jibran+1 for the change.
I see no purpose of this issue then :).
Comment #3.0
jibranUpdated issue summary.
Comment #4
disasm commentedfirst go at this.
Comment #6
disasm commentedundoing one views file that just doesn't have a query object accessible to the methods creating the conditions. It's probably going to need a refactor of some sort.
Comment #8
disasm commentedgot a fix for views. The issue with search is the object returned by db_query does not have the method orConditionGroup on it. That hasn't been addressed yet.
Comment #9.0
(not verified) commentedUpdated issue summary.
Comment #10
chx commented> The issue with search is the object returned by db_query does not have the method orConditionGroup on it
Care to tell me a little more? db_query returns a statement, there's no more conditions on that. Where / what should I look at?
Comment #11
sunComment #12
andypostShould be marked when to remove, suppose 9.0
Comment #13
jeroentFunctions were already marked deprecated in #1894396: Mark db_*() wrappers in database.inc as @deprecated for 9.x.
Comment #14
jeroentComment #15
jeroentComment #16
Crell commentedIf they're marked deprecated that means working to remove their usage is entirely OK and encouraged for Drupal 8.
Comment #17
mile23Setting to 8.1.x because I think that's where code cleanup type stuff is supposed to happen. Happy to be mistaken.
Setting parent issue to #2319859: [META] Deprecate contents of database.inc
Note that db_or() and db_and() have simple replacements spelled out in their @deprecation docs, so I'm adding the 'needs issue summary update' tag.
Comment #20
ieguskiza commentedHi,
I'm uploading a new patch based on the comment on #17: replacing db_and and db_or with Drupal\Core\Database\Query\Condition objects.
Comment #21
ieguskiza commentedI have cleaned up the tags for the issue and tried to rewrite the summary in order to reflect the problem and solution.
Comment #23
daffie commentedComment #24
cilefen commentedI am reparenting this to a new meta.
Comment #25
jofitzRe-roll.
Comment #26
daffie commentedAll code changes are good.
All instances of the usage of
db_and()anddb_or()are replaced.The patch looks good to me.
Two minor documentation nitpicks can be fixed on commit.
Documentation should be filled out to the 80 character line.
The no documentation beyond the 80 character line rule is broken.
Comment #27
xjmLet's fix those docs errors in the patch. :) Thanks!
Comment #28
Pavan B S commentedApplying the patch as suggested in the comment #26 , please review .
Comment #29
jofitzOnly documentation changes so setting back to RTBC.
Comment #30
alexpottCommitted 23d140f and pushed to 8.4.x. Thanks!
These original comments are a bit odd I've tried to make them a bit simpler and less about the code and more about what is actually relevant.