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.
The is some subtle unexpected behaviour going on in \Drupal\Core\Database\Connection. I suspect it is just me so I went through the documentation looking for anything that did not match my expectations.
It was enlightening to me to find out just when Connection::query returns null
In here there are lots of trivial corrections, the one useful change is the annotation of $schema
This is also a trivial error in the annotation of setKey()
Comment | File | Size | Author |
---|---|---|---|
#2 | interdiff-0-2.txt | 3.47 KB | martin107 |
#2 | connection-2345915-2.patch | 15.02 KB | martin107 |
fixup-0.patch | 15.07 KB | martin107 | |
Comments
Comment #1
jhodgdonThanks! Mostly great fixes. A few things to fix:
a)
This is not the correct syntax. It should just be @var [type].
b)
In @var/@param/@return types, we use lower-case "null" not "Null" or "NULL". This occurs in other spots in the patch as well.
c)
I don't think I like the documentation of this parameter much. The table is not being searched. Maybe "The table to find the prefix for"?
d)
I wouldn't say a table is "associated with" a query. Maybe "The name of the table to query" would be better here? This occurs several times in the patch.
e)
We need a blank line between @param and @return. This applies to a few places in the patch.
Comment #2
martin107 CreditAttribution: martin107 commentedThank you I do appreciate how long it takes to double check these patches.
All comments make the thing look better. I will try and carry the null thing into the next issue.
a) Fixed
b) Fixed
c) Fixed
d) Fixed
e) Fixed
PS I can stop crying wolf now ... there is no unexpected behaviour it really WAS just me. :)
Comment #3
jhodgdon(b) is not fixed in the 2nd hunk in the patch:
The rest looks good -- one more pass should do it. Thanks!
Comment #4
martin107 CreditAttribution: martin107 commentedI found a duplicate
#2342521: Docblock fixes for core/lib/Drupal/Core/Database/Connection.php
I will postpone until the other is committed ... and learn to work in a team where possible :)
Comment #5
jhodgdonShouldn't this just be closed as a duplicate then? You can merge the changes here into the other patch?