From 96d3878a72f49745c27c30e7990f6bfe0591cbc7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 10 Jan 2022 10:51:21 +0100 Subject: [PATCH] Update composer dependencies --- .../files/lib/system/api/composer.lock | 57 ++-- .../system/api/composer/autoload_classmap.php | 12 + .../system/api/composer/autoload_static.php | 12 + .../lib/system/api/composer/installed.json | 67 ++-- .../lib/system/api/composer/installed.php | 28 +- .../lib/system/api/scssphp/scssphp/bin/pscss | 4 +- .../system/api/scssphp/scssphp/composer.json | 23 +- .../api/scssphp/scssphp/src/Base/Range.php | 8 +- .../system/api/scssphp/scssphp/src/Block.php | 12 +- .../scssphp/scssphp/src/Block/AtRootBlock.php | 37 +++ .../scssphp/src/Block/CallableBlock.php | 45 +++ .../scssphp/src/Block/ContentBlock.php | 38 +++ .../scssphp/src/Block/DirectiveBlock.php | 37 +++ .../scssphp/scssphp/src/Block/EachBlock.php | 37 +++ .../scssphp/scssphp/src/Block/ElseBlock.php | 27 ++ .../scssphp/scssphp/src/Block/ElseifBlock.php | 32 ++ .../scssphp/scssphp/src/Block/ForBlock.php | 47 +++ .../api/scssphp/scssphp/src/Block/IfBlock.php | 37 +++ .../scssphp/scssphp/src/Block/MediaBlock.php | 37 +++ .../scssphp/src/Block/NestedPropertyBlock.php | 37 +++ .../scssphp/scssphp/src/Block/WhileBlock.php | 32 ++ .../system/api/scssphp/scssphp/src/Colors.php | 8 +- .../api/scssphp/scssphp/src/Compiler.php | 297 +++++++++++------- .../scssphp/src/Compiler/Environment.php | 22 +- .../api/scssphp/scssphp/src/Formatter.php | 10 +- .../scssphp/src/Formatter/Compressed.php | 2 - .../scssphp/scssphp/src/Formatter/Nested.php | 4 +- .../scssphp/src/Formatter/OutputBlock.php | 6 +- .../system/api/scssphp/scssphp/src/Node.php | 2 +- .../api/scssphp/scssphp/src/Node/Number.php | 16 +- .../system/api/scssphp/scssphp/src/Parser.php | 288 ++++++++++------- .../scssphp/scssphp/src/SourceMap/Base64.php | 4 +- .../scssphp/src/SourceMap/Base64VLQ.php | 14 +- .../src/SourceMap/SourceMapGenerator.php | 16 +- .../system/api/scssphp/scssphp/src/Type.php | 138 +++++++- .../system/api/scssphp/scssphp/src/Util.php | 2 +- .../api/scssphp/scssphp/src/Version.php | 2 +- .../symfony/polyfill-mbstring/Mbstring.php | 5 +- .../symfony/polyfill-mbstring/composer.json | 3 + .../Resources/stubs/JsonException.php | 6 +- .../Resources/stubs/UnhandledMatchError.php | 6 +- .../Resources/stubs/ValueError.php | 6 +- 42 files changed, 1147 insertions(+), 376 deletions(-) create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php create mode 100644 wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index 9a530479ee..1379737bcf 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -1406,16 +1406,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd" + "reference": "9699a52a862da4efb43985943afa17150155dd3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd", - "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d", + "reference": "9699a52a862da4efb43985943afa17150155dd3d", "shasum": "" }, "require": { @@ -1431,7 +1431,7 @@ "symfony/phpunit-bridge": "^5.1", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", - "twbs/bootstrap4": "4.6.0", + "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.5" }, "suggest": { @@ -1474,9 +1474,9 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.9.0" + "source": "https://github.com/scssphp/scssphp/tree/v1.10.0" }, - "time": "2021-12-13T11:55:16+00:00" + "time": "2022-01-06T18:16:18+00:00" }, { "name": "symfony/css-selector", @@ -1613,21 +1613,24 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -1673,7 +1676,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -1689,20 +1692,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", "shasum": "" }, "require": { @@ -1752,7 +1755,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" }, "funding": [ { @@ -1768,11 +1771,11 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-06-05T21:20:04+00:00" }, { "name": "symfony/polyfill-php74", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php74.git", @@ -1832,7 +1835,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php74/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php74/tree/v1.24.0" }, "funding": [ { @@ -1852,16 +1855,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { @@ -1915,7 +1918,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { @@ -1931,7 +1934,7 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2021-09-13T13:58:33+00:00" }, { "name": "true/punycode", diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php index 7c0e65e17d..355cc9f427 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php @@ -535,6 +535,18 @@ return array( 'Sabberworm\\CSS\\Value\\ValueList' => $vendorDir . '/sabberworm/php-css-parser/src/Value/ValueList.php', 'ScssPhp\\ScssPhp\\Base\\Range' => $vendorDir . '/scssphp/scssphp/src/Base/Range.php', 'ScssPhp\\ScssPhp\\Block' => $vendorDir . '/scssphp/scssphp/src/Block.php', + 'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => $vendorDir . '/scssphp/scssphp/src/Block/AtRootBlock.php', + 'ScssPhp\\ScssPhp\\Block\\CallableBlock' => $vendorDir . '/scssphp/scssphp/src/Block/CallableBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ContentBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ContentBlock.php', + 'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => $vendorDir . '/scssphp/scssphp/src/Block/DirectiveBlock.php', + 'ScssPhp\\ScssPhp\\Block\\EachBlock' => $vendorDir . '/scssphp/scssphp/src/Block/EachBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ElseBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseifBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ForBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ForBlock.php', + 'ScssPhp\\ScssPhp\\Block\\IfBlock' => $vendorDir . '/scssphp/scssphp/src/Block/IfBlock.php', + 'ScssPhp\\ScssPhp\\Block\\MediaBlock' => $vendorDir . '/scssphp/scssphp/src/Block/MediaBlock.php', + 'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => $vendorDir . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php', + 'ScssPhp\\ScssPhp\\Block\\WhileBlock' => $vendorDir . '/scssphp/scssphp/src/Block/WhileBlock.php', 'ScssPhp\\ScssPhp\\Cache' => $vendorDir . '/scssphp/scssphp/src/Cache.php', 'ScssPhp\\ScssPhp\\Colors' => $vendorDir . '/scssphp/scssphp/src/Colors.php', 'ScssPhp\\ScssPhp\\CompilationResult' => $vendorDir . '/scssphp/scssphp/src/CompilationResult.php', diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_static.php b/wcfsetup/install/files/lib/system/api/composer/autoload_static.php index 7e2f5c6eef..712f49f3a9 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_static.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_static.php @@ -716,6 +716,18 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d 'Sabberworm\\CSS\\Value\\ValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/ValueList.php', 'ScssPhp\\ScssPhp\\Base\\Range' => __DIR__ . '/..' . '/scssphp/scssphp/src/Base/Range.php', 'ScssPhp\\ScssPhp\\Block' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block.php', + 'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/AtRootBlock.php', + 'ScssPhp\\ScssPhp\\Block\\CallableBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/CallableBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ContentBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ContentBlock.php', + 'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/DirectiveBlock.php', + 'ScssPhp\\ScssPhp\\Block\\EachBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/EachBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ElseBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseifBlock.php', + 'ScssPhp\\ScssPhp\\Block\\ForBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ForBlock.php', + 'ScssPhp\\ScssPhp\\Block\\IfBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/IfBlock.php', + 'ScssPhp\\ScssPhp\\Block\\MediaBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/MediaBlock.php', + 'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php', + 'ScssPhp\\ScssPhp\\Block\\WhileBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/WhileBlock.php', 'ScssPhp\\ScssPhp\\Cache' => __DIR__ . '/..' . '/scssphp/scssphp/src/Cache.php', 'ScssPhp\\ScssPhp\\Colors' => __DIR__ . '/..' . '/scssphp/scssphp/src/Colors.php', 'ScssPhp\\ScssPhp\\CompilationResult' => __DIR__ . '/..' . '/scssphp/scssphp/src/CompilationResult.php', diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 03182fc2c4..d61ac062de 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -1437,17 +1437,17 @@ }, { "name": "scssphp/scssphp", - "version": "v1.9.0", - "version_normalized": "1.9.0.0", + "version": "v1.10.0", + "version_normalized": "1.10.0.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd" + "reference": "9699a52a862da4efb43985943afa17150155dd3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd", - "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d", + "reference": "9699a52a862da4efb43985943afa17150155dd3d", "shasum": "" }, "require": { @@ -1463,14 +1463,14 @@ "symfony/phpunit-bridge": "^5.1", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", - "twbs/bootstrap4": "4.6.0", + "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.5" }, "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": "2021-12-13T11:55:16+00:00", + "time": "2022-01-06T18:16:18+00:00", "bin": [ "bin/pscss" ], @@ -1508,7 +1508,7 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.9.0" + "source": "https://github.com/scssphp/scssphp/tree/v1.10.0" }, "install-path": "../scssphp/scssphp" }, @@ -1653,26 +1653,29 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, - "time": "2021-05-27T12:26:48+00:00", + "time": "2021-11-30T18:21:41+00:00", "type": "library", "extra": { "branch-alias": { @@ -1716,7 +1719,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -1736,23 +1739,23 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", - "version_normalized": "1.23.0.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-02-19T12:13:01+00:00", + "time": "2021-06-05T21:20:04+00:00", "type": "library", "extra": { "branch-alias": { @@ -1798,7 +1801,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" }, "funding": [ { @@ -1818,8 +1821,8 @@ }, { "name": "symfony/polyfill-php74", - "version": "v1.23.0", - "version_normalized": "1.23.0.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php74.git", @@ -1881,7 +1884,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php74/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php74/tree/v1.24.0" }, "funding": [ { @@ -1901,23 +1904,23 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-07-28T13:41:28+00:00", + "time": "2021-09-13T13:58:33+00:00", "type": "library", "extra": { "branch-alias": { @@ -1967,7 +1970,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index 3437204967..7357598f68 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -227,12 +227,12 @@ 'dev_requirement' => false, ), 'scssphp/scssphp' => array( - 'pretty_version' => 'v1.9.0', - 'version' => '1.9.0.0', + 'pretty_version' => 'v1.10.0', + 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), - 'reference' => 'bc8bece4e5e176973a832f3763049ddbba16e6fd', + 'reference' => '9699a52a862da4efb43985943afa17150155dd3d', 'dev_requirement' => false, ), 'symfony/css-selector' => array( @@ -254,26 +254,26 @@ 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.23.1', - 'version' => '1.23.1.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), - 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', + 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', 'dev_requirement' => false, ), 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), - 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', + 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5', 'dev_requirement' => false, ), 'symfony/polyfill-php74' => array( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php74', 'aliases' => array(), @@ -281,12 +281,12 @@ 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.23.1', - 'version' => '1.23.1.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), - 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', + 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9', 'dev_requirement' => false, ), 'true/punycode' => array( diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/bin/pscss b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/bin/pscss index e62239830f..0f009d6bdb 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/bin/pscss +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/bin/pscss @@ -38,8 +38,8 @@ $embedSourceMap = false; /** * Parse argument * - * @param integer $i - * @param array $options + * @param int $i + * @param string[] $options * * @return string|null */ 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 86cd396bf7..a8cb2d4f61 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json @@ -42,7 +42,7 @@ "symfony/phpunit-bridge": "^5.1", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", - "twbs/bootstrap4": "4.6.0", + "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.5" }, "repositories": [ @@ -50,16 +50,16 @@ "type": "package", "package": { "name": "sass/sass-spec", - "version": "2021.09.15", + "version": "2021.11.30", "source": { "type": "git", "url": "https://github.com/sass/sass-spec.git", - "reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955" + "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sass/sass-spec/zipball/eb2d7a0865c1faf0b55a39ff962b24aca9b4c955", - "reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955", + "url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a", + "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a", "shasum": "" } } @@ -86,16 +86,16 @@ "type": "package", "package": { "name": "twbs/bootstrap4", - "version": "v4.6.0", + "version": "v4.6.1", "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2" + "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/6ffb0b48e455430f8a5359ed689ad64c1143fac2", - "reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10", + "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10", "shasum": "" } } @@ -103,6 +103,9 @@ ], "bin": ["bin/pscss"], "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } } } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Base/Range.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Base/Range.php index 0c5f584096..31d5ec565d 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Base/Range.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Base/Range.php @@ -34,8 +34,8 @@ class Range /** * Initialize range * - * @param integer|float $first - * @param integer|float $last + * @param int|float $first + * @param int|float $last */ public function __construct($first, $last) { @@ -46,9 +46,9 @@ class Range /** * Test for inclusion in range * - * @param integer|float $value + * @param int|float $value * - * @return boolean + * @return bool */ public function includes($value) { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block.php index 3ae49d00c9..96668dc668 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block.php @@ -22,12 +22,12 @@ namespace ScssPhp\ScssPhp; class Block { /** - * @var string + * @var string|null */ public $type; /** - * @var \ScssPhp\ScssPhp\Block + * @var Block|null */ public $parent; @@ -37,17 +37,17 @@ class Block public $sourceName; /** - * @var integer + * @var int */ public $sourceIndex; /** - * @var integer + * @var int */ public $sourceLine; /** - * @var integer + * @var int */ public $sourceColumn; @@ -67,7 +67,7 @@ class Block public $children; /** - * @var \ScssPhp\ScssPhp\Block|null + * @var Block|null */ public $selfParent; } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php new file mode 100644 index 0000000000..41842c2692 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php @@ -0,0 +1,37 @@ +type = Type::T_AT_ROOT; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php new file mode 100644 index 0000000000..a18a87c2ad --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php @@ -0,0 +1,45 @@ +type = $type; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php new file mode 100644 index 0000000000..8708498003 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php @@ -0,0 +1,38 @@ +type = Type::T_INCLUDE; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php new file mode 100644 index 0000000000..b1d3d1a816 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php @@ -0,0 +1,37 @@ +type = Type::T_DIRECTIVE; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php new file mode 100644 index 0000000000..b3289579db --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php @@ -0,0 +1,37 @@ +type = Type::T_EACH; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php new file mode 100644 index 0000000000..6abb4d775a --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php @@ -0,0 +1,27 @@ +type = Type::T_ELSE; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php new file mode 100644 index 0000000000..4622bca796 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php @@ -0,0 +1,32 @@ +type = Type::T_ELSEIF; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php new file mode 100644 index 0000000000..a9cf6733ba --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php @@ -0,0 +1,47 @@ +type = Type::T_FOR; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php new file mode 100644 index 0000000000..9f21bf88ac --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php @@ -0,0 +1,37 @@ + + */ + public $cases = []; + + public function __construct() + { + $this->type = Type::T_IF; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php new file mode 100644 index 0000000000..c49ee1b2bf --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php @@ -0,0 +1,37 @@ +type = Type::T_MEDIA; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php new file mode 100644 index 0000000000..1ea4a6c8aa --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php @@ -0,0 +1,37 @@ +type = Type::T_NESTED_PROPERTY; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php new file mode 100644 index 0000000000..ac18d4e02b --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php @@ -0,0 +1,32 @@ +type = Type::T_WHILE; + } +} diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Colors.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Colors.php index e836e3f4e4..2df39992bb 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Colors.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Colors.php @@ -204,10 +204,10 @@ class Colors /** * Reverse conversion : from RGBA to a color name if possible * - * @param integer $r - * @param integer $g - * @param integer $b - * @param integer|float $a + * @param int $r + * @param int $g + * @param int $b + * @param int|float $a * * @return string|null */ 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 d17d9f261e..b6ef02727a 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 @@ -13,6 +13,17 @@ namespace ScssPhp\ScssPhp; use ScssPhp\ScssPhp\Base\Range; +use ScssPhp\ScssPhp\Block\AtRootBlock; +use ScssPhp\ScssPhp\Block\CallableBlock; +use ScssPhp\ScssPhp\Block\DirectiveBlock; +use ScssPhp\ScssPhp\Block\EachBlock; +use ScssPhp\ScssPhp\Block\ElseBlock; +use ScssPhp\ScssPhp\Block\ElseifBlock; +use ScssPhp\ScssPhp\Block\ForBlock; +use ScssPhp\ScssPhp\Block\IfBlock; +use ScssPhp\ScssPhp\Block\MediaBlock; +use ScssPhp\ScssPhp\Block\NestedPropertyBlock; +use ScssPhp\ScssPhp\Block\WhileBlock; use ScssPhp\ScssPhp\Compiler\CachedResult; use ScssPhp\ScssPhp\Compiler\Environment; use ScssPhp\ScssPhp\Exception\CompilerException; @@ -644,7 +655,7 @@ class Compiler * @param array $target * @param array $origin * - * @return boolean + * @return bool */ protected function isSelfExtend($target, $origin) { @@ -853,10 +864,10 @@ class Compiler /** * Match extends * - * @param array $selector - * @param array $out - * @param integer $from - * @param boolean $initial + * @param array $selector + * @param array $out + * @param int $from + * @param bool $initial * * @return void */ @@ -989,7 +1000,7 @@ class Compiler * @param string $part * @param array $matches * - * @return boolean + * @return bool */ protected function isPseudoSelector($part, &$matches) { @@ -1051,11 +1062,11 @@ class Compiler /** * Match extends single * - * @param array $rawSingle - * @param array $outOrigin - * @param boolean $initial + * @param array $rawSingle + * @param array $outOrigin + * @param bool $initial * - * @return boolean + * @return bool */ protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true) { @@ -1270,6 +1281,7 @@ class Compiler */ protected function compileMedia(Block $media) { + assert($media instanceof MediaBlock); $this->pushEnv($media); $mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env)); @@ -1347,7 +1359,7 @@ class Compiler /** * Compile directive * - * @param \ScssPhp\ScssPhp\Block|array $directive + * @param DirectiveBlock|array $directive * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out * * @return void @@ -1413,6 +1425,7 @@ class Compiler */ protected function compileAtRoot(Block $block) { + assert($block instanceof AtRootBlock); $env = $this->pushEnv($block); $envs = $this->compactEnv($env); list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null); @@ -1461,7 +1474,7 @@ class Compiler } /** - * Filter at-root scope depending of with/without option + * Filter at-root scope depending on with/without option * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope * @param array $with @@ -1561,7 +1574,7 @@ class Compiler * Find a selector by the depth node in the scope * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope - * @param integer $depth + * @param int $depth * * @return array */ @@ -1585,7 +1598,7 @@ class Compiler /** * Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later * - * @param array $withCondition + * @param array|null $withCondition * * @return array * @@ -1674,7 +1687,7 @@ class Compiler * @param array $with * @param array $without * - * @return boolean + * @return bool */ protected function isWith($block, $with, $without) { @@ -1684,6 +1697,7 @@ class Compiler } if ($block->type === Type::T_DIRECTIVE) { + assert($block instanceof DirectiveBlock || $block instanceof OutputBlock); if (isset($block->name)) { return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without); } elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) { @@ -1719,7 +1733,7 @@ class Compiler * @param array $with * @param array $without * - * @return boolean + * @return bool * true if the block should be kept, false to reject */ protected function testWithWithout($what, $with, $without) @@ -1774,6 +1788,7 @@ class Compiler */ protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) { + assert($block instanceof NestedPropertyBlock); $prefix = $this->compileValue($block->prefix) . '-'; $nested = $this->makeOutputBlock($block->type); @@ -1792,6 +1807,7 @@ class Compiler break; case Type::T_NESTED_PROPERTY: + assert($child[1] instanceof NestedPropertyBlock); array_unshift($child[1]->prefix[2], $prefix); break; } @@ -1817,7 +1833,7 @@ class Compiler // wrap assign children in a block // except for @font-face - if ($block->type !== Type::T_DIRECTIVE || $this->compileDirectiveName($block->name) !== 'font-face') { + if (!$block instanceof DirectiveBlock || $this->compileDirectiveName($block->name) !== 'font-face') { // need wrapping? $needWrapping = false; @@ -1906,8 +1922,8 @@ class Compiler /** * Compile the value of a comment that can have interpolation * - * @param array $value - * @param boolean $pushEnv + * @param array $value + * @param bool $pushEnv * * @return string */ @@ -2224,7 +2240,7 @@ class Compiler * * @param array $selector * - * @return boolean + * @return bool */ protected function hasSelectorPlaceholder($selector) { @@ -2641,9 +2657,9 @@ class Compiler * * @param array $rawPath * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out - * @param boolean $once + * @param bool $once * - * @return boolean + * @return bool */ protected function compileImport($rawPath, OutputBlock $out, $once = false) { @@ -2778,7 +2794,7 @@ class Compiler // insert the directive as a comment $child = $this->makeOutputBlock(Type::T_COMMENT); $child->lines[] = $line; - $child->sourceName = $this->sourceNames[$this->sourceIndex]; + $child->sourceName = $this->sourceNames[$this->sourceIndex] ?: '(stdin)'; $child->sourceLine = $this->sourceLine; $child->sourceColumn = $this->sourceColumn; @@ -3049,6 +3065,7 @@ class Compiler case Type::T_MIXIN: case Type::T_FUNCTION: list(, $block) = $child; + assert($block instanceof CallableBlock); // the block need to be able to go up to it's parent env to resolve vars $block->parentEnv = $this->getStoreEnv(); $this->set(static::$namespaces[$block->type] . $block->name, $block, true); @@ -3099,6 +3116,7 @@ EOL; case Type::T_IF: list(, $if) = $child; + assert($if instanceof IfBlock); if ($this->isTruthy($this->reduce($if->cond, true))) { return $this->compileChildren($if->children, $out); @@ -3106,8 +3124,8 @@ EOL; foreach ($if->cases as $case) { if ( - $case->type === Type::T_ELSE || - $case->type === Type::T_ELSEIF && $this->isTruthy($this->reduce($case->cond)) + $case instanceof ElseBlock || + $case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond)) ) { return $this->compileChildren($case->children, $out); } @@ -3116,6 +3134,7 @@ EOL; case Type::T_EACH: list(, $each) = $child; + assert($each instanceof EachBlock); $list = $this->coerceList($this->reduce($each->list), ',', true); @@ -3150,6 +3169,7 @@ EOL; case Type::T_WHILE: list(, $while) = $child; + assert($while instanceof WhileBlock); while ($this->isTruthy($this->reduce($while->cond, true))) { $ret = $this->compileChildren($while->children, $out); @@ -3162,6 +3182,7 @@ EOL; case Type::T_FOR: list(, $for) = $child; + assert($for instanceof ForBlock); $startNumber = $this->assertNumber($this->reduce($for->start, true)); $endNumber = $this->assertNumber($this->reduce($for->end, true)); @@ -3222,6 +3243,8 @@ EOL; throw $this->error("Undefined mixin $name"); } + assert($mixin instanceof CallableBlock); + $callingScope = $this->getStoreEnv(); // push scope, apply args @@ -3394,7 +3417,7 @@ EOL; * * @param array|Number $value * - * @return boolean + * @return bool */ public function isTruthy($value) { @@ -3406,7 +3429,7 @@ EOL; * * @param string $value * - * @return boolean + * @return bool */ protected function isImmediateRelationshipCombinator($value) { @@ -3418,7 +3441,7 @@ EOL; * * @param array $value * - * @return boolean + * @return bool */ protected function shouldEval($value) { @@ -3441,7 +3464,7 @@ EOL; * Reduce value * * @param array|Number $value - * @param boolean $inExp + * @param bool $inExp * * @return array|Number */ @@ -3946,6 +3969,10 @@ EOL; unset($value['enclosing']); } + if ($value[1] === '' && count($value[2]) > 1) { + $value[1] = ' '; + } + return $value; case Type::T_STRING: @@ -4061,8 +4088,8 @@ EOL; * Boolean and * * @param array|Number $left - * @param array|Number $right - * @param boolean $shouldEval + * @param array|Number $right + * @param bool $shouldEval * * @return array|Number|null */ @@ -4090,7 +4117,7 @@ EOL; * * @param array|Number $left * @param array|Number $right - * @param boolean $shouldEval + * @param bool $shouldEval * * @return array|Number|null */ @@ -4516,8 +4543,7 @@ EOL; // force double quote as string quote for the output in certain cases if ( $value[1] === "'" && - (strpos($content, '"') === false or strpos($content, "'") !== false) && - strpbrk($content, '{}\\\'') !== false + (strpos($content, '"') === false or strpos($content, "'") !== false) ) { $value[1] = '"'; } elseif ( @@ -4570,6 +4596,8 @@ EOL; } } + $separator = $delim === '/' ? ' /' : $delim; + $prefix_value = ''; if ($delim !== ' ') { @@ -4608,7 +4636,7 @@ EOL; $filtered[] = $compiled; } - return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post; + return $pre . substr(implode($separator, $filtered), \strlen($prefix_value)) . $post; case Type::T_MAP: $keys = $value[1]; @@ -4880,10 +4908,10 @@ EOL; /** * Join selectors; looks for & to replace, or append parent before child * - * @param array $parent - * @param array $child - * @param boolean $stillHasSelf - * @param array $selfParentSelectors + * @param array $parent + * @param array $child + * @param bool $stillHasSelf + * @param array $selfParentSelectors * @return array */ @@ -4961,6 +4989,8 @@ EOL; return $this->multiplyMedia($env->parent, $childQueries); } + assert($env->block instanceof MediaBlock); + $parentQueries = isset($env->block->queryList) ? $env->block->queryList : [[[Type::T_MEDIA_VALUE, $env->block->value]]]; @@ -5095,7 +5125,7 @@ EOL; * * @param string $name * @param mixed $value - * @param boolean $shadow + * @param bool $shadow * @param \ScssPhp\ScssPhp\Compiler\Environment $env * @param mixed $valueUnreduced * @@ -5201,9 +5231,9 @@ EOL; * @internal * * @param string $name - * @param boolean $shouldThrow + * @param bool $shouldThrow * @param \ScssPhp\ScssPhp\Compiler\Environment $env - * @param boolean $unreduced + * @param bool $unreduced * * @return mixed|null */ @@ -5270,7 +5300,7 @@ EOL; * @param string $name * @param \ScssPhp\ScssPhp\Compiler\Environment $env * - * @return boolean + * @return bool */ protected function has($name, Environment $env = null) { @@ -5460,7 +5490,7 @@ EOL; * * @api * - * @param integer $numberPrecision + * @param int $numberPrecision * * @return void * @@ -5561,7 +5591,7 @@ EOL; * * @api * - * @param integer $sourceMap + * @param int $sourceMap * * @return void * @@ -5963,7 +5993,7 @@ EOL; * * @api * - * @param boolean $ignoreErrors + * @param bool $ignoreErrors * * @return \ScssPhp\ScssPhp\Compiler * @@ -6102,7 +6132,7 @@ EOL; /** * Beautify call stack for output * - * @param boolean $all + * @param bool $all * @param int|null $limit * * @return string @@ -6162,8 +6192,8 @@ EOL; /** * Call SCSS @function * - * @param Object $func - * @param array $argValues + * @param CallableBlock|null $func + * @param array $argValues * * @return array|Number */ @@ -6737,9 +6767,8 @@ EOL; * * @param array[] $argDef * @param array|null $argValues - * @param boolean $storeInEnv - * @param boolean $reduce - * only used if $storeInEnv = false + * @param bool $storeInEnv + * @param bool $reduce only used if $storeInEnv = false * * @return array * @@ -6983,14 +7012,14 @@ EOL; * * @param array|Number $item * @param string $delim - * @param boolean $removeTrailingNull + * @param bool $removeTrailingNull * * @return array */ protected function coerceList($item, $delim = ',', $removeTrailingNull = false) { if ($item instanceof Number) { - return [Type::T_LIST, $delim, [$item]]; + return [Type::T_LIST, '', [$item]]; } if ($item[0] === Type::T_LIST) { @@ -7013,15 +7042,15 @@ EOL; $list[] = [ Type::T_LIST, - '', + ' ', [$key, $value] ]; } - return [Type::T_LIST, ',', $list]; + return [Type::T_LIST, $list ? ',' : '', $list]; } - return [Type::T_LIST, $delim, [$item]]; + return [Type::T_LIST, '', [$item]]; } /** @@ -7162,10 +7191,10 @@ EOL; } /** - * @param integer|Number $value - * @param boolean $isAlpha + * @param int|Number $value + * @param bool $isAlpha * - * @return integer|mixed + * @return int|mixed */ protected function compileRGBAValue($value, $isAlpha = false) { @@ -7177,12 +7206,12 @@ EOL; } /** - * @param mixed $value - * @param integer|float $min - * @param integer|float $max - * @param boolean $isInt + * @param mixed $value + * @param int|float $min + * @param int|float $max + * @param bool $isInt * - * @return integer|mixed + * @return int|mixed */ protected function compileColorPartValue($value, $min, $max, $isInt = true) { @@ -7276,7 +7305,7 @@ EOL; * * @param array|Number $value * - * @return integer|float + * @return int|float * * @deprecated */ @@ -7414,7 +7443,7 @@ EOL; * @param array|Number $value * @param string|null $varName * - * @return integer + * @return int * * @throws SassScriptException */ @@ -7478,9 +7507,9 @@ EOL; * * @internal * - * @param integer $red - * @param integer $green - * @param integer $blue + * @param int $red + * @param int $green + * @param int $blue * * @return array */ @@ -7584,9 +7613,9 @@ EOL; * * @api * - * @param integer $hue H from 0 to 360 - * @param integer $whiteness W from 0 to 100 - * @param integer $blackness B from 0 to 100 + * @param int $hue H from 0 to 360 + * @param int $whiteness W from 0 to 100 + * @param int $blackness B from 0 to 100 * * @return array */ @@ -7616,9 +7645,9 @@ EOL; * * @api * - * @param integer $red - * @param integer $green - * @param integer $blue + * @param int $red + * @param int $green + * @param int $blue * * @return array */ @@ -7746,7 +7775,6 @@ EOL; $values = []; - foreach ($list[2] as $item) { $values[] = $this->normalizeValue($item); } @@ -8375,6 +8403,13 @@ EOL; } */ + /** + * @param array $color + * @param int $idx + * @param int|float $amount + * + * @return array + */ protected function adjustHsl($color, $idx, $amount) { $hsl = $this->toHSL($color[1], $color[2], $color[3]); @@ -8664,7 +8699,7 @@ will be an error in future versions of Sass.\n on line $line of $fname"; $list = $this->coerceList($args[0]); - if (\count($list[2]) <= 1 && empty($list['enclosing'])) { + if ($list[1] === '' && \count($list[2]) <= 1 && empty($list['enclosing'])) { return [Type::T_KEYWORD, 'space']; } @@ -8672,6 +8707,10 @@ will be an error in future versions of Sass.\n on line $line of $fname"; return [Type::T_KEYWORD, 'comma']; } + if ($list[1] === '/') { + return [Type::T_KEYWORD, 'slash']; + } + return [Type::T_KEYWORD, 'space']; } @@ -9038,9 +9077,13 @@ will be an error in future versions of Sass.\n on line $line of $fname"; * * @return string * @throws CompilerException + * + * @deprecated */ protected function listSeparatorForJoin($list1, $sep) { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + if (! isset($sep)) { return $list1[1]; } @@ -9057,14 +9100,40 @@ will be an error in future versions of Sass.\n on line $line of $fname"; } } - protected static $libJoin = ['list1', 'list2', 'separator:null', 'bracketed:auto']; + protected static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto']; protected function libJoin($args) { list($list1, $list2, $sep, $bracketed) = $args; $list1 = $this->coerceList($list1, ' ', true); $list2 = $this->coerceList($list2, ' ', true); - $sep = $this->listSeparatorForJoin($list1, $sep); + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + if ($list1[1] !== '' || count($list1[2]) > 1 || !empty($list1['enclosing']) && $list1['enclosing'] !== 'parent') { + $separator = $list1[1] ?: ' '; + } elseif ($list2[1] !== '' || count($list2[2]) > 1 || !empty($list2['enclosing']) && $list2['enclosing'] !== 'parent') { + $separator = $list2[1] ?: ' '; + } else { + $separator = ' '; + } + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } if ($bracketed === static::$true) { $bracketed = true; @@ -9091,11 +9160,7 @@ will be an error in future versions of Sass.\n on line $line of $fname"; } } - $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])]; - - if (isset($list1['enclosing'])) { - $res['enlcosing'] = $list1['enclosing']; - } + $res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])]; if ($bracketed) { $res['enclosing'] = 'bracket'; @@ -9104,14 +9169,35 @@ will be an error in future versions of Sass.\n on line $line of $fname"; return $res; } - protected static $libAppend = ['list', 'val', 'separator:null']; + protected static $libAppend = ['list', 'val', 'separator:auto']; protected function libAppend($args) { list($list1, $value, $sep) = $args; $list1 = $this->coerceList($list1, ' ', true); - $sep = $this->listSeparatorForJoin($list1, $sep); - $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])]; + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + $separator = $list1[1] === '' && \count($list1[2]) <= 1 && (empty($list1['enclosing']) || $list1['enclosing'] === 'parent') ? ' ' : $list1[1]; + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } + + $res = [Type::T_LIST, $separator, array_merge($list1[2], [$value])]; if (isset($list1['enclosing'])) { $res['enclosing'] = $list1['enclosing']; @@ -9134,7 +9220,7 @@ will be an error in future versions of Sass.\n on line $line of $fname"; $result = [Type::T_LIST, ',', $lists]; if (! \is_null($firstList)) { foreach ($firstList[2] as $key => $item) { - $list = [Type::T_LIST, '', [$item]]; + $list = [Type::T_LIST, ' ', [$item]]; foreach ($argLists as $arg) { if (isset($arg[2][$key])) { @@ -9514,6 +9600,8 @@ will be an error in future versions of Sass.\n on line $line of $fname"; ) { $value['enclosing'] = 'forced_' . $value['enclosing']; $force_enclosing_display = true; + } elseif (! \count($value[2])) { + $value['enclosing'] = 'forced_parent'; } foreach ($value[2] as $k => $listelement) { @@ -9637,7 +9725,7 @@ will be an error in future versions of Sass.\n on line $line of $fname"; * @param array $super * @param array $sub * - * @return boolean + * @return bool */ protected function isSuperSelector($super, $sub) { @@ -9718,7 +9806,7 @@ will be an error in future versions of Sass.\n on line $line of $fname"; * @param array $superParts * @param array $subParts * - * @return boolean + * @return bool */ protected function isSuperPart($superParts, $subParts) { @@ -9785,21 +9873,18 @@ will be an error in future versions of Sass.\n on line $line of $fname"; // do the trick, happening $lastSelector to $previousSelector $appended = []; - foreach ($lastSelectors as $lastSelector) { - $previous = $previousSelectors; - - foreach ($lastSelector as $lastSelectorParts) { - foreach ($lastSelectorParts as $lastSelectorPart) { - foreach ($previous as $i => $previousSelector) { - foreach ($previousSelector as $j => $previousSelectorParts) { - $previous[$i][$j][] = $lastSelectorPart; + foreach ($previousSelectors as $previousSelector) { + foreach ($lastSelectors as $lastSelector) { + $previous = $previousSelector; + foreach ($previousSelector as $j => $previousSelectorParts) { + foreach ($lastSelector as $lastSelectorParts) { + foreach ($lastSelectorParts as $lastSelectorPart) { + $previous[$j][] = $lastSelectorPart; } } } - } - foreach ($previous as $ps) { - $appended[] = $ps; + $appended[] = $previous; } } @@ -9855,10 +9940,10 @@ will be an error in future versions of Sass.\n on line $line of $fname"; * Extend/replace in selectors * used by selector-extend and selector-replace that use the same logic * - * @param array $selectors - * @param array $extendee - * @param array $extender - * @param boolean $replace + * @param array $selectors + * @param array $extendee + * @param array $extender + * @param bool $replace * * @return array */ diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler/Environment.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler/Environment.php index 306b15a673..b205a077f2 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler/Environment.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler/Environment.php @@ -31,6 +31,26 @@ class Environment */ public $parent; + /** + * @var Environment|null + */ + public $declarationScopeParent; + + /** + * @var Environment|null + */ + public $parentStore; + + /** + * @var array|null + */ + public $selectors; + + /** + * @var string|null + */ + public $marker; + /** * @var array */ @@ -42,7 +62,7 @@ class Environment public $storeUnreduced; /** - * @var integer + * @var int */ public $depth; } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter.php index cc42ae8056..c88ddba9db 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter.php @@ -25,7 +25,7 @@ use ScssPhp\ScssPhp\SourceMap\SourceMapGenerator; abstract class Formatter { /** - * @var integer + * @var int */ public $indentLevel; @@ -60,7 +60,7 @@ abstract class Formatter public $assignSeparator; /** - * @var boolean + * @var bool */ public $keepSemicolons; @@ -70,12 +70,12 @@ abstract class Formatter protected $currentBlock; /** - * @var integer + * @var int */ protected $currentLine; /** - * @var integer + * @var int */ protected $currentColumn; @@ -239,7 +239,7 @@ abstract class Formatter * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * - * @return boolean + * @return bool */ protected function testEmptyChildren($block) { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Compressed.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Compressed.php index de13c188ad..58ebe3f113 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Compressed.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Compressed.php @@ -50,8 +50,6 @@ class Compressed extends Formatter foreach ($block->lines as $index => $line) { if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') { unset($block->lines[$index]); - } elseif (substr($line, 0, 3) === '/*!') { - $block->lines[$index] = '/*' . substr($line, 3); } } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Nested.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Nested.php index 9e72956849..c11ea8adfd 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Nested.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Nested.php @@ -27,7 +27,7 @@ use ScssPhp\ScssPhp\Type; class Nested extends Formatter { /** - * @var integer + * @var int */ private $depth; @@ -221,7 +221,7 @@ class Nested extends Formatter * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * - * @return boolean + * @return bool */ private function hasFlatChild($block) { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/OutputBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/OutputBlock.php index 88deb2d377..5cc91a080a 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/OutputBlock.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/OutputBlock.php @@ -27,7 +27,7 @@ class OutputBlock public $type; /** - * @var integer + * @var int */ public $depth; @@ -57,12 +57,12 @@ class OutputBlock public $sourceName; /** - * @var integer|null + * @var int|null */ public $sourceLine; /** - * @var integer|null + * @var int|null */ public $sourceColumn; } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node.php index 53019375af..fcaf8a95f3 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node.php @@ -27,7 +27,7 @@ abstract class Node public $type; /** - * @var integer + * @var int */ public $sourceIndex; diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node/Number.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node/Number.php index b326906b5c..ca9b5b652d 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node/Number.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node/Number.php @@ -38,7 +38,7 @@ class Number extends Node implements \ArrayAccess const PRECISION = 10; /** - * @var integer + * @var int * @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore. */ public static $precision = self::PRECISION; @@ -81,7 +81,7 @@ class Number extends Node implements \ArrayAccess ]; /** - * @var integer|float + * @var int|float */ private $dimension; @@ -100,7 +100,7 @@ class Number extends Node implements \ArrayAccess /** * Initialize number * - * @param integer|float $dimension + * @param int|float $dimension * @param string[]|string $numeratorUnits * @param string[] $denominatorUnits * @@ -147,7 +147,7 @@ class Number extends Node implements \ArrayAccess } /** - * {@inheritdoc} + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -173,7 +173,7 @@ class Number extends Node implements \ArrayAccess } /** - * {@inheritdoc} + * @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) @@ -200,7 +200,7 @@ class Number extends Node implements \ArrayAccess } /** - * {@inheritdoc} + * @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -209,7 +209,7 @@ class Number extends Node implements \ArrayAccess } /** - * {@inheritdoc} + * @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) @@ -220,7 +220,7 @@ class Number extends Node implements \ArrayAccess /** * Returns true if the number is unitless * - * @return boolean + * @return bool */ public function unitless() { 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 3ba2f67f9d..36e7ac0361 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 @@ -12,6 +12,18 @@ namespace ScssPhp\ScssPhp; +use ScssPhp\ScssPhp\Block\AtRootBlock; +use ScssPhp\ScssPhp\Block\CallableBlock; +use ScssPhp\ScssPhp\Block\ContentBlock; +use ScssPhp\ScssPhp\Block\DirectiveBlock; +use ScssPhp\ScssPhp\Block\EachBlock; +use ScssPhp\ScssPhp\Block\ElseBlock; +use ScssPhp\ScssPhp\Block\ElseifBlock; +use ScssPhp\ScssPhp\Block\ForBlock; +use ScssPhp\ScssPhp\Block\IfBlock; +use ScssPhp\ScssPhp\Block\MediaBlock; +use ScssPhp\ScssPhp\Block\NestedPropertyBlock; +use ScssPhp\ScssPhp\Block\WhileBlock; use ScssPhp\ScssPhp\Exception\ParserException; use ScssPhp\ScssPhp\Logger\LoggerInterface; use ScssPhp\ScssPhp\Logger\QuietLogger; @@ -125,7 +137,7 @@ class Parser * @api * * @param string|null $sourceName - * @param integer $sourceIndex + * @param int $sourceIndex * @param string|null $encoding * @param Cache|null $cache * @param bool $cssOnly @@ -305,7 +317,7 @@ class Parser * @param string $buffer * @param string|array $out * - * @return boolean + * @return bool */ public function parseValue($buffer, &$out) { @@ -334,7 +346,7 @@ class Parser * @param string|array $out * @param bool $shouldValidate * - * @return boolean + * @return bool */ public function parseSelector($buffer, &$out, $shouldValidate = true) { @@ -371,7 +383,7 @@ class Parser * @param string $buffer * @param string|array $out * - * @return boolean + * @return bool */ public function parseMediaQueryList($buffer, &$out) { @@ -428,7 +440,7 @@ class Parser * position into $s. Then if a chain fails, use $this->seek($s) to * go back where we started. * - * @return boolean + * @return bool */ protected function parseChunk() { @@ -447,7 +459,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s); + $atRoot = new AtRootBlock(); + $this->registerPushedBlock($atRoot, $s); $atRoot->selector = $selector; $atRoot->with = $with; @@ -461,7 +474,8 @@ class Parser $this->mediaQueryList($mediaQueryList) && $this->matchChar('{', false) ) { - $media = $this->pushSpecialBlock(Type::T_MEDIA, $s); + $media = new MediaBlock(); + $this->registerPushedBlock($media, $s); $media->queryList = $mediaQueryList[2]; return true; @@ -477,7 +491,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s); + $mixin = new CallableBlock(Type::T_MIXIN); + $this->registerPushedBlock($mixin, $s); $mixin->name = $mixinName; $mixin->args = $args; @@ -509,7 +524,8 @@ class Parser ]; if (! empty($hasBlock)) { - $include = $this->pushSpecialBlock(Type::T_INCLUDE, $s); + $include = new ContentBlock(); + $this->registerPushedBlock($include, $s); $include->child = $child; } else { $this->append($child, $s); @@ -599,7 +615,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s); + $func = new CallableBlock(Type::T_FUNCTION); + $this->registerPushedBlock($func, $s); $func->name = $fnName; $func->args = $args; @@ -631,7 +648,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $each = $this->pushSpecialBlock(Type::T_EACH, $s); + $each = new EachBlock(); + $this->registerPushedBlock($each, $s); foreach ($varNames[2] as $varName) { $each->vars[] = $varName[1]; @@ -660,7 +678,8 @@ class Parser $cond = reset($cond[2]); } - $while = $this->pushSpecialBlock(Type::T_WHILE, $s); + $while = new WhileBlock(); + $this->registerPushedBlock($while, $s); $while->cond = $cond; return true; @@ -680,7 +699,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $for = $this->pushSpecialBlock(Type::T_FOR, $s); + $for = new ForBlock(); + $this->registerPushedBlock($for, $s); $for->var = $varName[1]; $for->start = $start; $for->end = $end; @@ -697,7 +717,8 @@ class Parser ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $if = $this->pushSpecialBlock(Type::T_IF, $s); + $if = new IfBlock(); + $this->registerPushedBlock($if, $s); while ( $cond[0] === Type::T_LIST && @@ -776,20 +797,21 @@ class Parser if (isset($last) && $last[0] === Type::T_IF) { list(, $if) = $last; + assert($if instanceof IfBlock); if ($this->literal('@else', 5)) { if ($this->matchChar('{', false)) { - $else = $this->pushSpecialBlock(Type::T_ELSE, $s); + $else = new ElseBlock(); } elseif ( $this->literal('if', 2) && $this->functionCallArgumentsList($cond, false, '{', false) ) { - $else = $this->pushSpecialBlock(Type::T_ELSEIF, $s); + $else = new ElseifBlock(); $else->cond = $cond; } if (isset($else)) { - $else->dontAppend = true; + $this->registerPushedBlock($else, $s); $if->cases[] = $else; return true; @@ -827,7 +849,8 @@ class Parser ($t1 = $this->supportsQuery($supportQuery)) && ($t2 = $this->matchChar('{', false)) ) { - $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); + $directive = new DirectiveBlock(); + $this->registerPushedBlock($directive, $s); $directive->name = 'supports'; $directive->value = $supportQuery; @@ -848,11 +871,12 @@ class Parser $dirName = [Type::T_STRING, '', $dirName]; } if ($dirName === 'media') { - $directive = $this->pushSpecialBlock(Type::T_MEDIA, $s); + $directive = new MediaBlock(); } else { - $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); + $directive = new DirectiveBlock(); $directive->name = $dirName; } + $this->registerPushedBlock($directive, $s); if (isset($dirValue)) { ! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue)); @@ -1028,7 +1052,8 @@ class Parser if ($this->matchChar('{', false)) { ! $this->cssOnly || $this->assertPlainCssValid(false); - $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s); + $propBlock = new NestedPropertyBlock(); + $this->registerPushedBlock($propBlock, $s); $propBlock->prefix = $name; $propBlock->hasValue = $foundSomething; @@ -1054,12 +1079,13 @@ class Parser } } - if (isset($block->type) && $block->type === Type::T_INCLUDE) { + if ($block instanceof ContentBlock) { $include = $block->child; + assert(\is_array($include)); unset($block->child); $include[3] = $block; $this->append($include, $s); - } elseif (empty($block->dontAppend)) { + } elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) { $type = isset($block->type) ? $block->type : Type::T_BLOCK; $this->append([$type, $block], $s); } @@ -1088,20 +1114,34 @@ class Parser * Push block onto parse tree * * @param array|null $selectors - * @param integer $pos + * @param int $pos * * @return Block */ protected function pushBlock($selectors, $pos = 0) + { + $b = new Block(); + $b->selectors = $selectors; + + $this->registerPushedBlock($b, $pos); + + return $b; + } + + /** + * @param Block $b + * @param int $pos + * + * @return void + */ + private function registerPushedBlock(Block $b, $pos) { list($line, $column) = $this->getSourcePosition($pos); - $b = new Block(); $b->sourceName = $this->sourceName; $b->sourceLine = $line; $b->sourceColumn = $column; $b->sourceIndex = $this->sourceIndex; - $b->selectors = $selectors; $b->comments = []; $b->parent = $this->env; @@ -1126,15 +1166,15 @@ class Parser $this->append(null); } } - - return $b; } /** * Push special (named) block onto parse tree * + * @deprecated + * * @param string $type - * @param integer $pos + * @param int $pos * * @return Block */ @@ -1183,11 +1223,11 @@ class Parser /** * Peek input stream * - * @param string $regex - * @param array $out - * @param integer $from + * @param string $regex + * @param array $out + * @param int $from * - * @return integer + * @return int */ protected function peek($regex, &$out, $from = null) { @@ -1204,7 +1244,7 @@ class Parser /** * Seek to position in input stream (or return current position in input stream) * - * @param integer $where + * @param int $where */ protected function seek($where) { @@ -1215,7 +1255,8 @@ class Parser * Assert a parsed part is plain CSS Valid * * @param array|false $parsed - * @param int $startPos + * @param int $startPos + * * @throws ParserException */ protected function assertPlainCssValid($parsed, $startPos = null) @@ -1243,7 +1284,10 @@ class Parser /** * Check a parsed element is plain CSS Valid + * * @param array $parsed + * @param bool $allowExpression + * * @return bool|array */ protected function isPlainCssValidElement($parsed, $allowExpression = false) @@ -1423,7 +1467,7 @@ class Parser * @param array $m Matches (passed by reference) * @param string $delim Delimiter * - * @return boolean True if match; false otherwise + * @return bool True if match; false otherwise */ protected function matchString(&$m, $delim) { @@ -1459,11 +1503,11 @@ class Parser /** * Try to match something on head of buffer * - * @param string $regex - * @param array $out - * @param boolean $eatWhitespace + * @param string $regex + * @param array $out + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function match($regex, &$out, $eatWhitespace = null) { @@ -1489,10 +1533,10 @@ class Parser /** * Match a single string * - * @param string $char - * @param boolean $eatWhitespace + * @param string $char + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function matchChar($char, $eatWhitespace = null) { @@ -1516,11 +1560,11 @@ class Parser /** * Match literal string * - * @param string $what - * @param integer $len - * @param boolean $eatWhitespace + * @param string $what + * @param int $len + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function literal($what, $len, $eatWhitespace = null) { @@ -1544,7 +1588,7 @@ class Parser /** * Match some whitespace * - * @return boolean + * @return bool */ protected function whitespace() { @@ -1643,7 +1687,7 @@ class Parser * Append statement to current block * * @param array|null $statement - * @param integer $pos + * @param int $pos */ protected function append($statement, $pos = null) { @@ -1688,7 +1732,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function mediaQueryList(&$out) { @@ -1700,7 +1744,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function mediaQuery(&$out) { @@ -1754,7 +1798,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function supportsQuery(&$out) { @@ -1887,7 +1931,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function mediaExpression(&$out) { @@ -1920,7 +1964,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function argValues(&$out) { @@ -1945,7 +1989,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function argValue(&$out) { @@ -2025,10 +2069,10 @@ class Parser /** * Parse directive value list that considers $vars as keyword * - * @param array $out - * @param boolean|string $endChar + * @param array $out + * @param bool|string $endChar * - * @return boolean + * @return bool */ protected function directiveValue(&$out, $endChar = false) { @@ -2089,7 +2133,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function valueList(&$out) { @@ -2105,10 +2149,11 @@ class Parser * Parse a function call, where externals () are part of the call * and not of the value list * - * @param $out - * @param bool $mandatoryEnclos + * @param array $out + * @param bool $mandatoryEnclos * @param null|string $charAfter - * @param null|bool $eatWhiteSp + * @param null|bool $eatWhiteSp + * * @return bool */ protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null) @@ -2145,7 +2190,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function spaceList(&$out) { @@ -2155,12 +2200,12 @@ class Parser /** * Parse generic list * - * @param array $out - * @param string $parseItem The name of the method used to parse items - * @param string $delim - * @param boolean $flatten + * @param array $out + * @param string $parseItem The name of the method used to parse items + * @param string $delim + * @param bool $flatten * - * @return boolean + * @return bool */ protected function genericList(&$out, $parseItem, $delim = '', $flatten = true) { @@ -2256,11 +2301,11 @@ class Parser /** * Parse expression * - * @param array $out - * @param boolean $listOnly - * @param boolean $lookForExp + * @param array $out + * @param bool $listOnly + * @param bool $lookForExp * - * @return boolean + * @return bool */ protected function expression(&$out, $listOnly = false, $lookForExp = true) { @@ -2322,11 +2367,11 @@ class Parser * Parse expression specifically checking for lists in parenthesis or brackets * * @param array $out - * @param integer $s + * @param int $s * @param string $closingParen * @param array $allowedTypes * - * @return boolean + * @return bool */ protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP]) { @@ -2381,8 +2426,8 @@ class Parser /** * Parse left-hand side of subexpression * - * @param array $lhs - * @param integer $minP + * @param array $lhs + * @param int $minP * * @return array */ @@ -2437,7 +2482,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function value(&$out) { @@ -2645,7 +2690,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function parenValue(&$out) { @@ -2684,7 +2729,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function progid(&$out) { @@ -2717,7 +2762,7 @@ class Parser * @param string $name * @param array $func * - * @return boolean + * @return bool */ protected function func($name, &$func) { @@ -2771,7 +2816,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function argumentList(&$out) { @@ -2816,7 +2861,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function argumentDef(&$out) { @@ -2878,7 +2923,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function map(&$out) { @@ -2920,7 +2965,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function color(&$out) { @@ -2946,7 +2991,7 @@ class Parser * * @param array $unit * - * @return boolean + * @return bool */ protected function unit(&$unit) { @@ -2971,8 +3016,9 @@ class Parser * Parse string * * @param array $out + * @param bool $keepDelimWithInterpolation * - * @return boolean + * @return bool */ protected function string(&$out, $keepDelimWithInterpolation = false) { @@ -3053,7 +3099,8 @@ class Parser /** * @param string $out - * @param bool $inKeywords + * @param bool $inKeywords + * * @return bool */ protected function matchEscapeCharacter(&$out, $inKeywords = false) @@ -3103,10 +3150,10 @@ class Parser /** * Parse keyword or interpolation * - * @param array $out - * @param boolean $restricted + * @param array $out + * @param bool $restricted * - * @return boolean + * @return bool */ protected function mixedKeyword(&$out, $restricted = false) { @@ -3147,14 +3194,14 @@ class Parser /** * Parse an unbounded string stopped by $end * - * @param string $end - * @param array $out - * @param string $nestOpen - * @param string $nestClose - * @param boolean $rtrim + * @param string $end + * @param array $out + * @param string $nestOpen + * @param string $nestClose + * @param bool $rtrim * @param string $disallow * - * @return boolean + * @return bool */ protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null) { @@ -3230,9 +3277,9 @@ class Parser * Parser interpolation * * @param string|array $out - * @param boolean $lookWhite save information about whitespace before and after + * @param bool $lookWhite save information about whitespace before and after * - * @return boolean + * @return bool */ protected function interpolation(&$out, $lookWhite = true) { @@ -3287,7 +3334,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function propertyName(&$out) { @@ -3342,7 +3389,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function customProperty(&$out) { @@ -3400,9 +3447,9 @@ class Parser * Parse comma separated selector list * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selectors(&$out, $subSelector = false) { @@ -3436,9 +3483,9 @@ class Parser * Parse whitespace separated selector list * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selector(&$out, $subSelector = false) { @@ -3494,7 +3541,8 @@ class Parser * - but this require a better formal selector representation instead of the array we have now * * @param string $out - * @param bool $keepEscapedNumber + * @param bool $keepEscapedNumber + * * @return bool */ protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false) @@ -3539,9 +3587,9 @@ class Parser * }} * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selectorSingle(&$out, $subSelector = false) { @@ -3765,7 +3813,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function variable(&$out) { @@ -3792,11 +3840,11 @@ class Parser /** * Parse a keyword * - * @param string $word - * @param boolean $eatWhitespace - * @param boolean $inSelector + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector * - * @return boolean + * @return bool */ protected function keyword(&$word, $eatWhitespace = null, $inSelector = false) { @@ -3859,11 +3907,11 @@ class Parser /** * Parse a keyword that should not start with a number * - * @param string $word - * @param boolean $eatWhitespace - * @param boolean $inSelector + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector * - * @return boolean + * @return bool */ protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false) { @@ -3883,7 +3931,7 @@ class Parser * * @param string|array $placeholder * - * @return boolean + * @return bool */ protected function placeholder(&$placeholder) { @@ -3912,7 +3960,7 @@ class Parser * * @param array $out * - * @return boolean + * @return bool */ protected function url(&$out) { @@ -3947,7 +3995,7 @@ class Parser * Consume an end of statement delimiter * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function end($eatWhitespace = null) { @@ -4065,7 +4113,7 @@ class Parser /** * Get source line number and column (given character position in the buffer) * - * @param integer $pos + * @param int $pos * * @return array */ diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64.php index 4a5ed8bb09..00b6b45456 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64.php @@ -164,7 +164,7 @@ class Base64 /** * Convert to base64 * - * @param integer $value + * @param int $value * * @return string */ @@ -178,7 +178,7 @@ class Base64 * * @param string $value * - * @return integer + * @return int */ public static function decode($value) { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64VLQ.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64VLQ.php index d47b96a1ca..2a5210c68a 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64VLQ.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64VLQ.php @@ -51,7 +51,7 @@ class Base64VLQ /** * Returns the VLQ encoded value. * - * @param integer $value + * @param int $value * * @return string */ @@ -80,9 +80,9 @@ class Base64VLQ * Decodes VLQValue. * * @param string $str - * @param integer $index + * @param int $index * - * @return integer + * @return int */ public static function decode($str, &$index) { @@ -107,9 +107,9 @@ class Base64VLQ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) * - * @param integer $value + * @param int $value * - * @return integer + * @return int */ private static function toVLQSigned($value) { @@ -126,9 +126,9 @@ class Base64VLQ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 * - * @param integer $value + * @param int $value * - * @return integer + * @return int */ private static function fromVLQSigned($value) { diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php index 4f14bdcef0..65dc24da0d 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php @@ -114,11 +114,11 @@ class SourceMapGenerator /** * Adds a mapping * - * @param integer $generatedLine The line number in generated file - * @param integer $generatedColumn The column number in generated file - * @param integer $originalLine The line number in original file - * @param integer $originalColumn The column number in original file - * @param string $sourceFile The original source file + * @param int $generatedLine The line number in generated file + * @param int $generatedColumn The column number in generated file + * @param int $originalLine The line number in original file + * @param int $originalColumn The column number in original file + * @param string $sourceFile The original source file * * @return void */ @@ -326,7 +326,7 @@ class SourceMapGenerator * * @param string $filename * - * @return integer|false + * @return int|false */ protected function findFileIndex($filename) { @@ -362,8 +362,8 @@ class SourceMapGenerator /** * Fix windows paths * - * @param string $path - * @param boolean $addEndSlash + * @param string $path + * @param bool $addEndSlash * * @return string */ diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Type.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Type.php index fb2a1d7fea..d430887858 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Type.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Type.php @@ -19,58 +19,190 @@ namespace ScssPhp\ScssPhp; */ class Type { + /** + * @internal + */ const T_ASSIGN = 'assign'; + /** + * @internal + */ const T_AT_ROOT = 'at-root'; + /** + * @internal + */ const T_BLOCK = 'block'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_BREAK = 'break'; + /** + * @internal + */ const T_CHARSET = 'charset'; const T_COLOR = 'color'; + /** + * @internal + */ const T_COMMENT = 'comment'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_CONTINUE = 'continue'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_CONTROL = 'control'; + /** + * @internal + */ const T_CUSTOM_PROPERTY = 'custom'; + /** + * @internal + */ const T_DEBUG = 'debug'; + /** + * @internal + */ const T_DIRECTIVE = 'directive'; + /** + * @internal + */ const T_EACH = 'each'; + /** + * @internal + */ const T_ELSE = 'else'; + /** + * @internal + */ const T_ELSEIF = 'elseif'; + /** + * @internal + */ const T_ERROR = 'error'; + /** + * @internal + */ const T_EXPRESSION = 'exp'; + /** + * @internal + */ const T_EXTEND = 'extend'; + /** + * @internal + */ const T_FOR = 'for'; const T_FUNCTION = 'function'; + /** + * @internal + */ const T_FUNCTION_REFERENCE = 'function-reference'; + /** + * @internal + */ const T_FUNCTION_CALL = 'fncall'; + /** + * @internal + */ const T_HSL = 'hsl'; + /** + * @internal + */ const T_HWB = 'hwb'; + /** + * @internal + */ const T_IF = 'if'; + /** + * @internal + */ const T_IMPORT = 'import'; + /** + * @internal + */ const T_INCLUDE = 'include'; + /** + * @internal + */ const T_INTERPOLATE = 'interpolate'; + /** + * @internal + */ const T_INTERPOLATED = 'interpolated'; + /** + * @internal + */ const T_KEYWORD = 'keyword'; const T_LIST = 'list'; const T_MAP = 'map'; + /** + * @internal + */ const T_MEDIA = 'media'; + /** + * @internal + */ const T_MEDIA_EXPRESSION = 'mediaExp'; + /** + * @internal + */ const T_MEDIA_TYPE = 'mediaType'; + /** + * @internal + */ const T_MEDIA_VALUE = 'mediaValue'; + /** + * @internal + */ const T_MIXIN = 'mixin'; + /** + * @internal + */ const T_MIXIN_CONTENT = 'mixin_content'; + /** + * @internal + */ const T_NESTED_PROPERTY = 'nestedprop'; + /** + * @internal + */ const T_NOT = 'not'; const T_NULL = 'null'; const T_NUMBER = 'number'; + /** + * @internal + */ const T_RETURN = 'return'; + /** + * @internal + */ const T_ROOT = 'root'; + /** + * @internal + */ const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once'; + /** + * @internal + */ const T_SELF = 'self'; const T_STRING = 'string'; + /** + * @internal + */ const T_UNARY = 'unary'; + /** + * @internal + */ const T_VARIABLE = 'var'; + /** + * @internal + */ const T_WARN = 'warn'; + /** + * @internal + */ const T_WHILE = 'while'; } diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Util.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Util.php index 62cd2a20c5..ad608ceb3a 100644 --- a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Util.php +++ b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Util.php @@ -79,7 +79,7 @@ class Util /** * mb_chr() wrapper * - * @param integer $code + * @param int $code * * @return string */ 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 be6a31037a..f8d728475b 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.9.0'; + const VERSION = '1.10.0'; } diff --git a/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/Mbstring.php b/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/Mbstring.php index b59909563f..b65c54a6b5 100644 --- a/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/Mbstring.php +++ b/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/Mbstring.php @@ -80,7 +80,7 @@ final class Mbstring public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { - if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) { $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); } else { $fromEncoding = self::getEncoding($fromEncoding); @@ -602,6 +602,9 @@ final class Mbstring if (80000 > \PHP_VERSION_ID) { return false; } + if (\is_int($c) || 'long' === $c || 'entity' === $c) { + return false; + } throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); } diff --git a/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/composer.json b/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/composer.json index 2ed7a74353..1fa21ca16c 100644 --- a/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/composer.json +++ b/wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/composer.json @@ -18,6 +18,9 @@ "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, "files": [ "bootstrap.php" ] diff --git a/wcfsetup/install/files/lib/system/api/symfony/polyfill-php73/Resources/stubs/JsonException.php b/wcfsetup/install/files/lib/system/api/symfony/polyfill-php73/Resources/stubs/JsonException.php index 673d100224..f06d6c2694 100644 --- a/wcfsetup/install/files/lib/system/api/symfony/polyfill-php73/Resources/stubs/JsonException.php +++ b/wcfsetup/install/files/lib/system/api/symfony/polyfill-php73/Resources/stubs/JsonException.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ -class JsonException extends Exception -{ +if (\PHP_VERSION_ID < 70300) { + class JsonException extends Exception + { + } } diff --git a/wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php index 7fb2000e9e..37937cbfae 100644 --- a/wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +++ b/wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php @@ -1,5 +1,7 @@