Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Problem/Motivation
After #1953800: Make the database connection serializable Drupal 8-x.dev fails to install if SQLite chosen as database system. The install fails with "The server reports the following message: The service definition "request" does not exist" after SQLite chosen as database for install in database selection form. Fixing 2 code errors in core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php allows the install to progress further. Cannot move forward on #1998366: [meta] SQLite is broken until this is in.
Related Issues
#1953800: Make the database connection serializable
#1998366: [meta] SQLite is broken
Comment | File | Size | Author |
---|---|---|---|
#6 | 2010322.patch | 5.6 KB | Damien Tournoud |
#6 | 2010322-interdiff.txt | 856 bytes | Damien Tournoud |
#5 | 2010322.patch | 5.02 KB | Damien Tournoud |
#3 | 2010322-3.patch | 1.07 KB | amateescu |
#3 | interdiff.txt | 755 bytes | amateescu |
Comments
Comment #1
dcrocks CreditAttribution: dcrocks commentedThere were 2 errors. Function sqlFunctionRand needed the 'static' keyword. The 'compatibility' error just needed the 'array' type hint added to Function prepare.
Comment #2
dcrocks CreditAttribution: dcrocks commentedneeds review.
Comment #3
amateescu CreditAttribution: amateescu commentedSorry for breaking this in the first place :/ Let's also fix the arguments for
prepare()
to match the parent method.Comment #4
dcrocks CreditAttribution: dcrocks commentedIt shouldn't be necessary but I'm OK with it. #1 matches the call in Function PDOprepare, which seemed more appropriate to me.
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedActually, there is a bit more to it. We need the original PDO connection object in
StatementPrefetch
(because we call PDO-specific methods on it, likePDO::errorInfo()
), but we also need the DrupalConnection
object there (because we callConnection::getLogger()
).So the easier is just to refactor this and inject the PDO connection directly inside
StatementPrefetch
... and as a consequence clean-up a few now unnecessary methods.Untested patch enclosed.
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedAnd update the property declarations.
Comment #7
dcrocks CreditAttribution: dcrocks commentedSince this has expanded a better title would be appropriate.
Comment #8
amateescu CreditAttribution: amateescu commentedThat refactoring looks good to me, thanks Damien :)
Comment #9
alexpottHmmm... this fixes the issue with serialisation. But I actually can not install Drupal 8 using sqlite... it just pauses during the installer and tables for modules that have been enabled do not appear to have been created.
Comment #10
amateescu CreditAttribution: amateescu commentedWe have a different issue for that #1998366: [meta] SQLite is broken. This is just a small patch that fixes what we broke in #1953800: Make the database connection serializable :)
Comment #11
alexpottThanks amateescu! So this does what it says on the tin.
Committed 1769841 and pushed to 8.x. Thanks!
Comment #12
PanchoAwesome! This is getting us closer.