N°8834 - Add compatibility with PHP 8.4 (#819)

* N°8834 - Add compatibility with PHP 8.4

* Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -60,17 +60,19 @@ class ReflectionClassResource implements SelfCheckingResourceInterface
return 'reflection.'.$this->className;
}
/**
* @internal
*/
public function __sleep(): array
public function __serialize(): array
{
if (!isset($this->hash)) {
$this->hash = $this->computeHash();
$this->loadFiles($this->classReflector);
}
return ['files', 'className', 'hash'];
return [
'files' => $this->files,
'className' => $this->className,
'excludedVendors' => $this->excludedVendors,
'hash' => $this->hash,
];
}
private function loadFiles(\ReflectionClass $class): void
@@ -123,7 +125,7 @@ class ReflectionClassResource implements SelfCheckingResourceInterface
yield print_r($attributes, true);
$attributes = [];
yield $class->getDocComment();
yield $class->getDocComment() ?: '';
yield (int) $class->isFinal();
yield (int) $class->isAbstract();
@@ -135,6 +137,14 @@ class ReflectionClassResource implements SelfCheckingResourceInterface
yield print_r($class->getConstants(), true);
}
foreach ($class->getReflectionConstants() as $constant) {
foreach ($constant->getAttributes() as $a) {
$attributes[] = [$a->getName(), (string) $a];
}
yield $constant->name.print_r($attributes, true);
$attributes = [];
}
if (!$class->isInterface()) {
$defaults = $class->getDefaultProperties();
@@ -145,7 +155,7 @@ class ReflectionClassResource implements SelfCheckingResourceInterface
yield print_r($attributes, true);
$attributes = [];
yield $p->getDocComment();
yield $p->getDocComment() ?: '';
yield $p->isDefault() ? '<default>' : '';
yield $p->isPublic() ? 'public' : 'protected';
yield $p->isStatic() ? 'static' : '';