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

@@ -115,7 +115,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
public function getIterator(): \Traversable
{
if (!\is_array($value = $this->getValue())) {
throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value)));
throw new \LogicException(\sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value)));
}
yield from $value;
@@ -168,7 +168,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
return (string) $value;
}
return sprintf('%s (count=%d)', $this->getType(), \count($value));
return \sprintf('%s (count=%d)', $this->getType(), \count($value));
}
/**
@@ -298,7 +298,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
if (!$item instanceof Stub) {
$cursor->attr = [];
$type = \gettype($item);
if ($item && 'array' === $type) {
if ('array' === $type && $item) {
$item = $this->getStub($item);
}
} elseif (Stub::TYPE_REF === $item->type) {
@@ -375,7 +375,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate, \Stringable
break;
default:
throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type));
throw new \RuntimeException(\sprintf('Unexpected Stub type: "%s".', $item->type));
}
} elseif ('array' === $type) {
$dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false);