Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Nov 24, 2025

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (b78617d) to head (59fe5f0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1107   +/-   ##
=========================================
  Coverage     98.62%   98.62%           
- Complexity     1648     1655    +7     
=========================================
  Files           119      120    +1     
  Lines          4283     4305   +22     
=========================================
+ Hits           4224     4246   +22     
  Misses           59       59           

☔ 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.

vjik and others added 2 commits November 24, 2025 21:31
@vjik vjik marked this pull request as ready for review November 29, 2025 10:24
@vjik vjik requested a review from a team November 29, 2025 10:24
@vjik vjik added the status:code review The pull request needs review. label Nov 29, 2025
@vjik vjik requested review from Tigrov and Copilot November 29, 2025 10:24
Copy link
Contributor

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 adds a dedicated EnumColumn type to the Yii database abstraction layer, removing the generic enumValues property from the base Column class. This is a breaking change that provides better type safety and clearer API for enum columns.

Key Changes:

  • Introduces EnumColumn class extending StringColumn with dedicated values() and getValues() methods
  • Removes enumValues() and getEnumValues() methods from ColumnInterface and AbstractColumn
  • Adds ColumnBuilder::enum() factory method for creating enum columns
  • Updates AbstractColumnDefinitionBuilder to generate CHECK constraints for enum columns when dbType is null (for databases without native ENUM support)

Reviewed changes

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

Show a summary per file
File Description
src/Schema/Column/EnumColumn.php New dedicated enum column class with values management
src/Schema/Column/ColumnBuilder.php Adds enum() factory method for creating enum columns
src/Schema/Column/AbstractColumn.php Removes generic enumValues property and methods
src/Schema/Column/ColumnInterface.php Removes enumValues() and getEnumValues() from interface
src/Schema/Column/AbstractColumnFactory.php Maps ColumnType::ENUM to EnumColumn class
src/Schema/Column/ColumnFactoryInterface.php Updates psalm type to use values instead of enumValues
src/QueryBuilder/AbstractColumnDefinitionBuilder.php Generates CHECK constraints for enum columns without dbType
src/Syntax/ColumnDefinitionParser.php Renames enumValues to values in parser output
src/Constant/ColumnType.php Adds ENUM constant for the enum column type
tests/Db/Schema/Column/EnumColumnTest.php Unit tests for EnumColumn class
tests/Common/CommonEnumColumnTest.php Integration tests for enum column functionality
tests/Provider/ColumnProvider.php Updates test data providers for enum columns
tests/Provider/ColumnFactoryProvider.php Adds enum column to factory type tests
tests/Provider/ColumnDefinitionParserProvider.php Updates parser test data to use values
tests/Provider/ColumnBuilderProvider.php Removes getEnumValues from default values test
tests/Support/IntegrationTestCase.php Adds helper methods dropTable() and executeStatements()
tests/Db/Schema/Column/ColumnTest.php Removes tests for deprecated enumValues methods
CHANGELOG.md Documents the new enum column type feature

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

vjik and others added 2 commits November 29, 2025 17:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vjik vjik merged commit a4acaee into master Nov 30, 2025
69 checks passed
@vjik vjik deleted the enum-col branch November 30, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants