- πΌπΈSamoa ainsofs
In case someone comes across a class not found error, I found the solution in the registry autoload π PHP8 compatibility issue for namespace tokens Fixed module
After switching to PHP 8, when trying to clear cache, got errors:
"Fatal Error: Declaration of Doctrine\Common\Reflection\StaticReflectionClass::getConstants() must be compatible with ReflectionClass::getConstants(?int $filter = null)" in modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php on line 109.
"Fatal error: Declaration of Doctrine\Common\Reflection\StaticReflectionClass::newInstance($args) must be compatible with ReflectionClass::newInstance(mixed ...$args)" in modules/providers/service_container_annotation_discovery/lib/Doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php on line 397.
The root cause, that in PHP8 getConstants
method of ReflectionClass needs a filter
parameter (https://www.php.net/manual/en/reflectionclass.getconstants.php).
And newInstance
accepts a variable number of arguments which are passed to the class constructor - (https://www.php.net/manual/en/reflectionclass.newinstance.php).
Needs review
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
In case someone comes across a class not found error, I found the solution in the registry autoload π PHP8 compatibility issue for namespace tokens Fixed module