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.
With DBTNG we are extending the build in PHP PDO way of communication with different databases. The name for the build in method for rolling back transactions is PDO::rollBack()
(with a capital B).
The corresponding method in D8 is called Drupal\Core\Database\Connection::rollback() (without the capital B). Lets correct that. This will not be an API change we can do this in a minor version.
The original find of this bug is from @axel.rutz, so please give him commit credits for it.
Comment | File | Size | Author |
---|---|---|---|
#7 | connection_rollback-2801899-7.patch | 12.92 KB | shashikant_chauhan |
#4 | connection_rollback-2801899-4.patch | 581 bytes | shashikant_chauhan |
Comments
Comment #2
catchPHP is case insensitive so this wouldn't be an API change.
Comment #3
daffie CreditAttribution: daffie commentedIf somebody wants to take this on, then I will do the reviewing.
Comment #4
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedadding patch
Comment #5
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedComment #6
daffie CreditAttribution: daffie commented@shashikant_chauhan: Your patch looks good. The problem is all calls for that method also need to be renamed. Also in the documentation there are a lot of Database::rollback()'s instead of Database::rollBack(). Watch out that you do not change the word rollback. Like in: "Create a savepoint so we can rollback a failed query".
Comment #7
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedupdated the patch.
Comment #8
daffie CreditAttribution: daffie commentedLooks good to me. All function calls for rollback are changed. No unnecessary changes. So, for me it is RTBC.
Thanks @shashikant_chauhan!
Comment #10
xjmLooks good to me.
I think we should add a small CR though so modules know to update their incorrectly cased method calls or overrides. The CR can clarify that it will not break any existing code.
Comment #11
daffie CreditAttribution: daffie commentedAdded a change record.
Comment #13
daffie CreditAttribution: daffie commentedBack to RTBC.
Comment #15
catchCommitted/pushed to 8.3.x, thanks!