Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The documentation for \Drupal\Core\Database\Query\ConditionInterface::condition seems to be incorrect especially for EXISTS queries
Proposed resolution
Fix documentation
Remaining tasks
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#7 | increment-2833292-7.txt | 655 bytes | pwolanin |
#7 | 2833292-7.patch | 1.42 KB | pwolanin |
Comments
Comment #2
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedBased on reading the code, I think this makes it more accurate.
Comment #3
Chi CreditAttribution: Chi commentedSeems like the parameters should be ignored in a different way. $value parameter expects NULL value while $field accepts empty string. Is there something special about this?
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
Anyway this documentation edition is correct.
Comment #4
alexpott$value I think?
This doesn't really provide that much info. The exception seems to be thrown when $value is an empty array. It is a bit of a funny exception...
Comment #5
Lal_I was able complete #4-1 part, hope this works.
Comment #6
cilefen CreditAttribution: cilefen commentedNice work! I mentored @AbhishekLal on IRC with this one. I am setting this back to Needs work for #4-2.
Comment #7
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedI'm not sure we can really enumerate the things that cause the exception since they depend on the concrete class, but we can mention that one example since it's pretty much always invalid I think.
Or do you think we just should have the @throws line and no other details?
Comment #8
daffie CreditAttribution: daffie commentedLooks good to me and all of @alexpott issues are fixed.
Comment #10
catchCommitted/pushed to 8.3.x, thanks!