Added test case proving bug with boolean columns#229
Merged
Conversation
1 task
c8e89d9 to
0e77852
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #229 +/- ##
=========================================
Coverage 95.41% 95.41%
Complexity 1891 1891
=========================================
Files 131 131
Lines 5273 5273
=========================================
Hits 5031 5031
Misses 242 242 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
roxblnfk
approved these changes
Jul 10, 2025
Member
|
Anyway it's good to have such test case 👍 |
Contributor
Author
|
@roxblnfk Seeing your comment in the updated test case: // In case of zerofill=false and unsigned=true the size value might be resolved to 4
$this->assertTrue(\in_array($qux->getSize(), [1, 4], true));Does this mean the issue still technically exists? Do we also need to account for this when comparing? public function compare(AbstractColumn $initial): bool
{
$result = parent::compare($initial);
if ($this->type === 'varchar' || $this->type === 'varbinary') {
return $result && $this->size === $initial->size;
}
if (! $result && $this->userType === 'boolean' && $this->size === 1 && $initial->size === 4) {
return true; // Handle false positives?
}
return $result;
} |
Member
|
I'm still thinking about this. Maybe we should keep track of when the size attribute is not defined by introspection, so we can exclude it from the comparison.
|
Contributor
Author
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.
See #228