From 8c1594cfe5661efeb9327e7cbf7b9f1b7156776f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 29 Oct 2021 14:54:51 +0200 Subject: [PATCH] Move php-css-parser to the WoltLab fork This is for PHP 8.1 compatibility. --- .../files/lib/system/api/composer.json | 13 ++++++-- .../files/lib/system/api/composer.lock | 32 +++++++++++-------- .../system/api/composer/autoload_files.php | 2 +- .../system/api/composer/autoload_static.php | 2 +- .../lib/system/api/composer/installed.json | 19 ++++------- .../lib/system/api/composer/installed.php | 6 ++-- .../Sabberworm/CSS/Parsing/ParserState.php | 4 +-- 7 files changed, 43 insertions(+), 35 deletions(-) diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index 202f8a531b..4eaafa24b8 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -23,6 +23,15 @@ "laminas/laminas-progressbar": "^2.7", "symfony/polyfill-php73": "^1.23", "symfony/polyfill-php74": "^1.23", - "symfony/polyfill-php80": "^1.23" - } + "symfony/polyfill-php80": "^1.23", + + "sabberworm/php-css-parser": "dev-woltlab-8.3.1 as 8.3.1" + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/WoltLab/PHP-CSS-Parser", + "no-api": true + } + ] } diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index e316295faa..efc0985cc8 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": "9c02293e502eb0eff8e7c8e6e862d41e", + "content-hash": "082e48433021ad75dbb952cafc259b45", "packages": [ { "name": "chrisjean/php-ico", @@ -1353,16 +1353,16 @@ }, { "name": "sabberworm/php-css-parser", - "version": "8.3.1", + "version": "dev-woltlab-8.3.1", "source": { "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "d217848e1396ef962fb1997cf3e2421acba7f796" + "url": "https://github.com/WoltLab/PHP-CSS-Parser", + "reference": "2c397c3b29bfaf39e044e044bfcd759f99e67118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796", - "reference": "d217848e1396ef962fb1997cf3e2421acba7f796", + "url": "https://api.github.com/repos/WoltLab/PHP-CSS-Parser/zipball/2c397c3b29bfaf39e044e044bfcd759f99e67118", + "reference": "2c397c3b29bfaf39e044e044bfcd759f99e67118", "shasum": "" }, "require": { @@ -1378,7 +1378,6 @@ "Sabberworm\\CSS": "lib/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1394,11 +1393,7 @@ "parser", "stylesheet" ], - "support": { - "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", - "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.3.1" - }, - "time": "2020-06-01T09:10:00+00:00" + "time": "2021-10-28T13:16:58+00:00" }, { "name": "scssphp/scssphp", @@ -1981,9 +1976,18 @@ } ], "packages-dev": [], - "aliases": [], + "aliases": [ + { + "package": "sabberworm/php-css-parser", + "version": "dev-woltlab-8.3.1", + "alias": "8.3.1", + "alias_normalized": "8.3.1.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "sabberworm/php-css-parser": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_files.php b/wcfsetup/install/files/lib/system/api/composer/autoload_files.php index 0a9470d5e9..da3938bf62 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_files.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_files.php @@ -9,6 +9,7 @@ return array( '7e9bd612cc444b3eed788ebbe46263a0' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', + 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '07d7f1a47144818725fd8d91a907ac57' => $vendorDir . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.php', 'da94ac5d3ca7d2dbab84ce561ce72bfd' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php', '3d97c8dcdfba8cb85d3b34f116bb248b' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.php', @@ -27,7 +28,6 @@ return array( '751a5a3f463e4be759be31748b61737c' => $vendorDir . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.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 6416d9db2d..4a0a0223ba 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_static.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_static.php @@ -10,6 +10,7 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d '7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '07d7f1a47144818725fd8d91a907ac57' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.php', 'da94ac5d3ca7d2dbab84ce561ce72bfd' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php', '3d97c8dcdfba8cb85d3b34f116bb248b' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.php', @@ -28,7 +29,6 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d '751a5a3f463e4be759be31748b61737c' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 63f6e1e502..b3228a4298 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -1381,17 +1381,17 @@ }, { "name": "sabberworm/php-css-parser", - "version": "8.3.1", - "version_normalized": "8.3.1.0", + "version": "dev-woltlab-8.3.1", + "version_normalized": "dev-woltlab-8.3.1", "source": { "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "d217848e1396ef962fb1997cf3e2421acba7f796" + "url": "https://github.com/WoltLab/PHP-CSS-Parser", + "reference": "2c397c3b29bfaf39e044e044bfcd759f99e67118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796", - "reference": "d217848e1396ef962fb1997cf3e2421acba7f796", + "url": "https://api.github.com/repos/WoltLab/PHP-CSS-Parser/zipball/2c397c3b29bfaf39e044e044bfcd759f99e67118", + "reference": "2c397c3b29bfaf39e044e044bfcd759f99e67118", "shasum": "" }, "require": { @@ -1401,7 +1401,7 @@ "codacy/coverage": "^1.4", "phpunit/phpunit": "~4.8" }, - "time": "2020-06-01T09:10:00+00:00", + "time": "2021-10-28T13:16:58+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1409,7 +1409,6 @@ "Sabberworm\\CSS": "lib/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1425,10 +1424,6 @@ "parser", "stylesheet" ], - "support": { - "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", - "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.3.1" - }, "install-path": "../sabberworm/php-css-parser" }, { diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index be8f56943c..ed822d7626 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -218,12 +218,12 @@ 'dev_requirement' => false, ), 'sabberworm/php-css-parser' => array( - 'pretty_version' => '8.3.1', - 'version' => '8.3.1.0', + 'pretty_version' => 'dev-woltlab-8.3.1', + 'version' => 'dev-woltlab-8.3.1', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), - 'reference' => 'd217848e1396ef962fb1997cf3e2421acba7f796', + 'reference' => '2c397c3b29bfaf39e044e044bfcd759f99e67118', 'dev_requirement' => false, ), 'scssphp/scssphp' => array( diff --git a/wcfsetup/install/files/lib/system/api/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php b/wcfsetup/install/files/lib/system/api/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php index 4305c9a007..5962f0441e 100644 --- a/wcfsetup/install/files/lib/system/api/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php +++ b/wcfsetup/install/files/lib/system/api/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php @@ -282,7 +282,7 @@ class ParserState { private function strsplit($sString) { if ($this->oParserSettings->bMultibyteSupport) { if ($this->streql($this->sCharset, 'utf-8')) { - return preg_split('//u', $sString, null, PREG_SPLIT_NO_EMPTY); + return preg_split('//u', $sString, -1, PREG_SPLIT_NO_EMPTY); } else { $iLength = mb_strlen($sString, $this->sCharset); $aResult = array(); @@ -307,4 +307,4 @@ class ParserState { return strpos($sString, $sNeedle, $iOffset); } } -} \ No newline at end of file +} -- 2.20.1