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

@@ -4,12 +4,16 @@ namespace Sabberworm\CSS\Property;
use Sabberworm\CSS\Comment\Comment;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Position\Position;
use Sabberworm\CSS\Position\Positionable;
/**
* `CSSNamespace` represents an `@namespace` rule.
*/
class CSSNamespace implements AtRule
class CSSNamespace implements AtRule, Positionable
{
use Position;
/**
* @var string
*/
@@ -27,6 +31,8 @@ class CSSNamespace implements AtRule
/**
* @var array<array-key, Comment>
*
* @internal since 8.8.0
*/
protected $aComments;
@@ -39,20 +45,14 @@ class CSSNamespace implements AtRule
{
$this->mUrl = $mUrl;
$this->sPrefix = $sPrefix;
$this->iLineNo = $iLineNo;
$this->setPosition($iLineNo);
$this->aComments = [];
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @return string
*
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
*/
public function __toString()
{
@@ -60,9 +60,11 @@ class CSSNamespace implements AtRule
}
/**
* @param OutputFormat|null $oOutputFormat
*
* @return string
*/
public function render(OutputFormat $oOutputFormat)
public function render($oOutputFormat)
{
return '@namespace ' . ($this->sPrefix === null ? '' : $this->sPrefix . ' ')
. $this->mUrl->render($oOutputFormat) . ';';