Open sandippingle opened 3 months ago
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?
PHP 8.3 introduces several deprecations that impact the current codebase. Specifically:
Saner Increment/Decrement Operators
ReflectionProperty::setValue() Method
setLocaleDataPath
method to comply with the new requirement of passing null
as the first parameter when setting static properties.public function setLocaleDataPath($value)
{
$property = new ReflectionProperty($this->localeClass, 'dataPath');
if ($property->isStatic()) {
$property->setValue(null, $value);
} else {
$property->setValue($this, $value);
}
}
SQLite3 Exception Handling
SQLite3::enableExceptions(false)
.try {
$db = new SQLite3('database.db');
$db->enableExceptions(true);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
Code Audit and Refactoring
Testing
Update Dependencies
Documentation
Hope this helps out!
Regards.
@TheGithubDev was the post above generated with AI? Is SQLite3 enableExceptions() used anywhere in framework code?
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:
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