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

Raise version min PHP 7.3. #20134

Merged
merged 21 commits into from
Mar 25, 2024
Merged

Raise version min PHP 7.3. #20134

merged 21 commits into from
Mar 25, 2024

Conversation

terabytesoftw
Copy link
Member

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

Copy link

what-the-diff bot commented Mar 20, 2024

  • In the .appveyor.yml file, the php_ver value was changed from 7.2.4 to 7.3.0. Additionally, the composer.phar download link was updated from 1.4.1 to 2.6.3.
  • In the build.yml GitHub workflow file, there are several changes to the matrix section. The php version 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, and 8.0 were removed. The php version 7.3 now has coverage set to none. The php version 7.4 now has coverage set to pcov. The php versions 8.1, 8.2, and 8.3 were added with coverage set to none. The runs-on value was changed to ubuntu-latest. Additionally, the before_test step was modified to change the command for downloading composer.phar from the if block which checks if the file exists, changing the composer.phar URL to https://getcomposer.org/download/2.6.3/composer.phar.
  • In the ci-mssql.yml GitHub workflow file, the vendor/bin/phpunit command in the run MS SQL tests with PHPUnit and generate coverage step is now conditional on the matrix.php value being equal to 7.4. Similarly, the run MSSQL tests with PHPUnit step and upload coverage to Codecov step are also conditional on the matrix.php value being equal to 7.4.
  • In the ci-mysql.yml GitHub workflow file, the vendor/bin/phpunit command in the run MySQL tests with PHPUnit and generate coverage step is now conditional on the matrix.php value being equal to 7.4. Similarly, the run MySQL tests with PHPUnit step and upload coverage to Codecov step are also conditional on the matrix.php value being equal to 7.4.
  • In the ci-pgsql.yml GitHub workflow file, the vendor/bin/phpunit command in the run Pgsql tests with PHPUnit and generate coverage step is now conditional on the matrix.php value being equal to 7.4. Similarly, the run Pgsql tests with PHPUnit step and upload coverage to Codecov step are also conditional on the matrix.php value being equal to 7.4.
  • In the ci-sqlite.yml GitHub workflow file, the vendor/bin/phpunit command in the run SQLite tests with PHPUnit and generate coverage step is now conditional on the matrix.php value being equal to 7.4. Similarly, the run SQLite tests with PHPUnit step and upload coverage to Codecov step are also conditional on the matrix.php value being equal to 7.4.
  • In the composer.json file, the "php" version requirement was changed from ">=5.4.0" to "^7.3.0". The "cweagans/composer-patches", "phpunit/phpunit", "johnkary/phpunit-speedtrap", and "dealerdirect/phpcodesniffer-composer-installer" dependencies were removed. The "cebe/indent", "dms/phpunit-arraysubset-asserts", and "yiisoft/yii2-coding-standards" dependencies were added.
  • The Object class in the framework/base directory was deleted.
  • In the phpunit.xml.dist file, the <listener> block for PHPUnit_SpeedTrapListener was removed.
  • The ResultPrinter class in the tests directory was modified. The ResultPrinter class now extends PHPUnit_TextUI_ResultPrinter. The flush method is overridden and modified to check if the current output is STDOUT before calling the parent's flush method.
  • The TestCase class in the tests directory was modified. The <stopOnFailure> attribute in the <phpunit> tag is now set to false. The tearDownAfterClass method is now tearDownAfterClass without the static modifier. The tearDown method is now tearDown without the protected modifier. The assertContains method calls were replaced with assertStringContainsString.
  • The bootstrap.php file in the tests directory was modified. The compatibility.php file was removed from the required files.
  • The IsOneOfAssert class in the tests directory was modified. The __construct method now accepts $allowedValues instead of array $allowedValues. The toString method now returns a string instead of string.
  • The ResultPrinter class in the tests directory was modified. The constructor now has a type declaration for the $out parameter. The flush method now has a return type declaration of void.
  • The TestCase class in the tests directory was modified. The expectException method now has a type declaration for the $exception parameter. The expectExceptionMessage method now has a type declaration for the $message parameter. The expectExceptionMessageRegExp method now has a type declaration for the $messageRegExp parameter.
  • The ValidatorTestTypedPropModel class in the tests/data/validators/models directory was modified. Comments were added to the $arrayTypedProperty property.
  • The BaseYiiTest class in the tests/framework directory was modified. The setUp and tearDown methods now have void return type declarations.
  • The ChangeLogTest class in the tests/framework directory was modified. The assertRegExp method was replaced with assertMatchesRegularExpression.
  • The ActionFilterTest class in the tests/framework/base directory was modified. The setUp and tearDown methods now have void return type declarations.
  • The BaseObjectTest class in the tests/framework/base directory was modified. The setUp and tearDown methods now have void return type declarations. The testBackwardCompatibilityWithObject method has been removed.
  • The BehaviorTest class in the tests/framework/base directory was modified. The setUp and tearDown methods now have void return type declarations.
  • The ComponentTest class in the tests/framework/base directory was modified. The setUp and tearDown methods now have void return type declarations. The testEventClosureDetachesItself method was removed.
  • In the DynamicModelTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the EventTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the ModelTest.php file, the setUp method was modified to add a return type declaration of void. Additionally, the testFormNameWithAnonymousClass method was removed if PHP version is less than 7.
  • In the ModuleTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the SecurityTest.php file, the setUp method was modified to add a return type declaration of void. Additionally, the randomKeyInvalidInputs method was modified to remove the @expectedException annotation and add an assertion for an expected exception using expectException.
  • In the ThemeTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the ViewTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the WidgetTest.php file, the tearDown method was modified to add a return type declaration of void.
  • In the AttributeBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the AttributeTypecastBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the AttributesBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the BlameableBehaviorConsoleTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the BlameableBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the CacheableWidgetBehaviorTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the OptimisticLockBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the SluggableBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the TimestampBehaviorTest.php file, the setUp and tearDown methods were modified to add a return type declaration of void.
  • In the CacheTestCase.php file, the setUp method was modified to add a return type declaration of void.
  • In the DbCacheTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the DbDependencyTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the DbQueryDependencyTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the FileCacheTest.php file, the testKeyPrefix method was modified to remove an assertion. The testCacheRenewalOnDifferentOwnership method was removed.
  • In the MssqlCacheTest.php file, the setUp method was modified to add a return type declaration of void.
  • In the PgSQLCacheTest.php file, the setUp method was modified to add a return type declaration of void.
