Skip to content

Conversation

terabytesoftw
Copy link
Member

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

@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 23:11
Copy link

@Copilot 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 modernizes test data providers in the database test suite by making them static methods and adding explicit array return type declarations. This aligns with PHPUnit's best practices where data providers should be static to avoid unnecessary object instantiation before the test execution.

Key Changes:

  • Data provider methods changed from public function to public static function
  • Added : array return type declarations to all data provider methods
  • Updated internal references from $this-> to self::/static:: where methods became static

Reviewed Changes

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

Show a summary per file
File Description
tests/framework/db/sqlite/SqlTokenizerTest.php Made sqlProvider static with array return type
tests/framework/db/sqlite/SchemaTest.php Made constraintsProvider static with array return type
tests/framework/db/sqlite/CommandTest.php Made batchInsertSqlProvider static with array return type
tests/framework/db/sqlite/ColumnSchemaBuilderTest.php Made typesProvider static with array return type
tests/framework/db/pgsql/SchemaTest.php Made bigintValueProvider and constraintsProvider static with array return types
tests/framework/db/pgsql/CommandTest.php Made dataProviderGetRawSql and batchInsertSqlProvider static with array return types
tests/framework/db/pgsql/ArrayParserTest.php Made convertProvider static with array return type
tests/framework/db/pgsql/ActiveRecordTest.php Made arrayValuesProvider static with array return type
tests/framework/db/oci/SchemaTest.php Made constraintsProvider static with array return type
tests/framework/db/oci/CommandTest.php Made batchInsertSqlProvider and paramsNonWhereProvider static with array return types
tests/framework/db/oci/ColumnSchemaBuilderTest.php Made typesProvider static with array return type
tests/framework/db/mysql/SchemaTest.php Made constraintsProvider static with array return type
tests/framework/db/mysql/ColumnSchemaBuilderTest.php Made typesProvider static with array return type
tests/framework/db/mssql/SchemaTest.php Made constraintsProvider, quoteTableNameDataProvider, and getTableSchemaDataProvider static with array return types
tests/framework/db/mssql/CommandTest.php Made paramsNonWhereProvider and batchInsertSqlProvider static with array return types
tests/framework/db/cubrid/SchemaTest.php Made constraintsProvider and convertPropertiesToAnycase static, updated method calls from $this-> to self::, removed empty test methods
tests/framework/db/cubrid/CommandTest.php Made batchInsertSqlProvider static with array return type
tests/framework/db/cubrid/ColumnSchemaBuilderTest.php Made typesProvider static with array return type
tests/framework/db/SchemaTest.php Made multiple data providers static with array return types, updated references from $this-> to static::
tests/framework/db/CommandTest.php Made multiple data providers static with array return types
tests/framework/db/ColumnSchemaBuilderTest.php Made typesProvider static with array return type
tests/framework/db/ActiveRecordTest.php Made multiple data providers static with array return types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@samdark samdark merged commit f983c66 into yiisoft:master Oct 21, 2025
94 checks passed
@terabytesoftw terabytesoftw deleted the fix-tests-2 branch October 21, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants