Fix: Resolve DBAL contract violation with truncate() method (#387)#393
Merged
Merged
Conversation
…php#387) Problem: - deleteTable() existed only in SleekDbal, not in contract - IdiormDbal lacked equivalent, breaking adapter interchangeability - Method name implied schema deletion vs actual data cleanup Solution: - Add truncate(): bool to DbalInterface contract - Implement truncate() in both SleekDbal and IdiormDbal - Replace all deleteTable() usage throughout codebase - Fix deprecated implicit nullable parameter in having() method Files changed: 11 - 1 contract (DbalInterface) - 2 adapters (SleekDbal, IdiormDbal) - 6 module templates - 2 test files All adapter tests pass (92 tests, 296 assertions). Fixes quantum-php#387
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #393 +/- ##
============================================
- Coverage 80.80% 80.72% -0.09%
- Complexity 2462 2465 +3
============================================
Files 229 229
Lines 6533 6541 +8
============================================
+ Hits 5279 5280 +1
- Misses 1254 1261 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
andrey-smaelov
approved these changes
Jan 11, 2026
grigoryanmartin20
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #387
Problem
deleteTable()existed only in SleekDbal, not in DbalInterfaceSolution
truncate(): boolto DbalInterface contractdeleteTable()calls (11 files)having()Testing
All adapter tests pass (92 tests, 296 assertions)
Ensures DBAL adapter interchangeability.