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,16 +4,17 @@ namespace Sabberworm\CSS\Comment;
use Sabberworm\CSS\OutputFormat;
use Sabberworm\CSS\Renderable;
use Sabberworm\CSS\Position\Position;
use Sabberworm\CSS\Position\Positionable;
class Comment implements Renderable
class Comment implements Positionable, Renderable
{
/**
* @var int
*/
protected $iLineNo;
use Position;
/**
* @var string
*
* @internal since 8.8.0
*/
protected $sComment;
@@ -24,7 +25,7 @@ class Comment implements Renderable
public function __construct($sComment = '', $iLineNo = 0)
{
$this->sComment = $sComment;
$this->iLineNo = $iLineNo;
$this->setPosition($iLineNo);
}
/**
@@ -35,14 +36,6 @@ class Comment implements Renderable
return $this->sComment;
}
/**
* @return int
*/
public function getLineNo()
{
return $this->iLineNo;
}
/**
* @param string $sComment
*
@@ -55,6 +48,8 @@ class Comment implements Renderable
/**
* @return string
*
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
*/
public function __toString()
{
@@ -62,9 +57,11 @@ class Comment implements Renderable
}
/**
* @param OutputFormat|null $oOutputFormat
*
* @return string
*/
public function render(OutputFormat $oOutputFormat)
public function render($oOutputFormat)
{
return '/*' . $this->sComment . '*/';
}