Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove methods mset, mget and madd of yii\caching\Cache, getHasChanged of yii\caching\Dependency #19892

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

jiaweipan
Copy link

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

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02 🎉

Comparison is base (0a3394c) 66.37% compared to head (840a592) 66.39%.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.2   #19892      +/-   ##
============================================
+ Coverage     66.37%   66.39%   +0.02%     
- Complexity    11342    11343       +1     
============================================
  Files           429      429              
  Lines         35942    35942              
============================================
+ Hits          23856    23864       +8     
+ Misses        12086    12078       -8     
Impacted Files Coverage Δ
framework/caching/Cache.php 83.20% <ø> (+3.81%) ⬆️
framework/caching/Dependency.php 100.00% <ø> (+6.89%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jiaweipan jiaweipan changed the base branch from master to 2.2 July 12, 2023 02:04
@what-the-diff
Copy link

what-the-diff bot commented Jul 12, 2023

  • The .appveyor.yml file was modified to update the php_ver to 8.1.20 and use a different version of composer.phar for installation.
  • The .github/workflows/build.yml file was modified to update the PHP versions and add the EXTENSIONS variable with a list of extensions.
  • The .github/workflows/ci-mssql.yml file was modified to update the PHP versions and the EXTENSIONS variable.
  • The .github/workflows/ci-mysql.yml file was modified to update the PHP versions and the EXTENSIONS variable.
  • The .github/workflows/ci-oracle.yml file was modified to update the PHP versions and the EXTENSIONS variable.
  • The .github/workflows/ci-pgsql.yml file was modified to update the PHP versions and the EXTENSIONS variable.
  • The .github/workflows/ci-sqlite.yml file was modified to update the PHP versions and the EXTENSIONS variable.
  • The .scrutinizer.yml file was modified to update the PHP version.
  • The composer.json file was modified to update the minimum PHP version to 8.1 and remove some unused dependencies.
  • The Object class was deleted from the framework/base directory.
  • The Cache class in the framework/caching directory was modified to remove deprecated methods mget(), mset(), and madd().
  • The Dependency class in the framework/caching directory was modified to remove the deprecated method getHasChanged().
* Removed `yii\base\Object` from `framework/classes.php`.
* Updated the required PHP version to `>=8.1` in `framework/composer.json`.
* Added a null check and return an empty string in `quoteColumnName()` method in `framework/db/Schema.php`.
* Removed the `dependencies` key from `package.json`.
* Updated the PHPUnit configuration in `phpunit.xml.dist`.
* Refactored the `IsOneOfAssert` class in `tests/IsOneOfAssert.php`.
* Refactored the `ResultPrinter` class in `tests/ResultPrinter.php`.
* Refactored the `tearDownAfterClass()` and `tearDown()` methods in `tests/TestCase.php`.
* Removed the `compatibility.php` file.
* Refactored the `BaseYiiTest` class in `tests/framework/BaseYiiTest.php`.
* Refactored the `ChangeLogTest` class in `tests/framework/ChangeLogTest.php`.
* Refactored the `ActionFilterTest` class in `tests/framework/base/ActionFilterTest.php`.
* Refactored the `ResultPrinter` class and methods in `tests/ResultPrinter.php`.
* Refactored the `TestCase` class and methods in `tests/TestCase.php`.
* Removed the `compatibility.php` file.
* Refactored the `BaseObjectTest` class and methods in `tests/framework/base/BaseObjectTest.php`.
* Refactored the `BehaviorTest` class and methods in `tests/framework/base/BehaviorTest.php`.
* Refactored the `ComponentTest` class and methods in `tests/framework/base/ComponentTest.php`.
* Removed the unused `detach()` method in `BehaviorTest`.
* Refactored the `ControllerTest` class and methods in `tests/framework/base/ControllerTest.php`.
* Refactored the `testCreateInlineAction()` method in `tests/framework/base/ControllerTest.php`.
* Refactored the `testActive()` method in `tests/framework/base/ControllerTest.php`.
* Refactored the `testActionIdMethod()` method in `tests/framework/base/ControllerTest.php`.
* Refactored the `DynamicModelTest` class and methods in `tests/framework/base/DynamicModelTest.php`.
* Refactored the `EventTest` class and methods in `tests/framework/base/EventTest.php`.
* Refactored the `ModelTest` class and methods in `tests/framework/base/ModelTest.php`.
* Refactored the `testValidateAttributeNames()` method in `tests/framework/base/ModelTest.php`.
* Refactored the `ModuleTest` class in `tests/framework/base/ModuleTest.php`.
  • The SecurityTest.php file:
  • Changed the return type of the setUp() method to void.
  • Changed the return types of the dataProviderEncryptByKeyCompat, testEncryptByKeyCompat, dataProviderEncryptByPasswordCompat, testEncryptByPasswordCompat, randomKeyInvalidInputs, testRandomKeyInvalidInput, testGenerateRandomKey, dataProviderPbkdf2, testPbkdf2, dataProviderDeriveKey, testHkdf, dataProviderCompareStrings, and testCompareStrings methods to void.
  • Changed the parameter types of the testEncryptByKeyCompat method to string.
  • Changed the parameter types of the testEncryptByPasswordCompat method to string.
  • Changed the parameter types of the testRandomKeyInvalidInput method to int|string|array.
  • Changed the parameter types of the testGenerateRandomKey method to int.
  • Changed the parameter types of the testPbkdf2 method to string.
  • Changed the parameter types of the testHkdf method to string.
  • Changed the parameter types of the testCompareStrings method to string.
  • Added a new method maskProvider with the return type array.
  • Changed the parameter type of the testMasking method to string.
  • Added a new method unMaskingInvalidStrings with no return type.
  • Added a new method maskingInvalidStrings with no return type.
  • Added a new method maskProvider with the return type array.
  • Changed the parameter types of the testMasking method to string.
  • Added a new method preserveNonEmptyValuesDataProvider with the return type array.
  • Changed the parameter type of the testPreserveNonEmptyValues method to string.
  • Added a new method orderProvider with the return type array.
  • Changed the parameter types of the testOrder method to string.
  • Added a new method defaultEmptyDataProvider with the return type array.
  • Changed the parameter type of the testDefaultEmpty method to string.
  • Changed the parameter type of the getAttributeBehaviorConfig method to string.
  • Added a new method getAttributesBehaviorConfig with the return type array.
  • Changed the parameter types of the configureModel method to string.
  • Added a new method tableName with the return type string.
  • Changed the parameter type of the getFixture method to string.
  • Changed the parameter type of the insert method to string.
  • Changed the parameter type of the update method to string.
  • Changed the parameter types of the testCase method to array.
  • Changed the parameter types of the testCaseWithBlameableBehavior method to array.
  • Changed the parameter type of the testBlameableBehaviors method to int.
  • Changed the parameter type of the stashBlameProps method to int.
  • Changed the parameter type of the testBlameableBehaviorsWithAfterFind method to int.
  • Changed the parameter type of the stashBlamePropsWithAfterFind method to int.
  • Changed the parameter type of the testUpdateOwnModel method to int.
  • Changed the parameter type of the testUpdateForeignModel method to int.
  • Changed the parameter type of the testDeleteConcurrent method to int.
  • Changed the parameter type of the prepareDatabase method to int.
  • Changed the parameter type of the createFixture method to int.
  • The ThemeTest.php file:
  • Changed the return type of the setUp() method to void.
  • The ViewTest.php file:
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • The WidgetTest.php file:
  • Changed the return type of the tearDown() method to void.
  • The AttributeBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • Changed the return type of the preserveNonEmptyValuesDataProvider() method to array.
  • Changed the parameter types of the testPreserveNonEmptyValues() method to string.
  • Added a new method maskProvider with the return type array.
  • Changed the parameter type of the testMasking method to string.
  • Added a new method unMaskingInvalidStrings with no return type.
  • Added a new method maskingInvalidStrings with no return type.
  • Added a new method maskProvider with the return type array.
  • Changed the parameter types of the testMasking method to string.
  • Added a new method preserveNonEmptyValuesDataProvider with the return type array.
  • Changed the parameter types of the testPreserveNonEmptyValues method to string.
  • Added a new method orderProvider with the return type array.
  • Changed the parameter types of the testOrder method to string.
  • Added a new method defaultEmptyDataProvider with the return type array.
  • Changed the parameter type of the testDefaultEmpty method to string.
  • Changed the parameter type of the getAttributeBehaviorConfig method to string.
  • Added a new method getAttributesBehaviorConfig with the return type array.
  • Changed the parameter types of the configureModel method to string.
  • Added a new method tableName with the return type string.
  • Changed the parameter type of the getFixture method to string.
  • Changed the parameter type of the insert method to string.
  • Changed the parameter type of the update method to string.
  • Changed the parameter types of the testCase method to array.
  • Changed the parameter types of the testCaseWithBlameableBehavior method to array.
  • Changed the parameter type of the testBlameableBehaviors method to int.
  • Changed the parameter type of the stashBlameProps method to int.
  • Changed the parameter type of the testBlameableBehaviorsWithAfterFind method to int.
  • Changed the parameter type of the stashBlamePropsWithAfterFind method to int.
  • Changed the parameter type of the testUpdateOwnModel method to int.
  • Changed the parameter type of the testUpdateForeignModel method to int.
  • Changed the parameter type of the testDeleteConcurrent method to int.
  • Changed the parameter type of the prepareDatabase method to int.
  • Changed the parameter type of the createFixture method to int.
  • The AttributeTypecastBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • The AttributesBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • Changed the return type of the preserveNonEmptyValuesDataProvider() method to array.
  • Changed the parameter types of the testPreserveNonEmptyValues() method to string.
  • Added a new method orderProvider with the return type array.
  • Changed the parameter types of the testOrder method to string.
  • Added a new method defaultEmptyDataProvider with the return type array.
  • Changed the parameter type of the testDefaultEmpty method to string.
  • Changed the parameter type of the getAttributeBehaviorConfig method to string.
  • Added a new method getAttributesBehaviorConfig with the return type array.
  • Changed the parameter types of the configureModel method to string.
  • Added a new method tableName with the return type string.
  • Changed the parameter type of the getFixture method to string.
  • Changed the parameter type of the insert method to string.
  • Changed the parameter type of the update method to string.
  • Changed the parameter types of the testCase method to array.
  • Changed the parameter types of the testCaseWithBlameableBehavior method to array.
  • Changed the parameter type of the testBlameableBehaviors method to int.
  • Changed the parameter type of the stashBlameProps method to int.
  • Changed the parameter type of the testBlameableBehaviorsWithAfterFind method to int.
  • Changed the parameter type of the stashBlamePropsWithAfterFind method to int.
  • Changed the parameter type of the testUpdateOwnModel method to int.
  • Changed the parameter type of the testUpdateForeignModel method to int.
  • Changed the parameter type of the testDeleteConcurrent method to int.
  • Changed the parameter type of the prepareDatabase method to int.
  • Changed the parameter type of the createFixture method to int.
  • The BlameableBehaviorConsoleTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • The BlameableBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • The CacheableWidgetBehaviorTest.php file:
  • Changed the return type of the setUp() method to void.
  • The OptimisticLockBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • Changed the parameter types of the testUpdateRecord() method to int.
  • Changed the parameter types of the testDeleteRecord() method to int.
  • The SluggableBehaviorTest.php file:
  • Changed the return type of the setUpBeforeClass() method to void.
  • Changed the return type of the setUp() method to void.
  • Changed the return type of the tearDown() method to void.
  • In TimestampBehaviorTest.php:
  • Updated function signatures from public function functionName() to public function functionName(): void.
  • Added void return type declaration for setUpBeforeClass() and tearDown().
  • In ApcCacheTest.php:
  • Removed unnecessary condition in the getCacheInstance() method.
  • In CacheTestCase.php:
  • Updated function signatures from protected function functionName() to protected function functionName(): void.
  • In DbCacheTest.php, DbDependencyTest.php, DbQueryDependencyTest.php, FileCacheTest.php, MssqlCacheTest.php, PgSQLCacheTest.php, ControllerTest.php, RequestTest.php, UnknownCommandExceptionTest.php, AssetControllerTest.php, BaseMessageControllerTest.php, CacheControllerTest.php, DbMessageControllerTest.php:
  • Updated function signatures from protected function functionName() to protected function functionName(): void.
  • In ConsoleMessageControllerTest.php:
  • Updated function signatures from public static function functionName() to public static function functionName(): void.
  • In DbMessageControllerTest.php:
  • Updated function signatures from public function functionName() to public function functionName(): void.
  • In FileCacheTest.php, PdoCacheTest.php, RedisCacheTest.php, WinCacheTest.php, YacCacheTest.php, MemcachedCacheTest.php, MemCacheTest.php:
  • Updated function signatures from protected function functionName() to protected function functionName(): void.
  • In FileTargetTest.php, LogRouterTest.php:
  • Updated function signatures from public function functionName() to public function functionName(): void.
  • In LoggerTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In ProfilerTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • Updated static function signature from private static function functionName() to private static function functionName(): void.
  • In QueueTest.php:
  • Updated function signatures from public function functionName() to public function functionName(): void.
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • In RateLimiterTest.php:
  • Updated function signatures from public function functionName() to public function functionName(): void.
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • In ValidationAssetTest.php:
  • Updated function signature from public function functionName() to public function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • In ValidatorTest.php:
  • Updated function signature from public function functionName() to public function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • Updated static function signature from protected static function functionName() to protected static function functionName(): void.
  • In RedisConnectionTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • Updated function signature from private function functionName() to private function functionName(): void.
  • Updated function signature from public function functionName() to public function functionName(): void.
  • In CookieTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In DispatcherTest.php:
  • Updated function signatures from protected function functionName() to protected function functionName(): void.
  • Updated function signature from public function functionName() to public function functionName(): void.
  • In ErrorHandlerTest.php:
  • Updated function signature from public function functionName() to public function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • In FormTest.php:
  • Updated function signature from public function functionName() to public function functionName(): void.
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In HtmlPurifierTest.php:
  • Updated function signature from public function functionName() to public function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In PaginationTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • Updated static function signature from public static function functionName() to public static function functionName(): void.
  • In ViewTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In UrlManagerTest.php:
  • Updated function signature from protected function functionName() to protected function functionName(): void.
  • In the file tests/framework/console/controllers/FixtureControllerTest.php, the following changes were made:
  • The setUp() method was changed to protected function setUp(): void
  • The tearDown() method was changed to protected function tearDown(): void
  • The testNoFixturesWereFoundInLoad() method now throws an exception of type \yii\console\Exception
  • The testNoFixturesWereFoundInUnload() method now throws an exception of type \yii\console\Exception
  • In the file tests/framework/console/controllers/HelpControllerTest.php, the following changes were made:
  • The setUp() method was changed to public function setUp(): void
  • The testActionUsage() method now checks for strings using the assertStringContainsString assertion method
  • The testActionIndex() method now checks for strings using the assertStringContainsString assertion method
  • The testActionIndexWithHelpCommand() method now checks for strings using the assertStringContainsString assertion method
  • The testActionIndexWithServeCommand() method now checks for strings using the assertStringContainsString assertion method
  • The testActionListContainsNoEmptyCommands() method now checks for strings using the assertStringNotContainsString assertion method
  • The testActionIndexContainsNoEmptyCommands() method now checks for strings using the assertStringNotContainsString assertion method
  • In the file tests/framework/console/controllers/MigrateControllerTest.php, the following changes were made:
  • The setUp() method was changed to public function setUp(): void
  • The tearDown() method was changed to public function tearDown(): void
  • The generateMigrationDataProvider() method now has a return type of array
  • The testGenerateMigration() method now has a return type of void
  • The generateJunctionMigrationDataProvider() method now has a return type of array
  • The testGenerateJunctionMigration() method now has a return type of void
  • The testUpdatingLongNamedMigration() method now checks for strings using the assertStringContainsString assertion method
  • The testNamedMigrationWithCustomLimit() method now checks for strings using the assertStringContainsString assertion method
  • The testCreateLongNamedMigration() method now checks for strings using the assertStringNotContainsString assertion method
  • The refreshMigrationDataProvider() method now has a return type of array
  • The testRefreshMigration() method now has a return type of void
  • In the file tests/framework/console/controllers/PHPMessageControllerTest.php, the following changes were made:
  • The setUp() method was changed to public function setUp(): void
  • The testRemoveUnusedBehavior() method now has a return type of void
  • In the file tests/framework/console/controllers/POMessageControllerTest.php, the following changes were made:
  • The setUp() method was changed to public function setUp(): void
  • In the file tests/framework/console/widgets/TableTest.php, the following changes were made:
  • The setUp() method was changed to protected function setUp(): void
  • The getTableData() method now has a return type of array
  • The testTable() method now has a return type of void
  • The testColorizedInput() method has been skipped
  • The testColorizedInputStripsANSIMarkersInternally() method has been skipped
  • The testColorizedLineBreakTableCell() method now has a return type of void
  • The testMinimumWidth() method now has a return type of void
  • The dataMinimumWidth() method now has a return type of array
  • In the file tests/framework/data/ActiveDataFilterTest.php, the following changes were made:
  • The setUp() method was changed to protected function setUp(): void
  • The dataProviderBuild() method now has a return type of array
  • The testBuild() method now has a return type of void
  • In the file tests/framework/data/ActiveDataProviderTest.php, the following changes were made:
  • The setUp() method was changed to protected function setUp(): void
  • The testQuery() method now checks for strings using the assertIsArray assertion method
  • In the file tests/framework/data/ArrayDataProviderTest.php, the following changes were made:
  • The setUp() method was changed to protected function setUp(): void
  • The data folder in the framework directory was modified.
    • In DataFilterTest.php, the setUp() method was changed to setUp(): void. The dataProviderValidate() and dataProviderNormalize() methods were changed to static methods. The testValidate() and testNormalize() methods were changed to include type declarations.
    • In PaginationTest.php, the setUp() method was changed to setUp(): void. The dataProviderCreateUrl(), dataProviderPageCount(), dataProviderSetPage(), dataProviderGetPageSize(), dataProviderSetPageSize(), dataProviderGetOffset(), dataProviderGetLimit(), and dataProviderGetLinks() methods were changed to static methods. The testCreateUrl(), testPageCount(), testSetPage(), testGetPageSize(), testSetPageSize(), testGetOffset(), testGetLimit(), and testGetLinks() methods were changed to include type declarations.
    • In SortTest.php, the setUp() method was changed to setUp(): void. The providerForLinkWithParams(), providerForLinkWithParamsAndPassedButEmptySort(), and providerForLinkWithoutParams() methods were changed to static methods. The testLinkWithParams(), testLinkWithParamsAndPassedButEmptySort(), and testLinkWithoutParams() methods were changed to include type declarations.
    • In SqlDataProviderTest.php, the testTotalCountWithParams() method was modified.
    • In ActiveQueryModelConnectionTest.php, the setUp() method was changed to setUp(): void.
    • In ActiveQueryTest.php, the setUp() method was changed to setUp(): void.
    • In BatchQueryResultTest.php, the setUp() method was changed to setUp(): void.
    • In ColumnSchemaBuilderTest.php, the typesProvider() method was changed to a static method. The testCustomTypes() method was changed to include type declarations.
* The `CommandTest.php` file:
- Line 196: Changed `$floatCol` value from 1.23 to 1.230.
- Line 238: Changed the assertion from `$this->assertInternalType('resource', $row['blob_col'])` to `$this->assertIsResource($row['blob_col'])`.
- Line 281: Changed the assertion from `$this->assertInternalType('object', $result)` to `$this->assertIsObject($result)`.
- Line 377: Added a new method `testBatchInsertWithYield`.
- Line 419: Modified the method signature of `batchInsertSqlProvider` to be static.
- Line 519: Added a new method `testInsertSelectFailed`.
- Line 610: Changed the assertion from `$this->assertContains(2, $result)` to `$this->assertEquals([2, 3], $result)`.
- Line 798: Added a new test case `testRenameTable`.
- Line 1022: Added a new test case `testUpsert`.
- Line 1222: Added a new test case `testUpsert`.
- Line 1372: Modified the method signature of `dataProviderGetRawSql` to be static.
- Line 1448: Modified the method signature of `testGetRawSql` to expect a string for the `$expectedRawSql` parameter.
- Line 1584: Changed the assertion from `$this->assertContains('INSERT INTO qlog1(a) VALUES(1);', $e->getMessage(), ...)` to `$this->assertStringContainsString('INSERT INTO qlog1(a) VALUES(1);', $e->getMessage(), ...)`.
- Line 1604: Changed the assertion from `$this->assertContains('SELECT * FROM qlog1 WHERE id=1 ORDER BY nonexistingcolumn;', $e->getMessage(), ...)` to `$this->assertStringContainsString('SELECT * FROM qlog1 WHERE id=1 ORDER BY nonexistingcolumn;', $e->getMessage(), ...)`.
- Line 1628: Modified the method signature of `runExceptionTest` to expect a `ConnectionInterface` parameter.
- Line 1708: Modified the method signature of `runExceptionTest` to expect a `ConnectionInterface` parameter.
- Line 1727: Changed the assertion from `$this->expectException('yii\base\InvalidParamException')` to `$this->expectException(\yii\base\InvalidParamException::class)`.
- Line 2090: Added a new test case `testTableSchemaCacheWithTablePrefixes`.
- Line 2294: Modified the method signature of `assertMetadataEquals` to be protected.
- Line 2628: Changed the assertion from `$this->expectException('yii\base\NotSupportedException')` to `$this->expectException(\yii\base\NotSupportedException::class)`.
- Line 2651: Changed the assertion from `$this->expectException('yii\base\NotSupportedException')` to `$this->expectException(\yii\base\NotSupportedException::class)`.
- Line 2670: Changed the assertion from `$this->expectException('yii\base\NotSupportedException')` to `$this->expectException(\yii\base\NotSupportedException::class)`.
- Line 2801: Added a new test case `testAddDropCheck`.
- Line 2843: Added a new test case `testAddDropDefaultValue`.
* The `DatabaseTestCase.php` file:
- Line 19: Added a new property `$driverNameStatic`.
- Line 43: Modified the method signature of `setUp` to be protected.
- Line 47: Modified the method signature of `tearDown` to be protected.
- Line 110: Modified the method signature of `replaceQuotes` to be static.
* The `ConnectionTest.php` file:
- Line 226: Changed the expected exception from `\Exception` to `\yii\base\Exception`.
- Line 401: Added a new test case `testTransactionShortcutException`.
- Line 287: Added a new test case `testHasActiveTransaction`.
* The `QueryBuilderTest.php` file:
- Line 33: Removed the `typesProvider` method.
- Line 69: Modified the method signature of `testResetSequence` to be protected.
- Line 299: Added a new test case `testCommentColumn`.
- Line 515: Added a new test case `testUnion`.
- Line 652: Added a new test case `testCreateTableOptions`.
- Line 759: Removed the `checksProvider` method.
- Line 761: Removed the `defaultValuesProvider` method.
* The `SchemaTest.php` file:
- Line 27: Removed the `pdoAttributesProvider` method.
- Line 49: Removed the `getTableNames` test case.
- Line 92: Removed the `getTableSchemas` test case.
- Line 136: Removed the `orderColumns` test case.
- Line 198: Removed the `tableSchemaCachePrefixesProvider` method.
- Line 531: Removed the `assertMetadataEquals` method.
- Line 544: Removed the `constraintsProvider` method.
- Line 581: Removed the `lowercaseConstraintsProvider` method.
- Line 616: Removed the `uppercaseConstraintsProvider` method.
- Line 666: Removed the `testTableSchemaConstraints` test case.
- Line 689: Removed the `testTableSchemaConstraintsWithPdoUppercase` test case.
- Line 712: Removed the `testTableSchemaConstraintsWithPdoLowercase` test case.
- Line 728: Removed the `tableSchemaCachePrefixesProvider` method.
- Line 959: Removed the `defaultValuesProvider` test case.
* The `ColumnSchemaBuilderTest.php` file:
- Line 34: Removed the `typesProvider` method.
* The `CommandTest.php` file:
- Line 88: Added a new test case `testAutoQuoting`.
- Line 103: Modified the method signature of `batchInsertSqlProvider` to be static.
* The `ColumnSchemaBuilderTest.php` file:
- Line 34: Removed the `typesProvider` method.
  • Changed the return type and added a mixed type hint to the public static function constraintsProvider(): array method in the file tests/framework/db/cubrid/SchemaTest.php.
  • Added a new static string $driverNameStatic = 'sqlsrv'; property to the class ActiveRecordTest in the file tests/framework/db/mssql/ActiveRecordTest.php.
  • Changed the value of the variable $floatCol from 1.23 to 1.230 in the method testBindParamValue() in the file tests/framework/db/mssql/CommandTest.php.
  • Changed the return type and added a array type hint to the public static function paramsNonWhereProvider(): array method in the file tests/framework/db/mssql/CommandTest.php.
  • Changed the return type and added a array type hint to the public static function batchInsertSqlProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function batchInsertProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function insertProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function buildFromDataProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function upsertProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function conditionProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function primaryKeysProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function foreignKeysProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function indexesProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function uniquesProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function upsertProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function conditionProvider(): array method in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Added a new static string $driverNameStatic = 'sqlsrv'; property to the class QueryBuilderTest in the file tests/framework/db/mssql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function typesProvider(): array method in the file tests/framework/db/mysql/ColumnSchemaBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function batchInsertSqlProvider(): array method in the file tests/framework/db/mysql/CommandTest.php.
  • Changed the return type and added a array type hint to the public static function paramsNonWhereProvider(): array method in the file tests/framework/db/mysql/CommandTest.php.
  • Changed the return type and added a array type hint to the public static function upsertProvider(): array method in the file tests/framework/db/mysql/QueryTest.php.
  • Changed the return type and added a array type hint to the public static function typesProvider(): array method in the file tests/framework/db/mysql/ColumnSchemaBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function conditionProvider(): array method in the file tests/framework/db/mysql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function updateProvider(): array method in the file tests/framework/db/mysql/QueryBuilderTest.php.
  • Added a new testResetSequence method to the class QueryBuilderTest in the file tests/framework/db/mysql/QueryBuilderTest.php.
  • Changed the return type and added a array type hint to the public static function upsertProvider(): array method in the file tests/framework/db/mysql/QueryBuilderTest.php.
  • Added a new testResetSequence method to the class SchemaTest in the file tests/framework/db/mssql/SchemaTest.php.
  • Changed the return type and added a array type hint to the public static function constraintsProvider(): array method in the file tests/framework/db/mssql/SchemaTest.php.
  • Changed the return type and added a array type hint to the public static function quoteTableNameDataProvider(): array method in the file tests/framework/db/mssql/SchemaTest.php.
  • Changed the return type and added a array type hint to the public static function getTableSchemaDataProvider(): array method in the file tests/framework/db/mssql/SchemaTest.php.
  • Added a new testQuoteTableName method to the class SchemaTest in the file tests/framework/db/mssql/SchemaTest.php.
  • Added a new testGetTableSchema method to the class SchemaTest in the file tests/framework/db/mssql/SchemaTest.php.
  • Changed the return type and added a array type hint to the public static function constraintsProvider(): array method in the file tests/framework/db/mysql/SchemaTest.php.
  • Added a new testGetStringFieldsSize method to the class SchemaTest in the file tests/framework/db/mysql/SchemaTest.php.
  • Added a new testQuoteTableName method to the class SchemaTest in the file tests/framework/db/mysql/SchemaTest.php.
* The file `tests/framework/db/oci/QueryBuilderTest.php` had the following changes:
   * Added `use yii\db\Query;` in line 7.
   * Added `protected static string $driverNameStatic = 'oci';` in line 13.
   * Added `public static function foreignKeysProvider(): array` in line 22.
   * Changed `public function indexesProvider()` to `public static function indexesProvider(): array` in line 33.
   * Changed `public function testAddDropDefaultValue($sql, \Closure $builder)` to `public function testAddDropDefaultValue(string $sql, \Closure $builder): void` in line 42.
   * Removed `parent::testAddDropDefaultValue($sql, $builder);` and added a new implementation with an exception in line 47.
* The file `tests/framework/db/oci/SchemaTest.php` had the following changes:
   * Changed `public function constraintsProvider()` to `public static function constraintsProvider(): array` in line 10.
* The file `tests/framework/db/pgsql/ActiveRecordTest.php` had the following changes:
   * Added `protected static string $driverNameStatic = 'pgsql';` in line 31.
   * Changed `public function testArrayValues($attributes)` to `public function testArrayValues(array $attributes): void` in line 43.
   * Changed `public function arrayValuesProvider()` to `public function arrayValuesProvider(): array` in line 47.
* The file `tests/framework/db/pgsql/ArrayParserTest.php` had the following changes:
   * Changed `public function convertProvider()` to `public static function convertProvider(): array` in line 14.
   * Changed `public function testConvert($string, $expected)` to `public function testConvert(string $string, array $expected): void` in line 20.
* The file `tests/framework/db/pgsql/CommandTest.php` had the following changes:
   * Changed `public function dataProviderGetRawSql()` to `public static function dataProviderGetRawSql(): array` in line 11.
   * Changed `public function testSaveSerializedObject()` to `public function testSaveSerializedObject(): void` in line 20.
   * Changed `public function batchInsertSqlProvider()` to `public static function batchInsertSqlProvider(): array` in line 27.
* The file `tests/framework/db/pgsql/ConnectionTest.php` had the following changes:
   * Changed `public function testConnection()` to `public function testConnection(): void` in line 9.
   * Changed `public function testQuoteValue()` to `public function testQuoteValue(): void` in line 16.
* The file `tests/framework/db/pgsql/QueryBuilderTest.php` had the following changes:
   * Added `protected static string $driverNameStatic = 'pgsql';` in line 23.
   * Changed `public function columnTypes()` to `public function columnTypes(): array` in line 32.
   * Changed `public function conditionProvider()` to `public static function conditionProvider(): array` in line 50.
   * Changed `public function indexesProvider()` to `public static function indexesProvider(): array` in line 67.
   * Changed `public function testAddDropDefaultValue($sql, \Closure $builder)` to `public function testAddDropDefaultValue(string $sql, \Closure $builder): void` in line 77.
   * Removed `parent::testAddDropDefaultValue($sql, $builder);` and added a new implementation with an exception in line 82.
* The file `tests/framework/db/pgsql/SchemaTest.php` had the following changes:
   * Changed `public function constraintsProvider()` to `public static function constraintsProvider(): array` in line 9.
* The file `tests/framework/db/sqlite/ActiveRecordTest.php` had the following changes:
   * Added `protected static string $driverNameStatic = 'sqlite';` in line 15.
* The file `tests/framework/db/sqlite/ColumnSchemaBuilderTest.php` had the following changes:
   * Changed `public function typesProvider()` to `public static function typesProvider(): array` in line 39.
* The file `tests/framework/db/sqlite/CommandTest.php` had the following changes:
   * Changed `public function testAutoQuoting()` to `public function testAutoQuoting(): void` in line 24.
   * Changed `public function testUpsert(array $firstData, array $secondData)` to `public function testUpsert(array $firstData, array $secondData): void` in line 34.
   * Changed `public function testMultiStatementSupport()` to `public function testMultiStatementSupport(): void` in line 59.
   * Changed `public function batchInsertSqlProvider()` to `public static function batchInsertSqlProvider(): array` in line 64.
* The file `tests/framework/db/sqlite/QueryBuilderTest.php` had the following changes:
   * Added `protected static string $driverNameStatic = 'sqlite';` in line 20.
   * Changed `public function columnTypes()` to `public function columnTypes(): array` in line 33.
   * Changed `public function conditionProvider()` to `public static function conditionProvider(): array` in line 55.
   * Changed `public function indexesProvider()` to `public static function indexesProvider(): array` in line 82.
   * Changed `public function testAddDropDefaultValue($sql, \Closure $builder)` to `public function testAddDropDefaultValue(string $sql, \Closure $builder): void` in line 91.
   * Removed `parent::testAddDropDefaultValue($sql, $builder);` and added a new implementation with an exception in line 96.
* The file `tests/framework/db/sqlite/SchemaTest.php` had the following changes:
   * Changed `public function constraintsProvider()` to `public static function constraintsProvider(): array` in line 20.
   * Changed `public function testCompositeFk()` to `public function testCompositeFk(): void` in line 26.
   * Changed `public function quoteTableNameDataProvider()` to `public static function quoteTableNameDataProvider(): array` in line 34.
* The file `tests/framework/db/sqlite/WhitelistTestTrait.php` had the following changes:
   * Changed `public function setUp()` to `protected function setUp(): void` in line 13.
* The `SqlTokenizerTest.php` file had two changes:
   - The `sqlProvider()` method was changed from `public function sqlProvider()` to `public static function sqlProvider(): array`
   - The `testTokenizer()` method was changed from `public function testTokenizer($sql, SqlToken $expectedToken)` to `public function testTokenizer(string $sql, SqlToken $expectedToken): void`
   - The `exportToken()` method was changed from `private function exportToken(SqlToken $token)` to `private function exportToken(SqlToken $token): array`
* The `testBatchInsertWithYield.php` file was deleted.
* The `InstanceTest.php` file had two changes:
   - The `tearDown()` method was changed from `protected function tearDown()` to `protected function tearDown(): void`
   - The `testEnsure_NonExistingComponentException()` method changed from `$this->expectException('yii\base\InvalidConfigException')` to `$this->expectException(\yii\base\InvalidConfigException::class)`
* The `AccessRuleTest.php` file had two changes:
   - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
   - The `matchRoleProvider()` method was changed from `public function matchRoleProvider()` to `public static function matchRoleProvider(): array`
   - The `testMatchRole()` method was changed from `public function testMatchRole($actionid, $allow, $userid, $roleParams, $expected)` to `public function testMatchRole(string $actionid, bool $allow, string $userid, array|Closure $roleParams, bool|null $expected): void`
* The `ContentNegotiatorTest.php` file had one change:
   - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
* The `HostControlTest.php` file had one change:
   - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
* The `HttpCacheTest.php` file had one change:
   - The `testWhenFormatGETParamIsArray()` method had the expected exception changed to use `expectException()` and `expectExceptionMessage()`
* The `PageCacheTest.php` file had one change:
   - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
* The `RateLimiterTest.php` file had one change:
   - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
* The `AuthMethodTest.php` file had one change:
    - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
* The `AuthTest.php` file had two changes:
    - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
    - The `tokenProvider()` method was changed from `public function tokenProvider()` to `public static function tokenProvider(): array`
    - The `testQueryParamAuth()` method was changed from `public function testQueryParamAuth($token, $login)` to `public function testQueryParamAuth(string|null $token, string|null $login): void`
    - The `testHttpHeaderAuth()` method was changed from `public function testHttpHeaderAuth($token, $login)` to `public function testHttpHeaderAuth(string|null $token, string|null $login): void`
    - The `testHttpBearerAuth()` method was changed from `public function testHttpBearerAuth($token, $login)` to `public function testHttpBearerAuth(string|null $token, string|null $login): void`
* The `BasicAuthTest.php` file had seven changes:
    - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
    - The `testHttpBasicAuth()` method was changed from `public function testHttpBasicAuth($token, $login)` to `public function testHttpBasicAuth(string|null $token, string|null $login): void`
    - The `testHttpBasicAuthWithHttpAuthorizationHeader()` method was changed from `public function testHttpBasicAuthWithHttpAuthorizationHeader($token, $login)` to `public function testHttpBasicAuthWithHttpAuthorizationHeader(string|null $token, string|null $login): void`
    - The `testHttpBasicAuthWithRedirectHttpAuthorizationHeader()` method was changed from `public function testHttpBasicAuthWithRedirectHttpAuthorizationHeader($token, $login)` to `public function testHttpBasicAuthWithRedirectHttpAuthorizationHeader(string|null $token, string|null $login): void`
    - The `testHttpBasicAuthCustom()` method was changed from `public function testHttpBasicAuthCustom($token, $login)` to `public function testHttpBasicAuthCustom(string|null $token, string|null $login): void`
    - The `testHttpBasicAuthIssue15658()` method was changed from `public function testHttpBasicAuthIssue15658($token, $login)` to `public function testHttpBasicAuthIssue15658(string|null $token, string|null $login): void`
    - The `authMethodProvider()` method was changed from `public function authMethodProvider()` to `public static function authMethodProvider(): array`
    - The `testAfterLoginEventIsTriggered18031()` method was changed from `public function testAfterLoginEventIsTriggered18031($token, $login)` to `public function testAfterLoginEventIsTriggered18031(string|null $token, string|null $login): void`
* The `CompositeAuthTest.php` file had three changes:
    - The `setUp()` method was changed from `protected function setUp()` to `protected function setUp(): void`
    - The `compositeAuthDataProvider()` method was changed from `public function compositeAuthDataProvider()` to `public static function compositeAuthDataProvider(): array`
    - The `testCompositeAuth()` method was changed from `public function testCompositeAuth($authMethods, $actionId, $expectedAuth)` to `public function testCompositeAuth(array $authMethods, string $actionId, bool $expectedAuth): void`
* * In `ActionColumnTest.php`, changed the assertion functions `assertContains` to `assertStringContainsString` and `assertNotContains` to `assertStringNotContainsString`.
* In `CheckboxColumnTest.php`, changed the function signatures for `setUp()` and `emptyDataProvider()` to include return types.
* In `CheckboxColumnTest.php`, changed the assertion functions `assertContains` to `assertStringContainsString` and `assertNotContains` to `assertStringNotContainsString`.
* In `GridViewTest.php`, changed the function signatures for `setUp()` and `emptyDataProvider()` to include return types.
* In `GridViewTest.php`, changed the assertion function `assertContains` to `assertStringContainsString`.
* In `RadiobuttonColumnTest.php`, removed the `@expectedException` annotation and added an assertion for an exception throw.
* In `RadiobuttonColumnTest.php`, changed the assertion functions `assertContains` to `assertStringContainsString`.
* In `ArrayHelperTest.php`, changed the function signatures for `setUp()` and `valueProvider()` to include return types.
* In `ArrayHelperTest.php`, changed the assertion function `assertContains` to `assertStringContainsString` and `assertNotContains` to `assertStringNotContainsString`.
* In `ArrayHelperTest.php`, changed the function signatures for `setValue()`, `getValue()`, `testSetValue()`, `testGetValue()`, `testContent()`, `testRecursiveSort()`, `DataProviderSetValue()`, and `DataProviderRecursiveSort()` to include return types.
* In `BaseConsoleTest.php`, changed the function signatures for `setUp()` and `ansiColorizedSubstr_withColors_data()` to include return types.
* In `ConsoleTest.php`, changed the function signatures for `setUp()`, `ansiFormats()`, and `ansiFormats()` to include return types.
* In `ConsoleTest.php`, changed the assertion function `assertContains` to `assertStringContainsString`.
* In `FileHelperTest.php`, changed the function signatures for `setUp()`, `assertFileMode()`, `createFileStructure()`, `assertChangeOwnershipError()`, `DataProviderChangeOwnershipInvalidArguments()`, `testChangeOwnershipInvalidArguments()`, `getDataProviderChangeOwnership-by-Owner()`, `getDataProviderChangeOwnership-by-Group()`, `getDataProviderChangeOwnership-by-User-Group()`, `testChangeOwnership()`, `getExtensionsByMimeTypeProvider()`, `getExtensionByMimeTypeProvider()`, and `testGetExtensionByMimeType()` to include return types.
* In `FileHelperTest.php`, changed the assertion functions `assertFileNotExists` to `assertFileDoesNotExist`.
* The `setUp` and `tearDown` methods in the `tests/framework/helpers/FormatConverterTest.php` file were updated to have return types of `void`. Some tests and data providers in the same file were changed to have the `public static` modifier. 
* The `setUp` method in the `tests/framework/helpers/HtmlTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/InflectorTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/IpHelperTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/JsonTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/MarkdownTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/StringHelperTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/UrlTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUp` method in the `tests/framework/helpers/VarDumperTest.php` file was updated to have a return type of `void`. Some data providers in the same file were changed to have the `public static` modifier.
* The `setUpBeforeClass` method in the `tests/framework/i18n/DbMessageSourceTest.php` file was updated to have a return type of `void`. The `tearDownAfterClass` method in the same file was updated to have a return type of `void`.
* The code was added to the `tests/framework/helpers/FormatConverterTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/HtmlTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/InflectorTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/JsonTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/MarkdownTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/UrlTest.php` file to remove a test and its data provider.
* The code was added to the `tests/framework/helpers/VarDumperTest.php` file to remove a test and its data provider.
* A regular expression in the `tests/framework/helpers/HtmlTest.php` file was updated to use the `assertMatchesRegularExpression` method instead of the `assertRegExp` method.
* Some data providers in the `tests/framework/helpers/StringHelperTest.php` file were changed to have the `public static` modifier.
* In `tests/framework/i18n/FallbackMessageFormatterTest.php`:
   - The method `patterns()` was changed to `public static`.
   
* In `tests/framework/i18n/FormatterDateTest.php`:
   - The methods `setUp()` and `tearDown()` were changed to `protected function setUp(): void` and `protected function tearDown(): void`, respectively.
   - Some code related to the variable `$value` was moved out of an `if` condition.
   
* In `tests/framework/i18n/FormatterNumberTest.php`:
   - The methods `setUp()` and `tearDown()` were changed to `protected function setUp(): void` and `protected function tearDown(): void`, respectively.
   
* In `tests/framework/i18n/FormatterTest.php`:
   - The methods `setUp()` and `tearDown()` were changed to `protected function setUp(): void` and `protected function tearDown(): void`, respectively.
   - The method `lengthDataProvider()` was changed to `public static function lengthDataProvider()`.
   - The method `weightDataProvider()` was changed to `public static function weightDataProvider()`.
   
* In `tests/framework/i18n/GettextPoFileTest.php`:
   - The method `setUp()` was changed to `protected function setUp(): void`.
   
* In `tests/framework/i18n/I18NTest.php`:
   - The method `setUp()` was changed to `protected function setUp(): void`.
   - The method `sourceLanguageDataProvider()` was changed to `public static function sourceLanguageDataProvider()`.
   
* In `tests/framework/i18n/LocaleTest.php`:
   - The method `setUp()` was changed to `protected function setUp(): void`.
   
* In `tests/framework/i18n/MessageFormatterTest.php`:
   - The method `patterns()` was changed to `public static`.
   
* In `tests/framework/log/DbTargetTest.php`:
   - The methods `setUp()` and `tearDown()` were changed to `public function setUp(): void` and `public function tearDown(): void`, respectively.
   
* In `tests/framework/log/DispatcherTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    - Some arguments were removed from an exception assertion in the method `testTargetThrow()`.
    - The method `providerForNonProfilingMessages()` was changed to `public static function providerForNonProfilingMessages()`.
    
* In `tests/framework/log/EmailTargetTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    - Replaced an exception assertion with an `expectException()` assertion in the method `testInitWithoutOptionTo()`.
    
* In `tests/framework/log/FileTargetTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    
* In `tests/framework/log/LoggerTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    - The method `providerForNonProfilingMessages()` was changed to `public static function providerForNonProfilingMessages()`.
    
* In `tests/framework/log/SyslogTargetTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    
* In `tests/·framework/mail/BaseMailerTest.php`:
    -The method `setUp()` was changed to `protected function setUp(): void`.
    - The method `htmlAndPlainProvider()` was changed to `public static function htmlAndPlainProvider()`.
  • The setUp() method in the BaseMessageTest class has been updated. It now has a return type declaration : void.
  • The assertFileNotExists() method in the FileMutexTest class has been deprecated and replaced with assertFileDoesNotExist().
  • The MysqlMutexTest class has been updated. It now has a @group mutex annotation before the @group db annotation.
  • The testThatMutexLocksWithKeyPrefixesExpressionCalculatedValue() method in the MysqlMutexTest class has been updated. The assertions now use assertInstanceOf with class names instead of classname().
  • The PgsqlMutexTest class has been updated. It now has a @group mutex annotation before the @group db annotation.
  • The testGetAssignmentsByRole() method in the DbManagerTestCase class has been added. It tests the getAssignmentsByRole() method and includes several assertions.
  • The setUpBeforeClass() and tearDownAfterClass() methods in the DbManagerTestCase class now have a return type declaration : void.
  • The setUp() and tearDown() methods in the DbManagerTestCase class now have a return type declaration : void.
  • The emptyValuesProvider() method in the DbManagerTestCase class has been renamed to emptyValuesProvider().
  • The assertContains() method in the DbManagerTestCase class has been replaced with assertStringContainsString().
  • The setUp() and tearDown() methods in the ManagerTestCase class now have a return type declaration : void.
  • The RBACItemsProvider() method in the ManagerTestCase class has been renamed to RBACItemsProvider().
  • The setUp() and tearDown() methods in the PhpManagerTest class now have a return type declaration : void.
  • The dataFile property in the ArrayFixture class has been removed.
  • The setUp() method in the ArrayFixtureTest class now has a return type declaration : void.
  • The setUp() method in the EachValidatorTest class now has a return type declaration : void.
  • The validateAttribute() method in the EachValidatorTest class now calls assertIsString() instead of assertInternalType().
  • The testValidateMimeTypeMaskInvalid() method in the FileValidatorTest class now uses getMockBuilder() to create a mock object of the FileValidator class.
  • The validMimeTypes() method in the FileValidatorTest class has been renamed to validMimeTypes().
  • The invalidMimeTypes() method in the FileValidatorTest class has been renamed to invalidMimeTypes().
  • The testValidateMimeTypeCaseInsensitive() method in the FileValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The mimeTypeCaseInsensitive() method in the FileValidatorTest class has been renamed to mimeTypeCaseInsensitive().
  • The setUp() method in the DefaultValueValidatorTest class now has a return type declaration : void.
  • The setUp() method in the EmailValidatorTest class now has a return type declaration : void.
  • The testValidateAttribute() method in the EmailValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The malformedAddressesProvider() method in the EmailValidatorTest class has been renamed to malformedAddressesProvider().
  • The setUp() method in the ExistValidatorTest class now has a return type declaration : void.
  • The setUp() method in the FileValidatorTest class now has a return type declaration : void.
  • The testAssureMessagesSetOnInit() method in the FileValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The testValidateAttributeErrNoTmpDir() method in the FileValidatorTest class now uses getMockBuilder() to create a mock object of the FileValidator class.
  • The validMimeTypes() method in the FileValidatorTest class has been renamed to validMimeTypes().
  • The invalidMimeTypes() method in the FileValidatorTest class has been renamed to invalidMimeTypes().
  • The testValidateAttribute() method in the IpValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The provideRangesForSubstitution() method in the IpValidatorTest class has been renamed to provideRangesForSubstitution().
  • The setUp() method in the RangeValidatorTest class now has a return type declaration : void.
  • The provideFilters() method in the FilterValidatorTest class has been renamed to filterProvider().
  • The setUp() method in the UrlValidatorTest class now has a return type declaration : void.
  • The createUrlDataProvider() method in the UrlValidatorTest class has been renamed to createUrlDataProvider().
  • The testValidateAttribute() method in the UrlValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The createUrlDataProvider() method in the UrlValidatorTest class has been renamed to createUrlDataProvider().
  • The setUp() method in the BooleanValidatorTest class now has a return type declaration : void.
  • The testValidateAttribute() method in the BooleanValidatorTest class now uses assertIsBool() instead of assertInternalType().
  • The setUp() method in the CompareValidatorTest class now has a return type declaration : void.
  • The testCompareDifferentDataTypes() method in the CompareValidatorTest class has been added. It tests comparisons between different data types.
  • The testOffsetNotSet() method in the DefaultValueValidatorTest class has been added. It tests the behavior when the attribute is not set.
  • The testValidateAttribute() method in the DateValidatorTest class now uses assertIsString() instead of assertInternalType().
  • The provideLanguagesForStrictDateFormat() method in the DateValidatorTest class has been renamed to provideLanguagesForStrictDateFormat().
  • The setUp() method in the DateValidatorTest class now has a return type declaration : void.
  • The testMultiAttributeValidation() method in the DateValidatorTest class now includes multiple assertions.
  • The testValidateAttributeErrNoTmpDir() method in the FileValidatorTest class now uses getMockBuilder() to create a mock object of the FileValidator class.
  • The validMimeTypes() method in the FileValidatorTest class has been renamed to validMimeTypes().
  • In tests/framework/validators/NumberValidatorTest.php, the setUp() methods were changed to setUp(): void, and the assertContains() assertions were updated to assertStringContainsString().
  • In tests/framework/validators/RangeValidatorTest.php, the setUp() method was changed to setUp(): void, and the assertInternalType() assertion was changed to assertIsString().
  • In tests/framework/validators/RegularExpressionValidatorTest.php, the setUp() method was changed to setUp(): void, and the assertInternalType() assertion was changed to assertIsString().
  • In tests/framework/validators/RequiredValidatorTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/validators/StringValidatorTest.php, the setUp() method was changed to setUp(): void, and the assertInternalType() assertions were changed to assertIsString().
  • In tests/framework/validators/UniqueValidatorTest.php, the setUp() method was changed to setUp(): void, and the assertInternalType() assertion was changed to assertIsString().
  • In tests/framework/validators/UrlValidatorTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/validators/ValidatorTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/web/AssetBundleTest.php, the setUp() method was changed to setUp(): void, and the assertFileNotExists() assertions were changed to assertFileDoesNotExist().
  • In tests/framework/web/AssetConverterTest.php, the setUp() method was changed to setUp(): void, and the tearDown() method was changed to tearDown(): void.
  • In tests/framework/web/ControllerTest.php, the setUp() method was changed to setUp(): void, and several assertions were changed (e.g., assertInternalType() to assertIsString() and assertContains() to assertStringContainsString()).
  • In tests/framework/web/ErrorActionTest.php, the setUp() method was changed to setUp(): void, and several assertions were changed (e.g., assertContains() to assertStringContainsString()).
  • In tests/framework/web/ErrorHandlerTest.php, the setUp() method was changed to setUp(): void, and several assertions were changed.
  • In tests/framework/web/FormatterTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/web/GroupUrlRuleTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/web/JsonResponseFormatterTest.php, several assertInternalType() assertions were changed to assertIsString(), and some methods were changed to static (e.g., formatArrayDataProvider() and contentTypeGenerationDataProvider()).
* In `RequestTest.php`:
- Replaced the `assertRegExp` assertion with `assertMatchesRegularExpression` in the `testCsrfTokenContainsASCIIOnly` method.
- Removed the `@expectedException` annotation from the `testGetScriptFileWithEmptyServer` and `testGetScriptUrlWithEmptyServer` methods and added `$this->expectException` calls instead.
- Updated the `getHostInfoDataProvider`, `isSecureServerDataProvider`, `isSecureServerWithoutTrustedHostDataProvider`, `getUserIPDataProvider`, `getUserIPWithoutTruestHostDataProvider`, `getMethodDataProvider`, `getIsAjaxDataProvider`, `getIsPjaxDataProvider`, `httpAuthorizationHeadersProvider`, and `getBodyParamsDataProvider` methods to be static.
- Added a new method `alreadyResolvedIpDataProvider`.
- Removed the `@inheritDoc` annotation from the `testGetMethod`, `testGetIsAjax`, and `testGetIsPjax` methods.
- Updated the `testGetIsSecureConnection`, `testGetIsSecureConnectionWithoutTrustedHost`, `testGetUserIP`, `testGetUserIPWithoutTrustedHost`, `testSetStatusCodeByException`, `testSkipFormatter` methods to have return types of `void`.
- Removed the `data` array from the `formatDataProvider`.
- Updated the `dataProviderSetStatusCodeByException` method to include `Error` as an acceptable exception parameter type.
- Removed the `testNonSeekableStream` method.
* In `ResponseTest.php`:
- Updated the `setUp` method to have a return type of `void`.
- Updated the `rightRanges`, `testSendFileRanges`, `wrongRanges`, `testSendFileWrongRanges`, `dataProviderAjaxRedirectInternetExplorer11`, `testAjaxRedirectInternetExplorer11`, `dataProviderSetStatusCodeByException`, `testSetStatusCodeByException`, `formatDataProvider`, `testSkipFormatter`, `dataProviderAlias`, `testAlias`, `dataProviderMultiAlias`, `testMultiAlias`, and `testNonSeekableStream` methods to have return types of `void`.
* In `UploadedFileTest.php`:
- Updated the `setUp` method to have a return type of `void`.
* In `UrlManagerCreateUrlTest.php`:
- Updated the `getUrlManager` method to have a return type of `UrlManager`.
- Updated the `getRequest` method to have a return type of `Request`.
- Updated the `tearDown` method to have a return type of `void`.
- Updated the `variationsProvider`, `testWithoutRules`, `testWithoutRulesStrict`, `testWithoutRulesWithSuffix`, `testSimpleRules`, `testSimpleRulesWithSuffix`, `testControllerActionParams`, `testRulesWithDefaultParams`, `testWithNullParams`, `testWithEmptyPattern`, `absolutePatternsVariations`, `testAbsolutePatterns`, `testProtocolRelativeAbsolutePattern`, `multipleHostsRulesDataProvider`, `testMultipleHostsRules` methods to have return types of `void`.
* In `UrlManagerParseUrlTest.php`:
- Updated the `getUrlManager` method to have a return type of `UrlManager`.
- Updated the `getRequest` method to have a return type of `Request`.
- Updated the `testWithoutRules`, `testWithoutRulesStrict`, `suffixProvider`, `testWithoutRulesWithSuffix`, `testSimpleRulesStrict`, `testSimpleRulesWithSuffix`, `testSimpleRulesWithSuffixStrict`, `dispatcherDataProvider`, `testCustomRule`, `testInvalidRule`, `testBlankUrlRule`, `testSimpleRule`, `testSimpleWildcardRule`, `testWildcardRoute`, `testOptionalParam`, `testOptionalSuffix`, `testOptionalWithSuffix`, `testOptionalParamWithSuffix`, `testOptionalParamWithRequiredSuffix`, `testParamRequiredRequiredSuffix`, `testUrlSuffixInGroup`, `testNonGreedyRoute`, `testCustomParamPattern`, `testOptionalParamWithRequiredParamInPattern`, `testMultipleHostsRules`, `testMultipleHostsRulesWithPrefix` methods to have return types of `void`.
  • In tests/framework/web/UrlManagerTest.php, the getUrlManager method was modified to have type hints for the $config and $showScriptName parameters.
  • The ignoredOptionsProvider method was changed to return an array.
  • The testCreateUrlSimple, testCreateUrlWithParams, testCreateUrlWithAnchor, and testCreateAbsoluteUrl methods were modified to have type hints for the $showScriptName and $enableStrictParsing parameters.
  • The testCreateUrlRouteVariants method was modified to have type hints for the $showScriptName and $enableStrictParsing parameters.
  • The routeParamProvider method was changed to return an array.
  • The testParseRequest method was modified to have a type hint for the $routeParam parameter.
  • In tests/framework/web/UrlNormalizerTest.php and tests/framework/web/UrlRuleTest.php, the setUp methods were modified to have a return type of void.
  • In tests/framework/web/UserTest.php, the tearDown method was modified to have a return type of void.
  • The initStrictModeTest, useStrictModeTest, hintDataProvider, testHint, testInputOptionsTransferToWidget, and testGetCreateUrlStatus methods were modified to have a return type of void.
  • In tests/framework/web/session/AbstractDbSessionTest.php, the setUp and tearDown methods were modified to have a return type of void.
  • In tests/framework/web/session/CacheSessionTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/web/session/SessionTestTrait.php, the initStrictModeTest method was modified to have a return type of void.
  • In tests/framework/web/session/mssql/DbSessionTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/web/session/mysql/DbSessionTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/web/session/pgsql/DbSessionTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/web/session/sqlite/DbSessionTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/ActiveFieldTest.php, the setUp method was modified to have a return type of void. Additionally, the hintDataProvider, testHint, testTabularInputErrors, testInputOptionsTransferToWidget, and testGetValue methods were modified to have a return type of void.
  • In tests/framework/widgets/ActiveFormTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/BlockTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/BreadcrumbsTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/ContentDecoratorTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/DetailViewTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/FragmentCacheTest.php, the setUp method was modified to have a return type of void.
  • In tests/framework/widgets/LinkPagerTest.php, the setUp method was modified to have a return type of void. Additionally, the testFirstLastPageLabels, testDisabledPageElementOptions, testDisabledPageElementOptionsWithTagOption, testDisableCurrentPageButton, testOptionsWithTagOption, testLinkWrapOptions, testGoogleStyleNormalizer, testSubTagWithId, testButtonLinkInsideSubTag, and testClassPageSubTagOptions methods were modified to have a return type of void.
  • In tests/framework/widgets/LinkSorterTest.php, the setUp method was modified to have a return type of void.
    • In tests/framework/widgets/ListViewTest.php, the setUp() method was changed to setUp(): void.
  • In tests/framework/widgets/ListViewTest.php, the getDataProvider() method was changed to private static function getDataProvider($additionalConfig = []).
  • In tests/framework/widgets/ListViewTest.php, the itemViewOptions() method was changed to public static function itemViewOptions().
  • In tests/framework/widgets/ListViewTest.php, the testItemViewOptions() method was changed to public function testItemViewOptions(mixed $itemView, string $expected): void.
  • In tests/framework/widgets/ListViewTest.php, the itemOptions() method was changed to public static function itemOptions(): array.
  • In tests/framework/widgets/ListViewTest.php, the testItemOptions() method was changed to public function testItemOptions(mixed $itemOptions, string $expected): void.
  • In tests/framework/widgets/ListViewTest.php, the providerForNoSorter() method was changed to public static function providerForNoSorter(): array.
  • In tests/framework/widgets/ListViewTest.php, the testRenderNoSorter() method was changed to public function testRenderNoSorter(array $additionalConfig): void.
  • In tests/framework/widgets/ListViewTest.php, the providerForSummary() method was changed to public static function providerForSummary(): array.
  • In tests/framework/widgets/ListViewTest.php, the testRenderSummaryWhenSummaryIsCustom() method was changed to public function testRenderSummaryWhenSummaryIsCustom(string $summary, string $result): void.
  • In tests/framework/widgets/MenuTest.php, the setUp() method was changed to protected function setUp(): void.
  • In tests/framework/widgets/PjaxTest.php, the setUp() method was changed to protected function setUp(): void.

@schmunk42
Copy link
Contributor

What's the rationale behind this?

It's a pretty heavy BC-break.

@jiaweipan
Copy link
Author

What's the rationale behind this?

It's a pretty heavy BC-break.

See in phpdoc, such as @deprecated This method is an alias for [[multiGet()]] and will be removed in 2.1.0.

@bizley bizley added this to the 2.2.0 milestone Jul 12, 2023
@bizley
Copy link
Member

bizley commented Jul 12, 2023

@schmunk42 it's for Yii 2.2

@terabytesoftw
Copy link
Member

We are going to place in the next PR in the title that is for Yii 2.2, so there will be no confusion.

@jiaweipan
Copy link
Author

We are going to place in the next PR in the title that is for Yii 2.2, so there will be no confusion.

ok

@bizley bizley merged commit 9a5e2a5 into yiisoft:2.2 Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants