diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b9afeb572..d5fec84918 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" services: mysql: diff --git a/CHANGELOG b/CHANGELOG index e1e48a7774..0e9160e5ec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ Version 1.1.30 under development - Bug #4547: PHP 8 compatibility: Fix deprecation in CCaptcha when using Imagick extension (apphp) - Bug #4541: PHP 8 compatibility: Fix deprecation in MarkdownParser (mdeweerd) - Bug #4544: PHP 8 compatibility: Fix deprecation in CLocale (apphp) +- Enh #4552: Added support for PHP 8.3 (sandippingle, ThePepster, marcovtwout) Version 1.1.29 November 14, 2023 -------------------------------- diff --git a/README.md b/README.md index afb6ce67cc..e6430fd6f1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Thank you for choosing Yii - a high-performance component-based PHP framework. and will only receive necessary security fixes and fixes to adjust the code for compatibility with PHP 7 and 8 if they do not cause breaking changes. This allows you to keep your servers PHP version up to date in the environments where old Yii 1.1 applications are hosted and stay within the [version ranges supported by the PHP team](https://php.net/supported-versions.php). > -> Currently tested and supported [up to PHP 8.2](https://github.com/yiisoft/yii/blob/master/.github/workflows/build.yml#L34). +> Currently tested and supported [up to PHP 8.3](https://github.com/yiisoft/yii/blob/master/.github/workflows/build.yml#L34). INSTALLATION ------------ diff --git a/composer.json b/composer.json index 932558e60a..a335b2f1e2 100644 --- a/composer.json +++ b/composer.json @@ -108,7 +108,8 @@ "phpunit/phpunit": { "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch", - "Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch" + "Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch", + "Fix PHP 8.3 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php83.patch" } } }, diff --git a/framework/base/CApplication.php b/framework/base/CApplication.php index 61d1602989..0d5fa0d1b2 100644 --- a/framework/base/CApplication.php +++ b/framework/base/CApplication.php @@ -427,8 +427,8 @@ public function getLocaleDataPath() */ public function setLocaleDataPath($value) { - $property=new ReflectionProperty($this->localeClass,'dataPath'); - $property->setValue($value); + $class=new ReflectionClass($this->localeClass); + $class->setStaticPropertyValue('dataPath',$value); } /** diff --git a/framework/utils/CVarDumper.php b/framework/utils/CVarDumper.php index a8e78b86ae..ce834674a9 100644 --- a/framework/utils/CVarDumper.php +++ b/framework/utils/CVarDumper.php @@ -60,7 +60,7 @@ public static function dumpAsString($var,$depth=10,$highlight=false) if($highlight) { $result=highlight_string("/','',$result,1); + self::$_output=preg_replace('/<\\?php(
|\\n)/','',$result,1); } return self::$_output; } diff --git a/tests/framework/web/CCookieCollectionTest.php b/tests/framework/web/CCookieCollectionTest.php index f217421b4b..999ee90cd2 100644 --- a/tests/framework/web/CCookieCollectionTest.php +++ b/tests/framework/web/CCookieCollectionTest.php @@ -38,6 +38,7 @@ public function testConstructorCookieBuilding() } /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testAdd() @@ -59,6 +60,7 @@ public function testAdd() } /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testRemove() diff --git a/tests/framework/web/CHttpSessionTest.php b/tests/framework/web/CHttpSessionTest.php index d904b028e4..cab82abf4a 100644 --- a/tests/framework/web/CHttpSessionTest.php +++ b/tests/framework/web/CHttpSessionTest.php @@ -16,6 +16,7 @@ protected function checkProb($gcProb) { * @covers CHttpSession::setGCProbability * * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testSetGet() { Yii::app()->setComponents(array('session' => array( diff --git a/tests/framework/web/auth/CWebUserTest.php b/tests/framework/web/auth/CWebUserTest.php index 12e6305375..bdfec6aea4 100644 --- a/tests/framework/web/auth/CWebUserTest.php +++ b/tests/framework/web/auth/CWebUserTest.php @@ -31,6 +31,7 @@ public function booleanProvider() /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled * @dataProvider booleanProvider */ @@ -59,6 +60,7 @@ public function testLoginLogout($destroySession) /** * @runInSeparateProcess + * @preserveGlobalState disabled * @outputBuffering enabled */ public function testCheckAccess()