* In the file `tests/framework/console/ControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- Several test methods were modified to remove a conditional check based on the PHP version.
* In the file `tests/framework/console/UnknownCommandExceptionTest.php`:
- The `setUp` method was changed to `setUp(): void`.
* In the file `tests/framework/console/controllers/AssetControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `tearDown` method was changed to `tearDown(): void`.
- The `testActionTemplate` method was modified to use `assertIsArray` instead of `assertInternalType`.
- The `testActionCompress` method was modified to use `assertIsArray` and `assertStringContainsString` instead of `assertInternalType` and `assertContains`.
- The `testCompressExternalAsset` method was modified to use `assertIsArray` and `assertStringContainsString` instead of `assertInternalType` and `assertContains`.
* In the file `tests/framework/console/controllers/BaseMessageControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `tearDown` method was changed to `tearDown(): void`.
* In the file `tests/framework/console/controllers/CacheControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `testNothingToFlushException` method was modified to use `expectException` and `expectExceptionMessage` instead of the `@expectedException` annotation.
* In the file `tests/framework/console/controllers/DbMessageControllerTest.php`:
- The `setUpBeforeClass` method was changed to `setUpBeforeClass(): void`.
- The `tearDownAfterClass` method was changed to `tearDownAfterClass(): void`.
- The `tearDown` method was changed to `tearDown(): void`.
* In the file `tests/framework/console/controllers/FixtureControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `tearDown` method was changed to `tearDown(): void`.
* In the file `tests/framework/console/controllers/HelpControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `testActionIndex` method was modified to use `assertStringContainsString` instead of `assertContains`.
- The `testActionIndexWithHelpCommand` method was modified to use `assertStringContainsString` instead of `assertContains`.
- The `testActionIndexWithServeCommand` method was modified to use `assertStringContainsString` instead of `assertContains`.
- The `testActionListContainsNoEmptyCommands` method was modified to use `assertStringNotContainsString` and `assertStringContainsString` instead of `assertNotContains` and `assertContains`.
* In the file `tests/framework/console/controllers/MigrateControllerTest.php`:
- The `setUp` method was changed to `setUp(): void`.
- The `tearDown` method was changed to `tearDown(): void`.
- The `testUpdatingLongNamedMigration` method was modified to use `assertStringContainsString` instead of `assertContains`.
- The `testNamedMigrationWithCustomLimit` method was modified to use `assertStringContainsString` instead of `assertContains`.
- The `testRefreshMigration` method was modified to use `expectException` and `expectExceptionMessage` instead of the `@expectedException` annotation.
- The `testCreateLongNamedMigration` method was modified to use `assertStringContainsString` instead of `assertContains`.
* In the file `tests/framework/console/controllers/MigrateControllerTestTrait.php`:
- The `testNamespaceCreate` method was modified to use `assertStringContainsString` and `assertMatchesRegularExpression` instead of `assertContains` and `assertRegExp`.
- The `testNamespaceHistory` method was modified to use `assertMatchesRegularExpression` instead of `assertRegExp`.
- The `testNamespaceNew` method was modified to use `assertStringContainsString` instead of `assertContains`.
* The `tests/framework/console/controllers/PHPMessageControllerTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
- Updated the `tearDown` method, changing it to `protected function tearDown(): void`
- Changed the assertion `assertFileNotExists` to `assertFileDoesNotExist`
* The `tests/framework/console/controllers/POMessageControllerTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
- Updated the `tearDown` method, changing it to `protected function tearDown(): void`
* The `tests/framework/console/controllers/ServeControllerTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
- Changed the assertions `assertContains` to `assertStringContainsString`
* The `tests/framework/console/widgets/TableTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/ActiveDataFilterTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/ActiveDataProviderTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/ArrayDataProviderTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/DataFilterTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/PaginationTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/data/SortTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/db/ActiveQueryModelConnectionTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/db/ActiveQueryTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/db/ActiveRecordTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
- Changed the assertion `assertInternalType` to `assertIsArray`
- Removed the commented assertions for type casting
* The `tests/framework/db/BaseActiveRecordTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/db/BatchQueryResultTest.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
* The `tests/framework/db/CommandTest.php` file had the following changes:
- Updated the `bindParamValue` test to fix a floating point precision issue
- Updated the `fetchMode` test to use assertions `assertIsObject` instead of `assertInternalType`
- Updated the `BatchInsertWithYield` test to catch an exception
- Updated the `AddDropCheck` test to use `assertMatchesRegularExpression` instead of `assertRegExp`
- Updated the `InsertSelectFailed` test to use an exception instead of an assertion
- Updated the `testColumnSchema` method to use assertions `assertIsObject`, `assertIsArray`, and `assertNull`
* The `tests/framework/db/ConnectionTest.php` file had the following changes:
- Updated the `transactionShortcutException` test to use assertions instead of exceptions
- Updated the `transactionWithColumnNameException` test to use assertions instead of exceptions
- Updated the `startProfiling` and `getProfilingResults` tests to use assertions `assertContains` instead of assertions `assertRegExp`
* The `tests/framework/db/DatabaseTestCase.php` file had the following changes:
- Updated the `setUp` method, changing it to `protected function setUp(): void`
- Updated the `tearDown` method, changing it to `protected function tearDown(): void`
* The `tests/framework/db/QueryTest.php` file had the following changes:
- Updated the `limitOffsetWithExpression` test to use assertions `assertEquals` instead of assertions `assertContains`
* The `tests/framework/db/SchemaTest.php` file had the following changes:
- Updated the `TableSchema` test to fix assertions `assertInternalType`, `assertIsObject`, `assertIsArray`, and `assertNull`
* The `tests/framework/db/QueryTest.php` file had the following changes:
- Updated the `limitOffsetWithExpression` test to use assertions `assertEquals` instead of assertions `assertContains`
* The `tests/framework/db/SchemaTest.php` file had the following changes:
- Updated the `assertMetadataEquals` method to use assertions `assertIsObject`, `assertIsArray`, `asserNull`, `assertStringContainsString`, and `assertMatchesRegularExpression`
Overall, there were updates to various test files, mainly changing the signature of the `setUp` and `tearDown` methods to use `void` return type, changing assertions to use more specific assertion methods, and fixing some floating point precision issues.
* In `tests/framework/db/mssql/CommandTest.php`, the value of `$floatCol` was changed from `1.23` to `1.230`.
* In `tests/framework/db/mssql/type/VarbinaryTest.php`, the namespace was changed from `yiiunit\framework\db\mssql\Type` to `yiiunit\framework\db\mssql\type`.
* In `tests/framework/db/mysql/BaseActiveRecordTest.php`, a new comment block was added.
* In `tests/framework/db/mysql/QueryTest.php`, the assertions for `$result` were changed. The method `assertNotContains` was replaced with `assertEquals` for the array `[2, 3]`.
* In `tests/framework/db/oci/ActiveRecordTest.php`, the assertion for `$model->float_col` was changed from `1337.42` to `3.742`.
* In `tests/framework/db/oci/QueryBuilderTest.php`, the assertions for `$this->assertContains` were changed to `$this->assertStringContainsString`.
* In `tests/framework/db/pgsql/ArrayParserTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/db/pgsql/BaseActiveRecordTest.php`, a new comment block was added.
* In `tests/framework/db/pgsql/ConnectionTest.php`, the assertion for `$this->assertInternalType` was changed to `$this->assertIsObject`.
* In `tests/framework/di/ContainerTest.php`, the methods `tearDown`, `testThrowingNotFoundException`, `testVariadicConstructor`, and `testVariadicCallable` were changed to `tearDown(): void`, `testRestoreAfterVarExport`, and `testContainerSingletons`.
* In `tests/framework/di/InstanceTest.php`, the methods `tearDown`, `testThrowingNotFoundException`, `testVariadicConstructor`, and `testVariadicCallable` were changed to `tearDown(): void`, `testEnsure_NonExistingComponentException`, `testEnsure_NonExistingClassException`, and `testRestoreAfterVarExport`.
* In `tests/framework/filters/AccessRuleTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/ContentNegotiatorTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/HostControlTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/HttpCacheTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/PageCacheTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/RateLimiterTest.php`, the methods `setUp` and `tearDown` were changed to `setUp(): void` and `tearDown(): void`. Also, the assertion for `$this->assertContains` was changed to `$this->assertStringContainsString`.
* In `tests/framework/filters/auth/AuthMethodTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/auth/AuthTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/filters/auth/CompositeAuthTest.php`, the method `setUp` was changed to `setUp(): void`.
* In `tests/framework/grid/ActionColumnTest.php`, the assertion for `$this->assertContains` was changed to `$this->assertStringContainsString`.
* In `tests/framework/grid/CheckboxColumnTest.php`, the methods `setUp` and `tearDown` were changed to `setUp(): void` and `tearDown(): void`. Also, the assertions for `$this->assertContains` and `$this->assertNotContains` were changed to `$this->assertStringContainsString` and `$this->assertStringNotContainsString`, respectively.
  • The setUp() methods in the test classes have been updated to setUp(): void.
  • The expectNotToPerformAssertions() method has been added to the test methods testHeaderLabels() and testMultipleInGrid().
  • The setUp() methods in the test classes ArrayHelperTest, FileHelperTest, FormatConverterTest, HtmlTest, InflectorTest, IpHelperTest, JsonTest, MarkdownTest, StringHelperTest, UrlTest, and VarDumperTest have been updated to setUp(): void.
  • The expectException() and expectExceptionMessage() methods have been added to the test method testException() in the RadiobuttonColumnTest class.
  • The assertContains() method has been replaced with assertStringContainsString() in the test methods testHeaderLabels() and testContent() in the RadiobuttonColumnTest class.
  • The expectNotToPerformAssertions() method has been added to the test method testCopyDirWithSameName() in the FileHelperTest class.
  • The assertFileNotExists() methods have been replaced with assertFileDoesNotExist() in the test methods testRemoveDirectory(), testGetValueWithFloatKeys(), testMergeEmpty(), testKeyExistsWithFloat(), and testGetValueNonexistingPropertiesForArrayObject() in the FileHelperTest class.
  • The assertContains() method has been replaced with assertMatchesRegularExpression() in the test methods testIntlUtf8Ru() and testPhpToICUMixedPatterns() in the FormatConverterTest class.
  • The expectNotToPerformAssertions() method has been added to the test method testIpv6ExpandingWithInvalidValue() in the IpHelperTest class.
  • The assertContains() method has been replaced with assertStringContainsString() in the test methods testDumpIncompleteObject(), testExportIncompleteObject(), and testDumpObject() in the VarDumperTest class.
  • The expectNotToPerformAssertions() method has been added to the test method testDumpClassWithCustomDebugInfo() in the VarDumperTest class.
  • The setUpBeforeClass() methods in the test classes have been updated to setUpBeforeClass(): void.
  • The tearDownAfterClass() methods in the test classes have been updated to tearDownAfterClass(): void.
  • In FormatterDateTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
    • Changed all occurrences of assertRegExp to assertMatchesRegularExpression.
  • In FormatterNumberTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
  • In FormatterTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
  • In GettextPoFileTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In I18NTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In LocaleTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In DbTargetTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
  • In DispatcherTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In EmailTargetTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
    • Added exception assertions for testInitWithoutOptionTo().
  • In FileTargetTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
    • Changed assertions from assertFileNotExists to assertFileDoesNotExist.
  • In LoggerTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In SyslogTargetTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In TargetTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
    • On line 124, changed assertContains to assertStringContainsString.
    • On line 125, changed assertNotContains to assertStringNotContainsString.
  • In BaseMailerTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In BaseMessageTest.php:
    • Changed the method signatures of setUp() to have return type declarations.
  • In FileMutexTest.php:
    • Changed the method signatures of testDeleteLockFile() and tearDownAfterClass() to have return type declarations.
    • Changed assertFileNotExists to assertFileDoesNotExist.
  • In DbManagerTestCase.php:
    • Added a new test testGetAssignmentsByRole().
    • Changed the method signatures of setUp(), tearDownAfterClass(), setUpBeforeClass(), and tearDown() to have return type declarations.
  • In ManagerTestCase.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
  • In PhpManagerTest.php:
    • Changed the method signatures of setUp() and tearDown() to have return type declarations.
    • Added exception assertion for testOverwriteName().
  • The tests/framework/rest/UrlRuleTest.php file had the following changes:
    • The $this->expectNotToPerformAssertions(); line was added in the testGetCreateUrlStatusProvider method.
  • The tests/framework/test/ActiveFixtureTest.php file had the following changes:
    • The method signatures for setUp and tearDown were changed to protected function setUp(): void and protected function tearDown(): void respectively.
  • The tests/framework/test/ArrayFixtureTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/test/FixtureTest.php file had the following changes:
    • The method signatures for setUp and tearDown were changed to protected function setUp(): void and protected function tearDown(): void respectively.
  • The tests/framework/validators/BooleanValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/CompareValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/DateValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The method signature for tearDown was changed to protected function tearDown(): void.
  • The tests/framework/validators/DefaultValueValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/EachValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The method signature for tearDown was changed to protected function tearDown(): void.
    • The testTypedProperties method was added.
  • The tests/framework/validators/EmailValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/FileValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The testAssureMessagesSetOnInit method was added.
    • The testValidateMimeTypeCaseInsensitive method was added.
  • The tests/framework/validators/FilterValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/IpValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/NumberValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The testClientValidateComparison method was added.
  • The tests/framework/validators/RangeValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/RegularExpressionValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/RequiredValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/StringValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/UniqueValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/UrlValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/validators/ValidatorTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
  • The tests/framework/web/AssetBundleTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The testSourcesPublish_AssetManagerBeforeCopy method was added.
    • The testSourcesPublish_AssetBeforeCopy method was added.
    • The testSourcesPublish_publishOptions_Only method was added.
    • The testBasePathIsWritableOnPublish method was added.
    • The testCustomFilePublishWithTimestamp method was added.
    • The testNonRelativeAssetWebPathWithTimestamp method was added.
  • The tests/framework/web/AssetConverterTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The method signature for tearDown was changed to protected function tearDown(): void.
  • The tests/framework/web/ControllerTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The testNullableInjectedActionParams method was added.
    • The testModelBindingHttpException method was added.
    • The testInjectionContainerException method was added.
    • The testUnknownInjection method was added.
    • The testInjectedActionParams method was added.
    • The testInjectedActionParamsFromModule method was added.
    • The testBindTypedActionParams method was added.
  • The tests/framework/web/ErrorActionTest.php file had the following changes:
    • The method signature for setUp was changed to protected function setUp(): void.
    • The testDefaultView method was added.
  • The ErrorHandlerTest.php file had some changes:
    • The setUp method was changed to protected function setUp(): void.
    • The testFormatRaw method had the assertion methods assertcontains replaced with assertStringContainsString.
    • The testFormatXml method had the assertion methods assertcontains replaced with assertStringContainsString and assertContains replaced with assertStringNotContainsString.
    • The testClearAssetFilesInErrorActionView method had the assertion methods assertContains replaced with assertStringNotContainsString.
    • The testRenderCallStackItem method had the assertion methods assertContains replaced with assertStringContainsString.
    • The testHtmlEncodeWithUnicodeSequence method was removed.
  • The FormatterTest.php file had changes in the setUp method:
    • The method was changed to protected function setUp(): void.
  • The GroupUrlRuleTest.php file had changes in the setUp method:
    • The method was changed to protected function setUp(): void.
  • The RequestTest.php file had the following changes:
    • The testCsrfTokenContainsASCIIOnly method had the assertion method assertRegex replaced with assertMatchesRegularExpression.
    • The testGetScriptFileWithEmptyServer method had the expected exception annotation removed.
    • The testGetScriptUrlWithEmptyServer method had the expected exception annotation removed.
  • The ResponseTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The UploadedFileTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The UrlManagerParseUrlTest.php file had the following changes:
    • The tearDown method was changed to protected function tearDown(): void.
  • The UrlNormalizerTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The UrlRuleTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
    • The testGetCreateUrlStatusProvider method had the expected exception annotation removed.
  • The UserTest.php file had the following changes:
    • The tearDown method was changed to protected function tearDown(): void.
    • The $session variable now uses getMockBuilder instead of getMock.
  • The AbstractDbSessionTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
    • The tearDown method was changed to protected function tearDown(): void.
  • The CacheSessionTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The DbSessionTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The DetailViewTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The FragmentCacheTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The LinkPagerTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
    • The assertion methods assertContains and assertNotContains were replaced with assertStringContainsString and assertStringNotContainsString respectively.
  • The LinkSorterTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The ListViewTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.
  • The PjaxTest.php file had the following changes:
    • The setUp method was changed to protected function setUp(): void.

composer.json Outdated Show resolved Hide resolved
Co-authored-by: Robert Korulczyk <[email protected]>
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.82%. Comparing base (28cbf6c) to head (2f9c24e).

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #20134       +/-   ##
=============================================
+ Coverage     46.85%   64.82%   +17.96%     
- Complexity        0    11376    +11376     
=============================================
  Files           445      429       -16     
  Lines         43909    37074     -6835     
=============================================
+ Hits          20575    24034     +3459     
+ Misses        23334    13040    -10294     

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

@terabytesoftw terabytesoftw marked this pull request as ready for review March 21, 2024 09:51
tests/IsOneOfAssert.php Outdated Show resolved Hide resolved
tests/IsOneOfAssert.php Outdated Show resolved Hide resolved
tests/framework/db/ActiveRecordTest.php Show resolved Hide resolved
tests/framework/db/ActiveRecordTest.php Show resolved Hide resolved
tests/framework/di/ContainerTest.php Show resolved Hide resolved
tests/framework/di/ContainerTest.php Show resolved Hide resolved
tests/framework/helpers/ArrayHelperTest.php Outdated Show resolved Hide resolved
tests/framework/helpers/ArrayHelperTest.php Outdated Show resolved Hide resolved
tests/framework/helpers/ArrayHelperTest.php Show resolved Hide resolved
@terabytesoftw terabytesoftw added this to the 2.0.50 milestone Mar 21, 2024
@terabytesoftw
Copy link
Member Author

image

@rob006 You still think 7.3 will be useful here.

@rob006
Copy link
Contributor

rob006 commented Mar 21, 2024

@terabytesoftw What would be practical benefit of raising requirements to PHP 7.4? Yii 2.0 is in maintenance mode, we won't add new features and we can't refactor existing code using types because it would be a BC break (and probably a massive waste of time - such changes make more sense for Yii 2.2). So what features of PHP 7.4 would be so useful that it would be worth to cut ~5% of userbase?

@terabytesoftw
Copy link
Member Author

terabytesoftw commented Mar 22, 2024

I think we should then:

  • Release of 2.0.49.4 with the current master and (remove the 8.4 tests) to leave the tests green, and leave the last update green, for PHP 5.4 - 8.3.
  • Merge php 7.3 in the master with php 8.4 tests.
  • Merge null implicit fixes.

With this we must have all the tests in green, review more PR, merge and release 2.0.50.

@samdark @bizley @rob006 @mtangoo @schmunk42

@rob006
Copy link
Contributor

rob006 commented Mar 22, 2024

I think we could skip 2.0.49.4, we specially released 2.0.49.3 so all changes in master would go to 2.0.50.

@bizley
Copy link
Member

bizley commented Mar 22, 2024

Yes, let's go to 2.0.50 finally.

@terabytesoftw
Copy link
Member Author

Yes, let's go to 2.0.50 finally.

Ok then merge this PR, and the implicit null, to finish removing the PHP 8.4 deprecations.

@bizley
Copy link
Member

bizley commented Mar 22, 2024

@samdark please approve

@mtangoo
Copy link
Contributor

mtangoo commented Mar 22, 2024

Let's go :)

@mtangoo
Copy link
Contributor

mtangoo commented Mar 25, 2024

Since we all approve this am merging it!
Thanks to @terabytesoftw for taking your time to prepare this, and everyone for making it reach thus far.
Cheers!

@mtangoo mtangoo merged commit ac1a5af into yiisoft:master Mar 25, 2024
73 checks passed
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.

8 participants