-
Notifications
You must be signed in to change notification settings - Fork 10
DBAL3: More updates #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBAL3: More updates #147
Conversation
WalkthroughThis PR modernizes the Crate DBAL driver for Doctrine DBAL 3 by adding return type declarations throughout the codebase, updating exception handling from DBALException to Exception, deprecating bindParam in favor of bindValue, and refactoring test infrastructure with a new base class and updated fetch patterns. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Test
participant CrateStatement
participant PDO
Note over Test,PDO: Old Flow (bindParam + execute)
Test->>CrateStatement: bindParam($param, $var, ParameterType)
CrateStatement->>PDO: bindParam(...)
Test->>CrateStatement: execute()
CrateStatement->>PDO: execute()
Note over Test,PDO: New Flow (bindValue + executeQuery)
Test->>CrateStatement: bindValue($param, $value, ParameterType)
CrateStatement->>PDO: bindValue(...)
Test->>CrateStatement: executeQuery()
CrateStatement->>PDO: execute()
rect rgb(200, 220, 255)
CrateStatement->>CrateStatement: try/catch PDOException
end
CrateStatement-->>Test: Exception (on error)
sequenceDiagram
autonumber
participant Test
participant DBALFunctionalTest
participant Connection
Note over Test,Connection: Old Flow
Test->>DBALFunctionalTest: execute($sql)
DBALFunctionalTest->>Connection: query($sql)
Note over Test,Connection: New Flow
Test->>DBALFunctionalTest: run_sql($sql): Result
DBALFunctionalTest->>Connection: executeQuery($sql)
Connection-->>DBALFunctionalTest: Result
DBALFunctionalTest-->>Test: Result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Remove redundant test function `testPrepareWithBindParam` - Remove deprecated test function about `PDO::FETCH_CLASS` - Complete function signature type hinting - Improve MapType::convertToPHPValue about accounting for `null` values
About
A few more updates by @JulianMar from his work on DBAL4 support (GH-136). Thank you so much.
Details
This patch is stacked upon GH-122. It was conceived after finishing the main patch and kept separate from it to reduce noise by that very delta.