Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 25, 2025

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

Related to yiisoft/db#1108

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (9f0ec01) to head (69ca702).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #466      +/-   ##
============================================
+ Coverage     96.64%   96.71%   +0.06%     
+ Complexity      409      407       -2     
============================================
  Files            66       66              
  Lines          1192     1216      +24     
============================================
+ Hits           1152     1176      +24     
  Misses           40       40              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samdark samdark requested a review from Copilot November 25, 2025 21:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the ColumnDefinitionParser class to extend from AbstractColumnDefinitionParser instead of directly implementing the parsing logic. The refactoring delegates core parsing logic to the parent class while maintaining PostgreSQL-specific type handling through the new parseTypeParams() method.

  • Simplified parseDefinition() method to return raw parsed components instead of fully processed info
  • Introduced parseTypeParams() using match expressions to handle PostgreSQL-specific type parameter parsing
  • Removed unnecessary imports and psalm-suppress annotation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Column/ColumnDefinitionParser.php Refactored to extend AbstractColumnDefinitionParser, simplified parsing methods, and added PostgreSQL-specific type parameter handling via match expression
tests/ArrayParserTest.php Removed unnecessary @psalm-suppress PropertyNotSetInConstructor annotation
CHANGELOG.md Added entry documenting the breaking change refactor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vjik vjik requested a review from a team November 25, 2025 21:37
@vjik vjik added the status:code review The pull request needs review. label Nov 25, 2025
@vjik vjik requested a review from samdark November 25, 2025 21:37
$typeDetails = $matches[4] ?? $matches[2] ?? '';

if ($typeDetails !== '') {
if ($type === 'enum') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'enum' here and in other drivers should be an abstract type and must be parsable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum couldn't use in column definition directly.

'varbit',
'varchar' => $this->parseSizeInfo($params),
default => [],
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abstract, pseudo, or user-defined types must also be parsable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need to parse abstract and pseudo type? What case when this is needed?

Isn't custom types are support parameters?

@vjik vjik added status:under development Someone is working on a pull request. and removed status:code review The pull request needs review. labels Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:under development Someone is working on a pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants