diff options
-rw-r--r-- | composer.lock | 12 | ||||
-rw-r--r-- | vendor/composer/installed.json | 14 | ||||
-rw-r--r-- | vendor/composer/installed.php | 10 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/DirectiveBlock.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/EachBlock.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/ElseifBlock.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/ForBlock.php | 5 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/IfBlock.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Block/MediaBlock.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Compiler.php | 42 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Parser.php | 98 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Type.php | 3 | ||||
-rw-r--r-- | vendor/scssphp/scssphp/src/Version.php | 2 |
13 files changed, 138 insertions, 63 deletions
diff --git a/composer.lock b/composer.lock index 005cefc88..b019b20c7 100644 --- a/composer.lock +++ b/composer.lock @@ -1740,16 +1740,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.12.1", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb" + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/394ed1e960138710a60d035c1a85d43d0bf0faeb", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520", + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520", "shasum": "" }, "require": { @@ -1814,9 +1814,9 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.12.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.13.0" }, - "time": "2024-01-13T12:36:40+00:00" + "time": "2024-08-17T21:02:11+00:00" }, { "name": "simplepie/simplepie", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 6fef247bf..d6d30f45b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1804,17 +1804,17 @@ }, { "name": "scssphp/scssphp", - "version": "v1.12.1", - "version_normalized": "1.12.1.0", + "version": "v1.13.0", + "version_normalized": "1.13.0.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb" + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/394ed1e960138710a60d035c1a85d43d0bf0faeb", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520", + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520", "shasum": "" }, "require": { @@ -1837,7 +1837,7 @@ "ext-iconv": "Can be used as fallback when ext-mbstring is not available", "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" }, - "time": "2024-01-13T12:36:40+00:00", + "time": "2024-08-17T21:02:11+00:00", "bin": [ "bin/pscss" ], @@ -1881,7 +1881,7 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.12.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.13.0" }, "install-path": "../scssphp/scssphp" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 08afaebaa..faf15ac9e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'zotlabs/hubzilla', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'c12ef4fbf4b2046e0af68b11e8fe5af2d335f32e', + 'reference' => '1c45030c583d8a165bac81e52eab5ee209e398b5', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -251,9 +251,9 @@ 'dev_requirement' => false, ), 'scssphp/scssphp' => array( - 'pretty_version' => 'v1.12.1', - 'version' => '1.12.1.0', - 'reference' => '394ed1e960138710a60d035c1a85d43d0bf0faeb', + 'pretty_version' => 'v1.13.0', + 'version' => '1.13.0.0', + 'reference' => '63d1157457e5554edf00b0c1fabab4c1511d2520', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), @@ -349,7 +349,7 @@ 'zotlabs/hubzilla' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'c12ef4fbf4b2046e0af68b11e8fe5af2d335f32e', + 'reference' => '1c45030c583d8a165bac81e52eab5ee209e398b5', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php b/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php index b1d3d1a81..22b346e9b 100644 --- a/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php +++ b/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,7 +27,7 @@ class DirectiveBlock extends Block public $name; /** - * @var string|array|null + * @var array|Number|null */ public $value; diff --git a/vendor/scssphp/scssphp/src/Block/EachBlock.php b/vendor/scssphp/scssphp/src/Block/EachBlock.php index b3289579d..1217994ea 100644 --- a/vendor/scssphp/scssphp/src/Block/EachBlock.php +++ b/vendor/scssphp/scssphp/src/Block/EachBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,7 +27,7 @@ class EachBlock extends Block public $vars = []; /** - * @var array + * @var array|Number */ public $list; diff --git a/vendor/scssphp/scssphp/src/Block/ElseifBlock.php b/vendor/scssphp/scssphp/src/Block/ElseifBlock.php index 4622bca79..f732c2d70 100644 --- a/vendor/scssphp/scssphp/src/Block/ElseifBlock.php +++ b/vendor/scssphp/scssphp/src/Block/ElseifBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class ElseifBlock extends Block { /** - * @var array + * @var array|Number */ public $cond; diff --git a/vendor/scssphp/scssphp/src/Block/ForBlock.php b/vendor/scssphp/scssphp/src/Block/ForBlock.php index a9cf6733b..962944111 100644 --- a/vendor/scssphp/scssphp/src/Block/ForBlock.php +++ b/vendor/scssphp/scssphp/src/Block/ForBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,12 +27,12 @@ class ForBlock extends Block public $var; /** - * @var array + * @var array|Number */ public $start; /** - * @var array + * @var array|Number */ public $end; diff --git a/vendor/scssphp/scssphp/src/Block/IfBlock.php b/vendor/scssphp/scssphp/src/Block/IfBlock.php index 9f21bf88a..659c7c274 100644 --- a/vendor/scssphp/scssphp/src/Block/IfBlock.php +++ b/vendor/scssphp/scssphp/src/Block/IfBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class IfBlock extends Block { /** - * @var array + * @var array|Number */ public $cond; diff --git a/vendor/scssphp/scssphp/src/Block/MediaBlock.php b/vendor/scssphp/scssphp/src/Block/MediaBlock.php index c49ee1b2b..ab975c74e 100644 --- a/vendor/scssphp/scssphp/src/Block/MediaBlock.php +++ b/vendor/scssphp/scssphp/src/Block/MediaBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class MediaBlock extends Block { /** - * @var string|array|null + * @var string|array|Number|null */ public $value; diff --git a/vendor/scssphp/scssphp/src/Compiler.php b/vendor/scssphp/scssphp/src/Compiler.php index d4e7c6896..d654ee6eb 100644 --- a/vendor/scssphp/scssphp/src/Compiler.php +++ b/vendor/scssphp/scssphp/src/Compiler.php @@ -140,13 +140,28 @@ class Compiler /** @deprecated */ public static $Infinity = [Type::T_KEYWORD, 'Infinity']; public static $null = [Type::T_NULL]; + /** + * @internal + */ public static $nullString = [Type::T_STRING, '', []]; + /** + * @internal + */ public static $defaultValue = [Type::T_KEYWORD, '']; + /** + * @internal + */ public static $selfSelector = [Type::T_SELF]; public static $emptyList = [Type::T_LIST, '', []]; public static $emptyMap = [Type::T_MAP, [], []]; public static $emptyString = [Type::T_STRING, '"', []]; + /** + * @internal + */ public static $with = [Type::T_KEYWORD, 'with']; + /** + * @internal + */ public static $without = [Type::T_KEYWORD, 'without']; private static $emptyArgumentList = [Type::T_LIST, '', [], []]; @@ -1656,6 +1671,7 @@ class Compiler $parser = $this->parserFactory(__METHOD__); if ($parser->parseValue($buffer, $reParsedWith)) { + \assert(\is_array($reParsedWith)); $withCondition = $reParsedWith; } } @@ -5702,10 +5718,36 @@ EOL; @trigger_error('Omitting the argument declaration when registering custom function is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', E_USER_DEPRECATED); } + if ($this->reflectCallable($callback)->getNumberOfRequiredParameters() > 1) { + @trigger_error('The second argument passed to the callback of custom functions is deprecated and won\'t be supported in ScssPhp 2.0 anymore. Register a callback accepting only 1 parameter instead.', E_USER_DEPRECATED); + } + $this->userFunctions[$this->normalizeName($name)] = [$callback, $argumentDeclaration]; } /** + * @return \ReflectionFunctionAbstract + */ + private function reflectCallable(callable $c) + { + if (\is_object($c) && !$c instanceof \Closure) { + $c = [$c, '__invoke']; + } + + if (\is_string($c) && false !== strpos($c, '::')) { + $c = explode('::', $c, 2); + } + + if (\is_array($c)) { + return new \ReflectionMethod($c[0], $c[1]); + } + + \assert(\is_string($c) || $c instanceof \Closure); + + return new \ReflectionFunction($c); + } + + /** * Unregister function * * @api diff --git a/vendor/scssphp/scssphp/src/Parser.php b/vendor/scssphp/scssphp/src/Parser.php index 2666a263c..e7cb2e8c1 100644 --- a/vendor/scssphp/scssphp/src/Parser.php +++ b/vendor/scssphp/scssphp/src/Parser.php @@ -310,8 +310,9 @@ class Parser * * @api * - * @param string $buffer - * @param string|array $out + * @param string $buffer + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -345,9 +346,9 @@ class Parser * * @api * - * @param string $buffer - * @param string|array $out - * @param bool $shouldValidate + * @param string $buffer + * @param array $out + * @param bool $shouldValidate * * @return bool */ @@ -1255,10 +1256,10 @@ class Parser /** * Assert a parsed part is plain CSS Valid * - * @param array|false $parsed + * @param array|Number|false $parsed * @param int $startPos * - * @return array + * @return array|Number * * @throws ParserException */ @@ -1288,10 +1289,10 @@ class Parser /** * Check a parsed element is plain CSS Valid * - * @param array $parsed + * @param array|Number|string $parsed * @param bool $allowExpression * - * @return array|false + * @return ($parsed is string ? string : ($parsed is Number ? Number : array|false)) */ protected function isPlainCssValidElement($parsed, $allowExpression = false) { @@ -1300,6 +1301,10 @@ class Parser return $parsed; } + if ($parsed instanceof Number) { + return $parsed; + } + if ( \in_array($parsed[0], [Type::T_FUNCTION, Type::T_FUNCTION_CALL]) && !\in_array($parsed[1], [ @@ -2094,8 +2099,9 @@ class Parser /** * Parse directive value list that considers $vars as keyword * - * @param array $out + * @param mixed $out * @param string|false $endChar + * @param-out array|Number $out * * @return bool * @@ -2158,7 +2164,8 @@ class Parser /** * Parse comma separated value list * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2176,10 +2183,11 @@ class Parser * Parse a function call, where externals () are part of the call * and not of the value list * - * @param array $out + * @param mixed $out * @param bool $mandatoryEnclos * @param null|string $charAfter * @param null|bool $eatWhiteSp + * @param-out array|Number $out * * @return bool */ @@ -2215,7 +2223,8 @@ class Parser /** * Parse space separated value list * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2227,10 +2236,11 @@ class Parser /** * Parse generic list * - * @param array $out + * @param mixed $out * @param string $parseItem The name of the method used to parse items * @param string $delim * @param bool $flatten + * @param-out ($flatten is false ? array : array|Number) $out * * @return bool */ @@ -2334,9 +2344,10 @@ class Parser /** * Parse expression * - * @param array $out + * @param mixed $out * @param bool $listOnly * @param bool $lookForExp + * @param-out array|Number $out * * @return bool * @@ -2401,10 +2412,11 @@ class Parser /** * Parse expression specifically checking for lists in parenthesis or brackets * - * @param array $out + * @param mixed $out * @param int $s * @param string $closingParen * @param string[] $allowedTypes + * @param-out array|Number $out * * @return bool * @@ -2463,10 +2475,10 @@ class Parser /** * Parse left-hand side of subexpression * - * @param array $lhs - * @param int $minP + * @param array|Number $lhs + * @param int $minP * - * @return array + * @return array|Number */ protected function expHelper($lhs, $minP) { @@ -2517,7 +2529,8 @@ class Parser /** * Parse value * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2725,7 +2738,8 @@ class Parser /** * Parse parenthesized value * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2797,7 +2811,8 @@ class Parser * Parse function call * * @param string $name - * @param array $func + * @param mixed $func + * @param-out array $func * * @return bool */ @@ -2900,7 +2915,8 @@ class Parser /** * Parse mixin/function definition argument list * - * @param array $out + * @param mixed $out + * @param-out list<array{string, array|Number|null, bool}> $out * * @return bool */ @@ -2962,7 +2978,8 @@ class Parser /** * Parse map * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -3004,7 +3021,8 @@ class Parser /** * Parse color * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -3030,7 +3048,8 @@ class Parser /** * Parse number with unit * - * @param array $unit + * @param mixed $unit + * @param-out Number $unit * * @return bool */ @@ -3236,11 +3255,12 @@ class Parser * Parse an unbounded string stopped by $end * * @param string $end - * @param array $out + * @param mixed $out * @param string $nestOpen * @param string $nestClose * @param bool $rtrim * @param string $disallow + * @param-out array $out * * @return bool */ @@ -3317,8 +3337,9 @@ class Parser /** * Parser interpolation * - * @param string|array $out - * @param bool $lookWhite save information about whitespace before and after + * @param mixed $out + * @param bool $lookWhite save information about whitespace before and after + * @param-out array $out * * @return bool */ @@ -3852,7 +3873,8 @@ class Parser /** * Parse a variable * - * @param array $out + * @param mixed $out + * @param-out array{Type::*, string} $out * * @return bool */ @@ -3881,9 +3903,10 @@ class Parser /** * Parse a keyword * - * @param string $word - * @param bool $eatWhitespace - * @param bool $inSelector + * @param mixed $word + * @param bool $eatWhitespace + * @param bool $inSelector + * @param-out string $word * * @return bool */ @@ -3999,7 +4022,8 @@ class Parser /** * Parse a url * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -4009,10 +4033,10 @@ class Parser $s = $this->count; if ( - ($this->string($out) || $this->spaceList($out)) && + ($this->string($inner) || $this->spaceList($inner)) && $this->matchChar(')') ) { - $out = [Type::T_STRING, '', ['url(', $out, ')']]; + $out = [Type::T_STRING, '', ['url(', $inner, ')']]; return true; } @@ -4055,7 +4079,7 @@ class Parser /** * Strip assignment flag from the list * - * @param array $value + * @param array|Number $value * * @return string[] */ diff --git a/vendor/scssphp/scssphp/src/Type.php b/vendor/scssphp/scssphp/src/Type.php index d43088785..2f8ab6506 100644 --- a/vendor/scssphp/scssphp/src/Type.php +++ b/vendor/scssphp/scssphp/src/Type.php @@ -95,6 +95,9 @@ class Type * @internal */ const T_FOR = 'for'; + /** + * @internal + */ const T_FUNCTION = 'function'; /** * @internal diff --git a/vendor/scssphp/scssphp/src/Version.php b/vendor/scssphp/scssphp/src/Version.php index 89bd59526..45fc9835c 100644 --- a/vendor/scssphp/scssphp/src/Version.php +++ b/vendor/scssphp/scssphp/src/Version.php @@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp; */ class Version { - const VERSION = '1.12.1'; + const VERSION = '1.13.0'; } |