refactor(transaction): inherit postgres startTransaction#897
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe ChangesRemove Postgres startTransaction override, inherit from SQL
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — the change is a pure deduplication with no new behavioral differences introduced. The removed Postgres override was structurally identical to No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "Merge branch 'main' into fix/remove-post..." | Re-trigger Greptile |
2309310 to
0189158
Compare
0189158 to
49dd98e
Compare
| class Postgres extends SQL | ||
| { | ||
| public const MAX_IDENTIFIER_NAME = 63; |
There was a problem hiding this comment.
Removing this override makes Postgres use the shared SQL::startTransaction() path. The old Postgres implementation guarded the boolean result from PDO::beginTransaction(), but the shared path ignores a false return, increments inTransaction, and reports success. If PDO fails this way, callers can run work believing a transaction is active when none was opened, and later commit or rollback state can be invalid. Please keep the boolean-result check in the shared implementation before removing this override.
Summary
startTransaction()overrideSQL::startTransaction()behaviorTests
./vendor/bin/phpunit tests/unit/SQLTransactionTest.phpphp -d memory_limit=2G ./vendor/bin/pint --testcomposer checkgit diff --checkSummary by CodeRabbit
Release Notes
Refactor
Tests