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

@@ -39,10 +39,8 @@ class StopwatchEvent
* @param string|null $category The event category or null to use the default
* @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
* @param string|null $name The event name or null to define the name as default
*
* @throws \InvalidArgumentException When the raw time is not valid
*/
public function __construct(float $origin, string $category = null, bool $morePrecision = false, string $name = null)
public function __construct(float $origin, ?string $category = null, bool $morePrecision = false, ?string $name = null)
{
$this->origin = $this->formatTime($origin);
$this->category = \is_string($category) ? $category : 'default';
@@ -207,8 +205,6 @@ class StopwatchEvent
/**
* Formats a time.
*
* @throws \InvalidArgumentException When the raw time is not valid
*/
private function formatTime(float $time): float
{
@@ -225,6 +221,6 @@ class StopwatchEvent
public function __toString(): string
{
return sprintf('%s/%s: %.2F MiB - %d ms', $this->getCategory(), $this->getName(), $this->getMemory() / 1024 / 1024, $this->getDuration());
return \sprintf('%s/%s: %.2F MiB - %d ms', $this->getCategory(), $this->getName(), $this->getMemory() / 1024 / 1024, $this->getDuration());
}
}