yiisoft / yii

Yii PHP Framework 1.1.x

Home Page:http://www.yiiframework.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.3 Compatibility

sandippingle opened this issue · comments

What steps will reproduce the problem?

PHP Deprecated the following features/functions in their release of 8.3:

https://www.php.net/manual/en/migration83.deprecated.php

Saner Increment/Decrement operators

Reflection

Calling ReflectionProperty::setValue() with only one parameter is deprecated. To set static properties, pass null as the first parameter.

Possibly impacted code:

public function setLocaleDataPath($value)
	{
		$property=new ReflectionProperty($this->localeClass,'dataPath');
		$property->setValue($value);
	}

SQLite3

Using exceptions is now preferred, warnings will be removed in the future. Calling SQLite3::enableExceptions(false) will trigger a deprecation warning in this version.

How can we plan PHP 8.3 compatibility?

Additional info

Q A
Yii version 1.1.29
PHP version 8.3
Operating system Linux

Regarding the reflection deprecation, that point seems valid. Those lines could probably be replaced with:

$class=new ReflectionClass($this->localeClass);
$class->setStaticPropertyValue('dataPath',$value);

Regarding SQLite3 enableExceptions(), I don't see that being used anywhere in framework code?