diff --git a/README.md b/README.md index d3fbf154..09071d29 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ -# This repo has been archived - - -#### Please go to https://github.com/scssphp/scssphp +# SCSS compiler written in PHP . Abandoned version. For legacy, internal purposes only. Needed for maintaining PHP 8.x support. ---- diff --git a/src/Node/Number.php b/src/Node/Number.php index 42c16803..7e26ffc6 100644 --- a/src/Node/Number.php +++ b/src/Node/Number.php @@ -138,6 +138,7 @@ public function normalize() /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { if ($offset === -3) { @@ -162,6 +163,7 @@ public function offsetExists($offset) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { switch ($offset) { @@ -188,6 +190,7 @@ public function offsetGet($offset) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if ($offset === 1) { @@ -206,6 +209,7 @@ public function offsetSet($offset, $value) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { if ($offset === 1) { @@ -226,6 +230,7 @@ public function offsetUnset($offset) * * @return boolean */ + #[\ReturnTypeWillChange] public function unitless() { return ! array_sum($this->units); @@ -236,6 +241,7 @@ public function unitless() * * @return string */ + #[\ReturnTypeWillChange] public function unitStr() { $numerators = []; @@ -263,6 +269,7 @@ public function unitStr() * * @return string */ + #[\ReturnTypeWillChange] public function output(Compiler $compiler = null) { $dimension = round($this->dimension, static::$precision); @@ -299,6 +306,7 @@ public function output(Compiler $compiler = null) /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function __toString() { return $this->output(); diff --git a/src/Parser.php b/src/Parser.php index c05e4ee8..51cb7de7 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -833,7 +833,7 @@ protected function peek($regex, &$out, $from = null) } $r = '/' . $regex . '/' . $this->patternModifiers; - $result = preg_match($r, $this->buffer, $out, null, $from); + $result = preg_match($r, $this->buffer, $out, 0, $from); return $result; } @@ -902,7 +902,7 @@ protected function match($regex, &$out, $eatWhitespace = null) { $r = '/' . $regex . '/' . $this->patternModifiers; - if (! preg_match($r, $this->buffer, $out, null, $this->count)) { + if (! preg_match($r, $this->buffer, $out, 0, $this->count)) { return false; } @@ -983,7 +983,7 @@ protected function whitespace() { $gotWhite = false; - while (preg_match(static::$whitePattern, $this->buffer, $m, null, $this->count)) { + while (preg_match(static::$whitePattern, $this->buffer, $m, 0, $this->count)) { if (isset($m[1]) && empty($this->commentsSeen[$this->count])) { // comment that are kept in the output CSS $comment = []; @@ -2219,7 +2219,7 @@ protected function propertyName(&$out) static::$whitePattern, $this->buffer, $m, - null, + 0, $this->count )) { if (! empty($m[0])) {