From b4ae33c12ddefc1cfc203268a58f1c88200e60a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 26 Sep 2023 15:06:09 +0200 Subject: [PATCH] Update composer dependencies --- .../install/files/lib/system/api/bin/pscss | 5 ++- .../files/lib/system/api/composer.json | 2 +- .../files/lib/system/api/composer.lock | 30 ++++++++-------- .../lib/system/api/composer/installed.json | 30 ++++++++-------- .../lib/system/api/composer/installed.php | 12 +++---- .../system/api/psr/http-client/CHANGELOG.md | 8 +++++ .../system/api/psr/http-client/composer.json | 3 ++ .../system/api/scssphp/scssphp/composer.json | 2 +- .../api/scssphp/scssphp/src/Compiler.php | 34 ++++++++++++++----- .../system/api/scssphp/scssphp/src/Parser.php | 5 +++ .../api/scssphp/scssphp/src/Version.php | 2 +- 11 files changed, 82 insertions(+), 51 deletions(-) diff --git a/wcfsetup/install/files/lib/system/api/bin/pscss b/wcfsetup/install/files/lib/system/api/bin/pscss index 9743992aa5..e57bed8fcd 100644 --- a/wcfsetup/install/files/lib/system/api/bin/pscss +++ b/wcfsetup/install/files/lib/system/api/bin/pscss @@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) { (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) ) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss'); - exit(0); + return include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss'); } } -include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss'; +return include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss'; diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index 1b9e25e7ac..0a61bc2774 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -27,7 +27,7 @@ "psr/http-server-handler": "^1.0.2", "psr/http-server-middleware": "^1.0.2", "psr/log": "^3.0", - "scssphp/scssphp": "^1.11", + "scssphp/scssphp": "^1.11.1", "sebastian/diff": "^5.0.3", "symfony/polyfill-php82": "^1.28.0", "symfony/polyfill-php83": "^1.28", diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index eb5fbfa863..53bacda925 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7603e774da8e3f3475ec8d497eb28556", + "content-hash": "8ed824326be4ed2b68fdb8ea8258400a", "packages": [ { "name": "cuyz/valinor", @@ -1093,16 +1093,16 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -1139,9 +1139,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -1564,16 +1564,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.11.0", + "version": "v1.11.1", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "33749d12c2569bb24071f94e9af828662dabb068" + "reference": "ace2503684bab0dcc817d7614c8a54b865122414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/33749d12c2569bb24071f94e9af828662dabb068", - "reference": "33749d12c2569bb24071f94e9af828662dabb068", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/ace2503684bab0dcc817d7614c8a54b865122414", + "reference": "ace2503684bab0dcc817d7614c8a54b865122414", "shasum": "" }, "require": { @@ -1590,7 +1590,7 @@ "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.1", - "zurb/foundation": "~6.5" + "zurb/foundation": "~6.7.0" }, "suggest": { "ext-iconv": "Can be used as fallback when ext-mbstring is not available", @@ -1638,9 +1638,9 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.11.0" + "source": "https://github.com/scssphp/scssphp/tree/v1.11.1" }, - "time": "2022-09-02T21:24:55+00:00" + "time": "2023-09-24T13:38:17+00:00" }, { "name": "sebastian/diff", @@ -2127,5 +2127,5 @@ "php": "8.1.2", "ext-gd": "0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index a52b927a87..733270fc1e 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -1132,24 +1132,24 @@ }, { "name": "psr/http-client", - "version": "1.0.2", - "version_normalized": "1.0.2.0", + "version": "1.0.3", + "version_normalized": "1.0.3.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", "psr/http-message": "^1.0 || ^2.0" }, - "time": "2023-04-10T20:12:12+00:00", + "time": "2023-09-23T14:17:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -1181,7 +1181,7 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, "install-path": "../psr/http-client" }, @@ -1630,17 +1630,17 @@ }, { "name": "scssphp/scssphp", - "version": "v1.11.0", - "version_normalized": "1.11.0.0", + "version": "v1.11.1", + "version_normalized": "1.11.1.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "33749d12c2569bb24071f94e9af828662dabb068" + "reference": "ace2503684bab0dcc817d7614c8a54b865122414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/33749d12c2569bb24071f94e9af828662dabb068", - "reference": "33749d12c2569bb24071f94e9af828662dabb068", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/ace2503684bab0dcc817d7614c8a54b865122414", + "reference": "ace2503684bab0dcc817d7614c8a54b865122414", "shasum": "" }, "require": { @@ -1657,13 +1657,13 @@ "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.1", - "zurb/foundation": "~6.5" + "zurb/foundation": "~6.7.0" }, "suggest": { "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": "2022-09-02T21:24:55+00:00", + "time": "2023-09-24T13:38:17+00:00", "bin": [ "bin/pscss" ], @@ -1707,7 +1707,7 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.11.0" + "source": "https://github.com/scssphp/scssphp/tree/v1.11.1" }, "install-path": "../scssphp/scssphp" }, diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index 95ab7dd1e5..bc7a8f591d 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -161,9 +161,9 @@ 'dev_requirement' => false, ), 'psr/http-client' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31', + 'pretty_version' => '1.0.3', + 'version' => '1.0.3.0', + 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), @@ -262,9 +262,9 @@ 'dev_requirement' => false, ), 'scssphp/scssphp' => array( - 'pretty_version' => 'v1.11.0', - 'version' => '1.11.0.0', - 'reference' => '33749d12c2569bb24071f94e9af828662dabb068', + 'pretty_version' => 'v1.11.1', + 'version' => '1.11.1.0', + 'reference' => 'ace2503684bab0dcc817d7614c8a54b865122414', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), diff --git a/wcfsetup/install/files/lib/system/api/psr/http-client/CHANGELOG.md b/wcfsetup/install/files/lib/system/api/psr/http-client/CHANGELOG.md index e2dc25f519..babba7c7b2 100644 --- a/wcfsetup/install/files/lib/system/api/psr/http-client/CHANGELOG.md +++ b/wcfsetup/install/files/lib/system/api/psr/http-client/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 1.0.3 + +Add `source` link in composer.json. No code changes. + +## 1.0.2 + +Allow PSR-7 (psr/http-message) 2.0. No code changes. + ## 1.0.1 Allow installation with PHP 8. No code changes. diff --git a/wcfsetup/install/files/lib/system/api/psr/http-client/composer.json b/wcfsetup/install/files/lib/system/api/psr/http-client/composer.json index e4cab2f3ea..6fed350beb 100644 --- a/wcfsetup/install/files/lib/system/api/psr/http-client/composer.json +++ b/wcfsetup/install/files/lib/system/api/psr/http-client/composer.json @@ -10,6 +10,9 @@ "homepage": "https://www.php-fig.org/" } ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, "require": { "php": "^7.0 || ^8.0", "psr/http-message": "^1.0 || ^2.0" diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json index f81203dd7a..d17ffb9242 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json @@ -43,7 +43,7 @@ "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.1", - "zurb/foundation": "~6.5" + "zurb/foundation": "~6.7.0" }, "repositories": [ { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler.php index ecafc8cb95..c534c0a909 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler.php @@ -1508,6 +1508,7 @@ class Compiler // start from the root while ($scope->parent && $scope->parent->type !== Type::T_ROOT) { array_unshift($childStash, $scope); + \assert($scope->parent !== null); $scope = $scope->parent; } @@ -2090,6 +2091,11 @@ class Compiler foreach ($selector as $node) { $compound = ''; + if (!is_array($node)) { + $output[] = $node; + continue; + } + array_walk_recursive( $node, function ($value, $key) use (&$compound) { @@ -2124,12 +2130,16 @@ class Compiler foreach ($selector as $node) { $compound = ''; - array_walk_recursive( - $node, - function ($value, $key) use (&$compound) { - $compound .= $value; - } - ); + if (!is_array($node)) { + $compound .= $node; + } else { + array_walk_recursive( + $node, + function ($value, $key) use (&$compound) { + $compound .= $value; + } + ); + } if ($this->isImmediateRelationshipCombinator($compound)) { if (\count($output)) { @@ -2885,7 +2895,7 @@ class Compiler { if (isset($child[Parser::SOURCE_LINE])) { $this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null; - $this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1; + $this->sourceLine = $child[Parser::SOURCE_LINE]; $this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1; } elseif (\is_array($child) && isset($child[1]->sourceLine) && $child[1] instanceof Block) { $this->sourceIndex = $child[1]->sourceIndex; @@ -4529,8 +4539,10 @@ EOL; return $colorName; } - if (is_numeric($alpha)) { + if (\is_int($alpha) || \is_float($alpha)) { $a = new Number($alpha, ''); + } elseif (is_numeric($alpha)) { + $a = new Number((float) $alpha, ''); } else { $a = $alpha; } @@ -6984,10 +6996,14 @@ EOL; return static::$null; } - if (is_numeric($value)) { + if (\is_int($value) || \is_float($value)) { return new Number($value, ''); } + if (is_numeric($value)) { + return new Number((float) $value, ''); + } + if ($value === '') { return static::$emptyString; } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Parser.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Parser.php index 1c76e7c6b0..c5888f56aa 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Parser.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Parser.php @@ -273,6 +273,11 @@ class Parser $this->saveEncoding(); $this->extractLineNumbers($buffer); + if ($this->utf8 && !preg_match('//u', $buffer)) { + $message = $this->sourceName ? 'Invalid UTF-8 file: ' . $this->sourceName : 'Invalid UTF-8 file'; + throw new ParserException($message); + } + $this->pushBlock(null); // root block $this->whitespace(); $this->pushBlock(null); diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Version.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Version.php index d604a50576..15c682d3d7 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Version.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Version.php @@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp; */ class Version { - const VERSION = '1.11.0'; + const VERSION = '1.11.1'; } -- 2.20.1