Update composer dependencies
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 23 Apr 2021 13:06:24 +0000 (15:06 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 23 Apr 2021 13:06:24 +0000 (15:06 +0200)
51 files changed:
wcfsetup/install/files/lib/system/api/composer.lock
wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php
wcfsetup/install/files/lib/system/api/composer/autoload_files.php
wcfsetup/install/files/lib/system/api/composer/autoload_static.php
wcfsetup/install/files/lib/system/api/composer/installed.json
wcfsetup/install/files/lib/system/api/composer/installed.php
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/.php_cs.dist [deleted file]
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/CHANGELOG.md
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan-baseline.neon [deleted file]
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan.neon.dist [deleted file]
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/psalm.xml [deleted file]
wcfsetup/install/files/lib/system/api/guzzlehttp/promises/src/EachPromise.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/bc.yml [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/ci.yml [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/integration.yml [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.php_cs.dist [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/CHANGELOG.md
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/AppendStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/BufferStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/CachingStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/DroppingStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/FnStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/InflateStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/LazyOpenStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/LimitStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/MultipartStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/NoSeekStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/PumpStream.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Query.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Request.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Response.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Rfc7230.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/ServerRequest.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/StreamDecoratorTrait.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/StreamWrapper.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/UploadedFile.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Uri.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/UriNormalizer.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/UriResolver.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/Utils.php
wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/src/functions.php
wcfsetup/install/files/lib/system/api/pear/pear_exception/.gitignore [deleted file]
wcfsetup/install/files/lib/system/api/pear/pear_exception/.travis.yml [deleted file]
wcfsetup/install/files/lib/system/api/pear/pear_exception/PEAR/Exception.php
wcfsetup/install/files/lib/system/api/pear/pear_exception/composer.json
wcfsetup/install/files/lib/system/api/pear/pear_exception/package.xml [deleted file]
wcfsetup/install/files/lib/system/api/pear/pear_exception/tests/PEAR/ExceptionTest.php [deleted file]
wcfsetup/install/files/lib/system/api/pelago/emogrifier/CHANGELOG.md
wcfsetup/install/files/lib/system/api/pelago/emogrifier/README.md
wcfsetup/install/files/lib/system/api/pelago/emogrifier/composer.json
wcfsetup/install/files/lib/system/api/pelago/emogrifier/src/HtmlProcessor/AbstractHtmlProcessor.php

index 66e5937b046118959f7e7f05c5d17991c39a24dc..5430876077982f6440b99292843ce33c26c65ec9 100644 (file)
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "1.4.0",
+            "version": "1.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "60d379c243457e073cff02bc323a2a86cb355631"
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
-                "reference": "60d379c243457e073cff02bc323a2a86cb355631",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/guzzle/promises/issues",
-                "source": "https://github.com/guzzle/promises/tree/1.4.0"
+                "source": "https://github.com/guzzle/promises/tree/1.4.1"
             },
-            "time": "2020-09-30T07:37:28+00:00"
+            "time": "2021-03-07T09:25:29+00:00"
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "1.7.0",
+            "version": "1.8.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
+                "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
-                "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
+                "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/guzzle/psr7/issues",
-                "source": "https://github.com/guzzle/psr7/tree/1.7.0"
+                "source": "https://github.com/guzzle/psr7/tree/1.8.1"
             },
-            "time": "2020-09-30T07:37:11+00:00"
+            "time": "2021-03-21T16:25:00+00:00"
         },
         {
             "name": "paragonie/constant_time_encoding",
         },
         {
             "name": "pear/pear_exception",
-            "version": "v1.0.1",
+            "version": "v1.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/pear/PEAR_Exception.git",
-                "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7"
+                "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7",
-                "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7",
+                "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
+                "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
                 "shasum": ""
             },
             "require": {
-                "php": ">=4.4.0"
+                "php": ">=5.2.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "*"
+                "phpunit/phpunit": "<9"
             },
             "type": "class",
             "extra": {
                 "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception",
                 "source": "https://github.com/pear/PEAR_Exception"
             },
-            "time": "2019-12-10T10:24:42+00:00"
+            "time": "2021-03-21T15:43:46+00:00"
         },
         {
             "name": "pelago/emogrifier",
-            "version": "v5.0.0",
+            "version": "v5.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/MyIntervals/emogrifier.git",
-                "reference": "b43b650880d189b0ada61d95d0729c7424b1752d"
+                "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/b43b650880d189b0ada61d95d0729c7424b1752d",
-                "reference": "b43b650880d189b0ada61d95d0729c7424b1752d",
+                "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9",
+                "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9",
                 "shasum": ""
             },
             "require": {
             },
             "require-dev": {
                 "php-parallel-lint/php-parallel-lint": "^1.2.0",
+                "rawr/cross-data-providers": "^2.3.0",
                 "slevomat/coding-standard": "^6.4.1",
                 "squizlabs/php_codesniffer": "^3.5.8"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0.x-dev"
+                    "dev-main": "6.0.x-dev"
                 }
             },
             "autoload": {
                 "issues": "https://github.com/MyIntervals/emogrifier/issues",
                 "source": "https://github.com/MyIntervals/emogrifier"
             },
-            "time": "2020-11-23T18:37:25+00:00"
+            "time": "2021-04-06T08:18:22+00:00"
         },
         {
             "name": "psr/http-client",
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.2.3",
+            "version": "v5.2.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
             "description": "Converts CSS selectors to XPath expressions",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/css-selector/tree/v5.2.3"
+                "source": "https://github.com/symfony/css-selector/tree/v5.2.4"
             },
             "funding": [
                 {
index 929a0a2f8b2d6f0a597569e4f479b3dff2eb36f4..498ccf81269e931ca6be7af7d6715e22f004ecbc 100644 (file)
@@ -82,21 +82,21 @@ private static $installed = array (
     ),
     'guzzlehttp/promises' => 
     array (
-      'pretty_version' => '1.4.0',
-      'version' => '1.4.0.0',
+      'pretty_version' => '1.4.1',
+      'version' => '1.4.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
+      'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
     ),
     'guzzlehttp/psr7' => 
     array (
-      'pretty_version' => '1.7.0',
-      'version' => '1.7.0.0',
+      'pretty_version' => '1.8.1',
+      'version' => '1.8.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
+      'reference' => '35ea11d335fd638b5882ff1725228b3d35496ab1',
     ),
     'paragonie/constant_time_encoding' => 
     array (
@@ -118,21 +118,21 @@ private static $installed = array (
     ),
     'pear/pear_exception' => 
     array (
-      'pretty_version' => 'v1.0.1',
-      'version' => '1.0.1.0',
+      'pretty_version' => 'v1.0.2',
+      'version' => '1.0.2.0',
       'aliases' => 
       array (
       ),
-      'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7',
+      'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0',
     ),
     'pelago/emogrifier' => 
     array (
-      'pretty_version' => 'v5.0.0',
-      'version' => '5.0.0.0',
+      'pretty_version' => 'v5.0.1',
+      'version' => '5.0.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => 'b43b650880d189b0ada61d95d0729c7424b1752d',
+      'reference' => '37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9',
     ),
     'psr/http-client' => 
     array (
@@ -186,8 +186,8 @@ private static $installed = array (
     ),
     'symfony/css-selector' => 
     array (
-      'pretty_version' => 'v5.2.3',
-      'version' => '5.2.3.0',
+      'pretty_version' => 'v5.2.4',
+      'version' => '5.2.4.0',
       'aliases' => 
       array (
       ),
index 5ea4f1dff3afe0427fad7f135e539dec738fce4c..4eb5714aacd24957244846b7f5df602883345791 100644 (file)
@@ -7,9 +7,9 @@ $baseDir = $vendorDir;
 
 return array(
     '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
+    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
     'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
-    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
     '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
     '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
 );
index d81f4fb95d3162b973a60d4e7ba708dbbdfaed02..8062a7526e0ddb433e1378b257b8772f9c9de7fd 100644 (file)
@@ -8,9 +8,9 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d
 {
     public static $files = array (
         '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
+        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
         'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
-        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
         '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
         '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
     );
index 6ba605c44f4acfc53162e032bd75f977989b4032..bd4b0054440f5623a65fdb44fd9adf9c7b120e5b 100644 (file)
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "1.4.0",
-            "version_normalized": "1.4.0.0",
+            "version": "1.4.1",
+            "version_normalized": "1.4.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "60d379c243457e073cff02bc323a2a86cb355631"
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
-                "reference": "60d379c243457e073cff02bc323a2a86cb355631",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
                 "shasum": ""
             },
             "require": {
             "require-dev": {
                 "symfony/phpunit-bridge": "^4.4 || ^5.1"
             },
-            "time": "2020-09-30T07:37:28+00:00",
+            "time": "2021-03-07T09:25:29+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
             "keywords": [
                 "promise"
             ],
+            "support": {
+                "issues": "https://github.com/guzzle/promises/issues",
+                "source": "https://github.com/guzzle/promises/tree/1.4.1"
+            },
             "install-path": "../guzzlehttp/promises"
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "1.7.0",
-            "version_normalized": "1.7.0.0",
+            "version": "1.8.1",
+            "version_normalized": "1.8.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
+                "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
-                "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
+                "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
                 "shasum": ""
             },
             "require": {
             "suggest": {
                 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
             },
-            "time": "2020-09-30T07:37:11+00:00",
+            "time": "2021-03-21T16:25:00+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
                 "uri",
                 "url"
             ],
+            "support": {
+                "issues": "https://github.com/guzzle/psr7/issues",
+                "source": "https://github.com/guzzle/psr7/tree/1.8.1"
+            },
             "install-path": "../guzzlehttp/psr7"
         },
         {
         },
         {
             "name": "pear/pear_exception",
-            "version": "v1.0.1",
-            "version_normalized": "1.0.1.0",
+            "version": "v1.0.2",
+            "version_normalized": "1.0.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/pear/PEAR_Exception.git",
-                "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7"
+                "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7",
-                "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7",
+                "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
+                "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0",
                 "shasum": ""
             },
             "require": {
-                "php": ">=4.4.0"
+                "php": ">=5.2.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "*"
+                "phpunit/phpunit": "<9"
             },
-            "time": "2019-12-10T10:24:42+00:00",
+            "time": "2021-03-21T15:43:46+00:00",
             "type": "class",
             "extra": {
                 "branch-alias": {
             "keywords": [
                 "exception"
             ],
+            "support": {
+                "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception",
+                "source": "https://github.com/pear/PEAR_Exception"
+            },
             "install-path": "../pear/pear_exception"
         },
         {
             "name": "pelago/emogrifier",
-            "version": "v5.0.0",
-            "version_normalized": "5.0.0.0",
+            "version": "v5.0.1",
+            "version_normalized": "5.0.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/MyIntervals/emogrifier.git",
-                "reference": "b43b650880d189b0ada61d95d0729c7424b1752d"
+                "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/b43b650880d189b0ada61d95d0729c7424b1752d",
-                "reference": "b43b650880d189b0ada61d95d0729c7424b1752d",
+                "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9",
+                "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9",
                 "shasum": ""
             },
             "require": {
             },
             "require-dev": {
                 "php-parallel-lint/php-parallel-lint": "^1.2.0",
+                "rawr/cross-data-providers": "^2.3.0",
                 "slevomat/coding-standard": "^6.4.1",
                 "squizlabs/php_codesniffer": "^3.5.8"
             },
-            "time": "2020-11-23T18:37:25+00:00",
+            "time": "2021-04-06T08:18:22+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0.x-dev"
+                    "dev-main": "6.0.x-dev"
                 }
             },
             "installation-source": "dist",
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.2.3",
-            "version_normalized": "5.2.3.0",
+            "version": "v5.2.4",
+            "version_normalized": "5.2.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
             "description": "Converts CSS selectors to XPath expressions",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/css-selector/tree/v5.2.3"
+                "source": "https://github.com/symfony/css-selector/tree/v5.2.4"
             },
             "funding": [
                 {
index e2eb7b01ae61655f4334c745ab783596c1b3d40b..e37a43da655e937f968457aa3e98c30e86cadf4c 100644 (file)
     ),
     'guzzlehttp/promises' => 
     array (
-      'pretty_version' => '1.4.0',
-      'version' => '1.4.0.0',
+      'pretty_version' => '1.4.1',
+      'version' => '1.4.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
+      'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
     ),
     'guzzlehttp/psr7' => 
     array (
-      'pretty_version' => '1.7.0',
-      'version' => '1.7.0.0',
+      'pretty_version' => '1.8.1',
+      'version' => '1.8.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
+      'reference' => '35ea11d335fd638b5882ff1725228b3d35496ab1',
     ),
     'paragonie/constant_time_encoding' => 
     array (
     ),
     'pear/pear_exception' => 
     array (
-      'pretty_version' => 'v1.0.1',
-      'version' => '1.0.1.0',
+      'pretty_version' => 'v1.0.2',
+      'version' => '1.0.2.0',
       'aliases' => 
       array (
       ),
-      'reference' => 'dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7',
+      'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0',
     ),
     'pelago/emogrifier' => 
     array (
-      'pretty_version' => 'v5.0.0',
-      'version' => '5.0.0.0',
+      'pretty_version' => 'v5.0.1',
+      'version' => '5.0.1.0',
       'aliases' => 
       array (
       ),
-      'reference' => 'b43b650880d189b0ada61d95d0729c7424b1752d',
+      'reference' => '37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9',
     ),
     'psr/http-client' => 
     array (
     ),
     'symfony/css-selector' => 
     array (
-      'pretty_version' => 'v5.2.3',
-      'version' => '5.2.3.0',
+      'pretty_version' => 'v5.2.4',
+      'version' => '5.2.4.0',
       'aliases' => 
       array (
       ),
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/.php_cs.dist b/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/.php_cs.dist
deleted file mode 100644 (file)
index a321876..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-$config = PhpCsFixer\Config::create()
-    ->setRiskyAllowed(true)
-    ->setRules([
-        '@PSR2' => true,
-        'array_syntax' => ['syntax' => 'short'],
-        'binary_operator_spaces' => ['operators' => ['=>' => null]],
-        'blank_line_after_opening_tag' => true,
-        'class_attributes_separation' => ['elements' => ['method']],
-        'compact_nullable_typehint' => true,
-        'concat_space' => ['spacing' => 'one'],
-        'declare_equal_normalize' => ['space' => 'none'],
-        'declare_strict_types' => false,
-        'dir_constant' => true,
-        'final_static_access' => true,
-        'fully_qualified_strict_types' => true,
-        'function_to_constant' => true,
-        'function_typehint_space' => true,
-        'header_comment' => false,
-        'is_null' => ['use_yoda_style' => false],
-        'list_syntax' => ['syntax' => 'short'],
-        'lowercase_cast' => true,
-        'magic_method_casing' => true,
-        'modernize_types_casting' => true,
-        'multiline_comment_opening_closing' => true,
-        //'native_constant_invocation' => true,
-        'no_alias_functions' => true,
-        'no_alternative_syntax' => true,
-        'no_blank_lines_after_phpdoc' => true,
-        'no_empty_comment' => true,
-        'no_empty_phpdoc' => true,
-        'no_extra_blank_lines' => true,
-        'no_leading_import_slash' => true,
-        'no_leading_namespace_whitespace' => true,
-        'no_spaces_around_offset' => true,
-        'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
-        'no_trailing_comma_in_singleline_array' => true,
-        'no_unneeded_control_parentheses' => true,
-        'no_unset_cast' => true,
-        'no_unused_imports' => true,
-        'no_useless_else' => true,
-        'no_useless_return' => true,
-        'no_whitespace_in_blank_line' => true,
-        'normalize_index_brace' => true,
-        'ordered_imports' => true,
-        'php_unit_construct' => true,
-        'php_unit_dedicate_assert' => ['target' => 'newest'],
-        'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'],
-        'php_unit_expectation' => ['target' => 'newest'],
-        'php_unit_mock' => ['target' => 'newest'],
-        'php_unit_mock_short_will_return' => true,
-        'php_unit_no_expectation_annotation' => ['target' => 'newest'],
-        'php_unit_test_annotation' => ['style' => 'prefix'],
-        //'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
-        'phpdoc_align' => ['align' => 'vertical'],
-        //'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'],
-        'phpdoc_no_package' => true,
-        'phpdoc_no_useless_inheritdoc' => true,
-        'phpdoc_scalar' => true,
-        'phpdoc_separation' => true,
-        'phpdoc_single_line_var_spacing' => true,
-        'phpdoc_trim' => true,
-        'phpdoc_trim_consecutive_blank_line_separation' => true,
-        'phpdoc_types' => true,
-        'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
-        'phpdoc_var_without_name' => true,
-        'return_assignment' => true,
-        'short_scalar_cast' => true,
-        'single_trait_insert_per_statement' => true,
-        'standardize_not_equals' => true,
-        //'static_lambda' => true,
-        'ternary_to_null_coalescing' => true,
-        'trim_array_spaces' => true,
-        'visibility_required' => true,
-        'yoda_style' => false,
-        // 'native_function_invocation' => true,
-        'braces' => ['allow_single_line_closure'=>true],
-    ])
-    ->setFinder(
-        PhpCsFixer\Finder::create()
-            ->in(__DIR__.'/src')
-            ->in(__DIR__.'/tests')
-            ->name('*.php')
-    )
-;
-
-return $config;
index 4b63b2c749ab56f21961f4700f0a991966e4da16..14796c472c95d1e97036d4b86c3b9e9e250f67db 100644 (file)
@@ -1,5 +1,8 @@
 # CHANGELOG
 
+## 1.4.1 - 2021-02-18
+
+- Fixed `each_limit` skipping promises and failing
 
 ## 1.4.0 - 2020-09-30
 
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan-baseline.neon b/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan-baseline.neon
deleted file mode 100644 (file)
index 26012c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-parameters:
-       ignoreErrors:
-               -
-                       message: "#^Parameter \\#1 \\$function of function register_shutdown_function expects callable\\(\\)\\: void, Closure\\(\\)\\: mixed given\\.$#"
-                       count: 1
-                       path: src/TaskQueue.php
-
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan.neon.dist b/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/phpstan.neon.dist
deleted file mode 100644 (file)
index b533a8c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-includes:
-    - phpstan-baseline.neon
-
-parameters:
-    level: 5
-    paths:
-        - src
-
-    ignoreErrors:
-        - "#^Dead catch - Exception is already caught by Throwable above\\.$#"
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/psalm.xml b/wcfsetup/install/files/lib/system/api/guzzlehttp/promises/psalm.xml
deleted file mode 100644 (file)
index 3e4e3d0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<psalm
-    errorLevel="4"
-    resolveFromConfigFile="true"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="https://getpsalm.org/schema/config"
-    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
->
-    <projectFiles>
-        <directory name="src" />
-        <ignoreFiles>
-            <directory name="vendor" />
-        </ignoreFiles>
-    </projectFiles>
-</psalm>
index fbb8876c763fc96d6ce6a2e6dca7974f470a3f52..748f4712cdb020887974016251945207479517ae 100644 (file)
@@ -10,6 +10,8 @@ class EachPromise implements PromisorInterface
 {
     private $pending = [];
 
+    private $nextPendingIndex = 0;
+
     /** @var \Iterator|null */
     private $iterable;
 
@@ -121,6 +123,7 @@ class EachPromise implements PromisorInterface
         $clearFn = function () {
             $this->iterable = $this->concurrency = $this->pending = null;
             $this->onFulfilled = $this->onRejected = null;
+            $this->nextPendingIndex = 0;
         };
 
         $this->aggregate->then($clearFn, $clearFn);
@@ -163,11 +166,9 @@ class EachPromise implements PromisorInterface
         $promise = Create::promiseFor($this->iterable->current());
         $key = $this->iterable->key();
 
-        // Iterable keys may not be unique, so we add the promises at the end
-        // of the pending array and retrieve the array index being used
-        $this->pending[] = null;
-        end($this->pending);
-        $idx = key($this->pending);
+        // Iterable keys may not be unique, so we use a counter to
+        // guarantee uniqueness
+        $idx = $this->nextPendingIndex++;
 
         $this->pending[$idx] = $promise->then(
             function ($value) use ($idx, $key) {
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/bc.yml b/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/bc.yml
new file mode 100644 (file)
index 0000000..9eaedbc
--- /dev/null
@@ -0,0 +1,16 @@
+name: BC Check
+
+on:
+  pull_request:
+
+jobs:
+  roave-bc-check:
+    name: Roave BC Check
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Roave BC Check
+        uses: docker://nyholm/roave-bc-check-ga
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/ci.yml b/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/ci.yml
new file mode 100644 (file)
index 0000000..da7414e
--- /dev/null
@@ -0,0 +1,30 @@
+name: CI
+
+on:
+  pull_request:
+
+jobs:
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 10
+      matrix:
+        php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
+
+    steps:
+      - name: Set up PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.php }}
+          coverage: 'none'
+          extensions: mbstring
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Install dependencies
+        run: composer update --no-interaction --no-progress --prefer-dist
+
+      - name: Run tests
+        run: make test
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/integration.yml b/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.github/workflows/integration.yml
new file mode 100644 (file)
index 0000000..b6e0eb2
--- /dev/null
@@ -0,0 +1,37 @@
+name: Integration
+
+on:
+  pull_request:
+
+jobs:
+
+  build:
+    name: Test
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 10
+      matrix:
+        php: ['7.2', '7.3', '7.4', '8.0']
+
+    steps:
+      - name: Set up PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.php }}
+          coverage: none
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Download dependencies
+        uses: ramsey/composer-install@v1
+        with:
+          composer-options: --no-interaction --prefer-dist --optimize-autoloader
+
+      - name: Start server
+        run: php -S 127.0.0.1:10002 tests/Integration/server.php &
+
+      - name: Run tests
+        env:
+          TEST_SERVER: 127.0.0.1:10002
+        run: ./vendor/bin/phpunit --testsuite Integration
diff --git a/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.php_cs.dist b/wcfsetup/install/files/lib/system/api/guzzlehttp/psr7/.php_cs.dist
new file mode 100644 (file)
index 0000000..e4f0bd5
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+$config = PhpCsFixer\Config::create()
+    ->setRiskyAllowed(true)
+    ->setRules([
+        '@PSR2' => true,
+        'array_syntax' => ['syntax' => 'short'],
+        'concat_space' => ['spacing' => 'one'],
+        'declare_strict_types' => false,
+        'final_static_access' => true,
+        'fully_qualified_strict_types' => true,
+        'header_comment' => false,
+        'is_null' => ['use_yoda_style' => true],
+        'list_syntax' => ['syntax' => 'long'],
+        'lowercase_cast' => true,
+        'magic_method_casing' => true,
+        'modernize_types_casting' => true,
+        'multiline_comment_opening_closing' => true,
+        'no_alias_functions' => true,
+        'no_alternative_syntax' => true,
+        'no_blank_lines_after_phpdoc' => true,
+        'no_empty_comment' => true,
+        'no_empty_phpdoc' => true,
+        'no_empty_statement' => true,
+        'no_extra_blank_lines' => true,
+        'no_leading_import_slash' => true,
+        'no_trailing_comma_in_singleline_array' => true,
+        'no_unset_cast' => true,
+        'no_unused_imports' => true,
+        'no_whitespace_in_blank_line' => true,
+        'ordered_imports' => true,
+        'php_unit_ordered_covers' => true,
+        'php_unit_test_annotation' => ['style' => 'prefix'],
+        'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
+        'phpdoc_align' => ['align' => 'vertical'],
+        'phpdoc_no_useless_inheritdoc' => true,
+        'phpdoc_scalar' => true,
+        'phpdoc_separation' => true,
+        'phpdoc_single_line_var_spacing' => true,
+        'phpdoc_trim' => true,
+        'phpdoc_trim_consecutive_blank_line_separation' => true,
+        'phpdoc_types' => true,
+        'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
+        'phpdoc_var_without_name' => true,
+        'single_trait_insert_per_statement' => true,
+        'standardize_not_equals' => true,
+    ])
+    ->setFinder(
+        PhpCsFixer\Finder::create()
+            ->in(__DIR__.'/src')
+            ->in(__DIR__.'/tests')
+            ->name('*.php')
+    )
+;
+
+return $config;
index b441d36668e1ccdf386cf2ac74d51b30ba450ba9..a608aa4191bf9e3ff8214f1d7728916dd41abf06 100644 (file)
@@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 ## [Unreleased]
 
+## [1.8.1] - 2021-03-21
+
+### Fixed
+
+- Issue parsing IPv6 URLs
+- Issue modifying ServerRequest lost all its attributes
+
+## [1.8.0] - 2021-03-21
+
+### Added
+
+- Locale independent URL parsing
+- Most classes got a `@final` annotation to prepare for 2.0
+
+### Fixed
+
+- Issue when creating stream from `php://input` and curl-ext is not installed
+- Broken `Utils::tryFopen()` on PHP 8
+
 ## [1.7.0] - 2020-09-30
 
 ### Added
index 86e7a23ba3f1a762d0e3c3fb4c924be8a4be1c2c..fa9153d78f4720a6d47966b183e0ea0f0fd9c854 100644 (file)
@@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface;
  * Reads from multiple streams, one after the other.
  *
  * This is a read-only stream decorator.
+ *
+ * @final
  */
 class AppendStream implements StreamInterface
 {
index 627e4a5f146a8a165267bac4e068d4175b492e86..783859c198bb77ddf6cc11eb5153147a6d777a76 100644 (file)
@@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface;
  * This stream returns a "hwm" metadata value that tells upstream consumers
  * what the configured high water mark of the stream is, or the maximum
  * preferred size of the buffer.
+ *
+ * @final
  */
 class BufferStream implements StreamInterface
 {
index 244d2a063accd8adcd001b46029dfbd1a59d2464..fe749e981124f99b8d81c82dbab515f0b863db97 100644 (file)
@@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
  * Stream decorator that can cache previously read bytes from a sequentially
  * read stream.
+ *
+ * @final
  */
 class CachingStream implements StreamInterface
 {
@@ -21,7 +23,7 @@ class CachingStream implements StreamInterface
     /**
      * We will treat the buffer object as the body of the stream
      *
-     * @param StreamInterface $stream Stream to cache
+     * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
      * @param StreamInterface $target Optionally specify where data is cached
      */
     public function __construct(
@@ -29,7 +31,7 @@ class CachingStream implements StreamInterface
         StreamInterface $target = null
     ) {
         $this->remoteStream = $stream;
-        $this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
+        $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
     }
 
     public function getSize()
index e125642d3e94642388d2cd8b141dbcb55957fdec..9f7420c405e965a1d7d6d9ee54c81e42142dc180 100644 (file)
@@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
  * Stream decorator that begins dropping data once the size of the underlying
  * stream becomes too full.
+ *
+ * @final
  */
 class DroppingStream implements StreamInterface
 {
index 407577a379fde10704cfb5590615fe34eda40bd8..76a8cc7ba63fcbb117b27d1842d41a1e8609e05a 100644 (file)
@@ -9,6 +9,8 @@ use Psr\Http\Message\StreamInterface;
  *
  * Allows for easy testing and extension of a provided stream without needing
  * to create a concrete class for a simple extension point.
+ *
+ * @final
  */
 class FnStream implements StreamInterface
 {
@@ -56,6 +58,7 @@ class FnStream implements StreamInterface
 
     /**
      * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
+     *
      * @throws \LogicException
      */
     public function __wakeup()
index c98b96f2587be89bb01181a5fb889f47dbdab544..0cbd2cce27d39e56fe7483a283686377daed86cc 100644 (file)
@@ -14,6 +14,8 @@ use Psr\Http\Message\StreamInterface;
  *
  * @link http://tools.ietf.org/html/rfc1952
  * @link http://php.net/manual/en/filters.compression.php
+ *
+ * @final
  */
 class InflateStream implements StreamInterface
 {
@@ -34,6 +36,7 @@ class InflateStream implements StreamInterface
     /**
      * @param StreamInterface $stream
      * @param $header
+     *
      * @return int
      */
     private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
index 13c7af5c8b35c89e1feb52399aab8d01f2838532..911e127d318eca5b94f6454e11021fec1d42cacb 100644 (file)
@@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
  * Lazily reads or writes to a file that is opened only after an IO operation
  * take place on the stream.
+ *
+ * @final
  */
 class LazyOpenStream implements StreamInterface
 {
@@ -15,7 +17,7 @@ class LazyOpenStream implements StreamInterface
     /** @var string File to open */
     private $filename;
 
-    /** @var string $mode */
+    /** @var string */
     private $mode;
 
     /**
index bef9161eadc8a2f616ace0ca2966a0b6c287dc92..1173ec40d7063396c35e5447c181deecc9f87b7f 100644 (file)
@@ -4,9 +4,10 @@ namespace GuzzleHttp\Psr7;
 
 use Psr\Http\Message\StreamInterface;
 
-
 /**
- * Decorator used to return only a subset of a stream
+ * Decorator used to return only a subset of a stream.
+ *
+ * @final
  */
 class LimitStream implements StreamInterface
 {
index 0cbfea35d682f4e621ff3fcd4ebd1355e2fa0cf1..5a6079a89f51d9f3890b5cb1e83815b4a25f4a4c 100644 (file)
@@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
  * Stream that when read returns bytes for a streaming multipart or
  * multipart/form-data stream.
+ *
+ * @final
  */
 class MultipartStream implements StreamInterface
 {
@@ -115,9 +117,11 @@ class MultipartStream implements StreamInterface
         $disposition = $this->getHeader($headers, 'content-disposition');
         if (!$disposition) {
             $headers['Content-Disposition'] = ($filename === '0' || $filename)
-                ? sprintf('form-data; name="%s"; filename="%s"',
+                ? sprintf(
+                    'form-data; name="%s"; filename="%s"',
                     $name,
-                    basename($filename))
+                    basename($filename)
+                )
                 : "form-data; name=\"{$name}\"";
         }
 
index 4b04b4c0a49b2024d6f0c31a0a5ea210ec5c5a1f..d66bdde4602b9a75d6e4cbe39de53c00a43a21f0 100644 (file)
@@ -5,7 +5,9 @@ namespace GuzzleHttp\Psr7;
 use Psr\Http\Message\StreamInterface;
 
 /**
- * Stream decorator that prevents a stream from being seeked
+ * Stream decorator that prevents a stream from being seeked.
+ *
+ * @final
  */
 class NoSeekStream implements StreamInterface
 {
index fbd8726b46de72708b0e7411417667f815a4c482..44c7b582c14f02e2371846324d1ee10efd4e7ff3 100644 (file)
@@ -13,6 +13,8 @@ use Psr\Http\Message\StreamInterface;
  * returned by the provided callable is buffered internally until drained using
  * the read() function of the PumpStream. The provided callable MUST return
  * false when there is no more data to read.
+ *
+ * @final
  */
 class PumpStream implements StreamInterface
 {
@@ -32,14 +34,14 @@ class PumpStream implements StreamInterface
     private $buffer;
 
     /**
-     * @param callable $source Source of the stream data. The callable MAY
-     *                         accept an integer argument used to control the
-     *                         amount of data to return. The callable MUST
-     *                         return a string when called, or false on error
-     *                         or EOF.
-     * @param array $options   Stream options:
-     *                         - metadata: Hash of metadata to use with stream.
-     *                         - size: Size of the stream, if known.
+     * @param callable $source  Source of the stream data. The callable MAY
+     *                          accept an integer argument used to control the
+     *                          amount of data to return. The callable MUST
+     *                          return a string when called, or false on error
+     *                          or EOF.
+     * @param array    $options Stream options:
+     *                          - metadata: Hash of metadata to use with stream.
+     *                          - size: Size of the stream, if known.
      */
     public function __construct(callable $source, array $options = [])
     {
index 99e093050935546bd57e24ca84c6e6652b65bce9..5a7cc0359edf7fec3db0a6f3455d0dded39b0e90 100644 (file)
@@ -34,7 +34,9 @@ final class Query
         } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
             $decoder = 'urldecode';
         } else {
-            $decoder = function ($str) { return $str; };
+            $decoder = function ($str) {
+                return $str;
+            };
         }
 
         foreach (explode('&', $str) as $kvp) {
@@ -65,6 +67,7 @@ final class Query
      * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
      *                            to encode using RFC3986, or PHP_QUERY_RFC1738
      *                            to encode using RFC1738.
+     *
      * @return string
      */
     public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
@@ -74,7 +77,9 @@ final class Query
         }
 
         if ($encoding === false) {
-            $encoder = function ($str) { return $str; };
+            $encoder = function ($str) {
+                return $str;
+            };
         } elseif ($encoding === PHP_QUERY_RFC3986) {
             $encoder = 'rawurlencode';
         } elseif ($encoding === PHP_QUERY_RFC1738) {
index 89fbb1e62e8a90b69d7b9b4cd8198fbf52a9eb04..c1cdaebff80205e982aaf8f78500d63ae75ce261 100644 (file)
@@ -17,7 +17,7 @@ class Request implements RequestInterface
     /** @var string */
     private $method;
 
-    /** @var null|string */
+    /** @var string|null */
     private $requestTarget;
 
     /** @var UriInterface */
@@ -27,7 +27,7 @@ class Request implements RequestInterface
      * @param string                               $method  HTTP method
      * @param string|UriInterface                  $uri     URI
      * @param array                                $headers Request headers
-     * @param string|null|resource|StreamInterface $body    Request body
+     * @param string|resource|StreamInterface|null $body    Request body
      * @param string                               $version Protocol version
      */
     public function __construct(
index 36b85fb7834fff648aef96b3b6e0af627d879651..8c01a0f5a43f69948cd55677ddf80816d7c02c1b 100644 (file)
@@ -83,7 +83,7 @@ class Response implements ResponseInterface
     /**
      * @param int                                  $status  Status code
      * @param array                                $headers Response headers
-     * @param string|null|resource|StreamInterface $body    Response body
+     * @param string|resource|StreamInterface|null $body    Response body
      * @param string                               $version Protocol version
      * @param string|null                          $reason  Reason phrase (when empty a default will be used based on the status code)
      */
index 505e4742b6e749f85e69499c013617df20f7232e..51b571f24dee5fc7e94ff4a09d961a6ab59706ff 100644 (file)
@@ -11,6 +11,7 @@ final class Rfc7230
      * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
      *
      * @link    https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
+     *
      * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
      */
     const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
index 72c5566cfab28999ebd5ed60255a6a2e57fe1a84..e6d26f5ff9a4e22c39e45ac2462a00b4849ba1bc 100644 (file)
@@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7;
 
 use InvalidArgumentException;
 use Psr\Http\Message\ServerRequestInterface;
-use Psr\Http\Message\UriInterface;
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\UploadedFileInterface;
+use Psr\Http\Message\UriInterface;
 
 /**
  * Server-side HTTP request
@@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface
     private $cookieParams = [];
 
     /**
-     * @var null|array|object
+     * @var array|object|null
      */
     private $parsedBody;
 
@@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * @param string                               $method       HTTP method
      * @param string|UriInterface                  $uri          URI
      * @param array                                $headers      Request headers
-     * @param string|null|resource|StreamInterface $body         Request body
+     * @param string|resource|StreamInterface|null $body         Request body
      * @param string                               $version      Protocol version
      * @param array                                $serverParams Typically the $_SERVER superglobal
      */
@@ -111,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * delegate to normalizeNestedFileSpec() and return that return value.
      *
      * @param array $value $_FILES struct
+     *
      * @return array|UploadedFileInterface
      */
     private static function createUploadedFileFromSpec(array $value)
@@ -135,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * UploadedFileInterface instances.
      *
      * @param array $files
+     *
      * @return UploadedFileInterface[]
      */
     private static function normalizeNestedFileSpec(array $files = [])
@@ -184,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface
 
     private static function extractHostAndPortFromAuthority($authority)
     {
-        $uri = 'http://'.$authority;
+        $uri = 'http://' . $authority;
         $parts = parse_url($uri);
         if (false === $parts) {
             return [null, null];
@@ -245,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface
         return $uri;
     }
 
-
     /**
      * {@inheritdoc}
      */
index 093023b1c9ad3d6a19f8b85114939e37ba4d1c36..5025dd67b8a90ecc18a7a82ff048227bb9ff372c 100644 (file)
@@ -6,6 +6,7 @@ use Psr\Http\Message\StreamInterface;
 
 /**
  * Stream decorator trait
+ *
  * @property StreamInterface stream
  */
 trait StreamDecoratorTrait
index eac6535397986f710f233a158e3e5293e2d4cdf3..fc7cb969bd21abc43c41f3a274e0a24051d8fe22 100644 (file)
@@ -6,6 +6,8 @@ use Psr\Http\Message\StreamInterface;
 
 /**
  * Converts Guzzle streams into PHP stream resources.
+ *
+ * @final
  */
 class StreamWrapper
 {
index a0ea59e09bcb95391a410ee2a227afa1447de3fe..bf342c4de3bd69a5f0c78fd17fe5568ab433ed2f 100644 (file)
@@ -39,7 +39,7 @@ class UploadedFile implements UploadedFileInterface
     private $error;
 
     /**
-     * @var null|string
+     * @var string|null
      */
     private $file;
 
@@ -60,10 +60,10 @@ class UploadedFile implements UploadedFileInterface
 
     /**
      * @param StreamInterface|string|resource $streamOrFile
-     * @param int $size
-     * @param int $errorStatus
-     * @param string|null $clientFilename
-     * @param string|null $clientMediaType
+     * @param int                             $size
+     * @param int                             $errorStatus
+     * @param string|null                     $clientFilename
+     * @param string|null                     $clientMediaType
      */
     public function __construct(
         $streamOrFile,
@@ -144,7 +144,8 @@ class UploadedFile implements UploadedFileInterface
 
     /**
      * @param mixed $param
-     * @return boolean
+     *
+     * @return bool
      */
     private function isStringOrNull($param)
     {
@@ -153,7 +154,8 @@ class UploadedFile implements UploadedFileInterface
 
     /**
      * @param mixed $param
-     * @return boolean
+     *
+     * @return bool
      */
     private function isStringNotEmpty($param)
     {
@@ -195,7 +197,7 @@ class UploadedFile implements UploadedFileInterface
     /**
      * Return true if there is no upload error
      *
-     * @return boolean
+     * @return bool
      */
     private function isOk()
     {
@@ -203,7 +205,7 @@ class UploadedFile implements UploadedFileInterface
     }
 
     /**
-     * @return boolean
+     * @return bool
      */
     public function isMoved()
     {
@@ -248,10 +250,10 @@ class UploadedFile implements UploadedFileInterface
      *
      * @param string $targetPath Path to which to move the uploaded file.
      *
-     * @throws RuntimeException if the upload was not successful.
+     * @throws RuntimeException         if the upload was not successful.
      * @throws InvalidArgumentException if the $path specified is invalid.
-     * @throws RuntimeException on any error during the move operation, or on
-     *     the second or subsequent call to the method.
+     * @throws RuntimeException         on any error during the move operation, or on
+     *                                  the second or subsequent call to the method.
      */
     public function moveTo($targetPath)
     {
@@ -297,6 +299,7 @@ class UploadedFile implements UploadedFileInterface
      * {@inheritdoc}
      *
      * @see http://php.net/manual/en/features.file-upload.errors.php
+     *
      * @return int One of PHP's UPLOAD_ERR_XXX constants.
      */
     public function getError()
@@ -308,7 +311,7 @@ class UploadedFile implements UploadedFileInterface
      * {@inheritdoc}
      *
      * @return string|null The filename sent by the client or null if none
-     *     was provided.
+     *                     was provided.
      */
     public function getClientFilename()
     {
index a0d73917e2a2466f52738c03271cf69f49412a3f..ab201c1d152ee7d3976c203aca03b4c1a3463249 100644 (file)
@@ -67,7 +67,7 @@ class Uri implements UriInterface
     {
         // weak type check to also accept null until we can add scalar type hints
         if ($uri != '') {
-            $parts = parse_url($uri);
+            $parts = self::parse($uri);
             if ($parts === false) {
                 throw new \InvalidArgumentException("Unable to parse URI: $uri");
             }
@@ -75,6 +75,49 @@ class Uri implements UriInterface
         }
     }
 
+    /**
+     * UTF-8 aware \parse_url() replacement.
+     *
+     * The internal function produces broken output for non ASCII domain names
+     * (IDN) when used with locales other than "C".
+     *
+     * On the other hand, cURL understands IDN correctly only when UTF-8 locale
+     * is configured ("C.UTF-8", "en_US.UTF-8", etc.).
+     *
+     * @see https://bugs.php.net/bug.php?id=52923
+     * @see https://www.php.net/manual/en/function.parse-url.php#114817
+     * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
+     *
+     * @param string $url
+     *
+     * @return array|false
+     */
+    private static function parse($url)
+    {
+        // If IPv6
+        $prefix = '';
+        if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
+            $prefix = $matches[1];
+            $url = $matches[2];
+        }
+
+        $encodedUrl = preg_replace_callback(
+            '%[^:/@?&=#]+%usD',
+            static function ($matches) {
+                return urlencode($matches[0]);
+            },
+            $url
+        );
+
+        $result = parse_url($prefix.$encodedUrl);
+
+        if ($result === false) {
+            return false;
+        }
+
+        return array_map('urldecode', $result);
+    }
+
     public function __toString()
     {
         return self::composeComponents(
@@ -167,6 +210,7 @@ class Uri implements UriInterface
      * @param UriInterface $uri
      *
      * @return bool
+     *
      * @see Uri::isNetworkPathReference
      * @see Uri::isAbsolutePathReference
      * @see Uri::isRelativePathReference
@@ -185,6 +229,7 @@ class Uri implements UriInterface
      * @param UriInterface $uri
      *
      * @return bool
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-4.2
      */
     public static function isNetworkPathReference(UriInterface $uri)
@@ -200,6 +245,7 @@ class Uri implements UriInterface
      * @param UriInterface $uri
      *
      * @return bool
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-4.2
      */
     public static function isAbsolutePathReference(UriInterface $uri)
@@ -218,6 +264,7 @@ class Uri implements UriInterface
      * @param UriInterface $uri
      *
      * @return bool
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-4.2
      */
     public static function isRelativePathReference(UriInterface $uri)
@@ -238,6 +285,7 @@ class Uri implements UriInterface
      * @param UriInterface|null $base An optional base URI to compare against
      *
      * @return bool
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-4.4
      */
     public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
@@ -358,6 +406,7 @@ class Uri implements UriInterface
      * @param array $parts
      *
      * @return UriInterface
+     *
      * @link http://php.net/manual/en/function.parse-url.php
      *
      * @throws \InvalidArgumentException If the components do not form a valid URI.
@@ -576,7 +625,7 @@ class Uri implements UriInterface
             throw new \InvalidArgumentException('Scheme must be a string');
         }
 
-        return strtolower($scheme);
+        return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
     }
 
     /**
@@ -612,7 +661,7 @@ class Uri implements UriInterface
             throw new \InvalidArgumentException('Host must be a string');
         }
 
-        return strtolower($host);
+        return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
     }
 
     /**
@@ -641,7 +690,7 @@ class Uri implements UriInterface
     /**
      * @param UriInterface $uri
      * @param array        $keys
-     * 
+     *
      * @return array
      */
     private static function getFilteredQueryString(UriInterface $uri, array $keys)
@@ -662,7 +711,7 @@ class Uri implements UriInterface
     /**
      * @param string      $key
      * @param string|null $value
-     * 
+     *
      * @return string
      */
     private static function generateQueryString($key, $value)
@@ -754,7 +803,7 @@ class Uri implements UriInterface
                 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
                 E_USER_DEPRECATED
             );
-            $this->path = '/'. $this->path;
+            $this->path = '/' . $this->path;
             //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
         }
     }
index 2b9174a5e7e2705eff7313d841902617a8a58b25..81419ead42622f27550c4086fc455901f00a2f4e 100644 (file)
@@ -115,6 +115,7 @@ final class UriNormalizer
      * @param int          $flags A bitmask of normalizations to apply, see constants
      *
      * @return UriInterface The normalized URI
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-6.2
      */
     public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS)
@@ -171,6 +172,7 @@ final class UriNormalizer
      * @param int          $normalizations A bitmask of normalizations to apply, see constants
      *
      * @return bool
+     *
      * @link https://tools.ietf.org/html/rfc3986#section-6.1
      */
     public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
index 26cecd53a11f8bd1a3bb567160ab25ef7934f700..a3cb15d57037f96e6a401f04d2be278ed5a370cd 100644 (file)
@@ -19,6 +19,7 @@ final class UriResolver
      * @param string $path
      *
      * @return string
+     *
      * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
      */
     public static function removeDotSegments($path)
@@ -58,6 +59,7 @@ final class UriResolver
      * @param UriInterface $rel  Relative URI
      *
      * @return UriInterface
+     *
      * @link http://tools.ietf.org/html/rfc3986#section-5.2
      */
     public static function resolve(UriInterface $base, UriInterface $rel)
index 86960dde2e98e3fe1c64cb975bef5dc9cbea19f5..7c7cc3eb6b7eef9c6c60472db377c6ef702a82d1 100644 (file)
@@ -75,6 +75,7 @@ final class Utils
      * @param StreamInterface $stream Stream to read
      * @param int             $maxLen Maximum number of bytes to read. Pass -1
      *                                to read the entire stream.
+     *
      * @return string
      *
      * @throws \RuntimeException on error.
@@ -181,7 +182,7 @@ final class Utils
                     $standardPorts = ['http' => 80, 'https' => 443];
                     $scheme = $changes['uri']->getScheme();
                     if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
-                        $changes['set_headers']['Host'] .= ':'.$port;
+                        $changes['set_headers']['Host'] .= ':' . $port;
                     }
                 }
             }
@@ -202,7 +203,7 @@ final class Utils
         }
 
         if ($request instanceof ServerRequestInterface) {
-            return (new ServerRequest(
+            $new = (new ServerRequest(
                 isset($changes['method']) ? $changes['method'] : $request->getMethod(),
                 $uri,
                 $headers,
@@ -216,6 +217,12 @@ final class Utils
             ->withQueryParams($request->getQueryParams())
             ->withCookieParams($request->getCookieParams())
             ->withUploadedFiles($request->getUploadedFiles());
+        
+            foreach ($request->getAttributes() as $key => $value) {
+                $new = $new->withAttribute($key, $value);
+            }
+
+            return $new;
         }
 
         return new Request(
@@ -286,7 +293,7 @@ final class Utils
      *   number of requested bytes are available. Any additional bytes will be
      *   buffered and used in subsequent reads.
      *
-     * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
+     * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
      * @param array                                                                  $options  Additional options
      *
      * @return StreamInterface
@@ -296,7 +303,7 @@ final class Utils
     public static function streamFor($resource = '', array $options = [])
     {
         if (is_scalar($resource)) {
-            $stream = fopen('php://temp', 'r+');
+            $stream = self::tryFopen('php://temp', 'r+');
             if ($resource !== '') {
                 fwrite($stream, $resource);
                 fseek($stream, 0);
@@ -306,6 +313,16 @@ final class Utils
 
         switch (gettype($resource)) {
             case 'resource':
+                /*
+                 * The 'php://input' is a special stream with quirks and inconsistencies.
+                 * We avoid using that stream by reading it into php://temp
+                 */
+                if (\stream_get_meta_data($resource)['uri'] === 'php://input') {
+                    $stream = self::tryFopen('php://temp', 'w+');
+                    fwrite($stream, stream_get_contents($resource));
+                    fseek($stream, 0);
+                    $resource = $stream;
+                }
                 return new Stream($resource, $options);
             case 'object':
                 if ($resource instanceof StreamInterface) {
@@ -324,7 +341,7 @@ final class Utils
                 }
                 break;
             case 'NULL':
-                return new Stream(fopen('php://temp', 'r+'), $options);
+                return new Stream(self::tryFopen('php://temp', 'r+'), $options);
         }
 
         if (is_callable($resource)) {
@@ -352,14 +369,26 @@ final class Utils
         $ex = null;
         set_error_handler(function () use ($filename, $mode, &$ex) {
             $ex = new \RuntimeException(sprintf(
-                'Unable to open %s using mode %s: %s',
+                'Unable to open "%s" using mode "%s": %s',
                 $filename,
                 $mode,
                 func_get_args()[1]
             ));
+
+            return true;
         });
 
-        $handle = fopen($filename, $mode);
+        try {
+            $handle = fopen($filename, $mode);
+        } catch (\Throwable $e) {
+            $ex = new \RuntimeException(sprintf(
+                'Unable to open "%s" using mode "%s": %s',
+                $filename,
+                $mode,
+                $e->getMessage()
+            ), 0, $e);
+        }
+
         restore_error_handler();
 
         if ($ex) {
index e4cc13619683e1da71256c486b63aa992bd6a800..b0901fadd30db0fdec6234365d059cde2134d759 100644 (file)
@@ -70,7 +70,7 @@ function uri_for($uri)
  *   number of requested bytes are available. Any additional bytes will be
  *   buffered and used in subsequent reads.
  *
- * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
+ * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
  * @param array                                                                  $options  Additional options
  *
  * @return StreamInterface
@@ -187,6 +187,7 @@ function try_fopen($filename, $mode)
  * @param StreamInterface $stream Stream to read
  * @param int             $maxLen Maximum number of bytes to read. Pass -1
  *                                to read the entire stream.
+ *
  * @return string
  *
  * @throws \RuntimeException on error.
@@ -311,6 +312,7 @@ function parse_query($str, $urlEncoding = true)
  * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
  *                            to encode using RFC3986, or PHP_QUERY_RFC1738
  *                            to encode using RFC1738.
+ *
  * @return string
  *
  * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
@@ -361,6 +363,7 @@ function mimetype_from_extension($extension)
  * @return array
  *
  * @internal
+ *
  * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
  */
 function _parse_message($message)
@@ -377,6 +380,7 @@ function _parse_message($message)
  * @return string
  *
  * @internal
+ *
  * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
  */
 function _parse_request_uri($path, array $headers)
@@ -409,6 +413,7 @@ function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
  * @return array
  *
  * @internal
+ *
  * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
  */
 function _caseless_remove($keys, array $data)
diff --git a/wcfsetup/install/files/lib/system/api/pear/pear_exception/.gitignore b/wcfsetup/install/files/lib/system/api/pear/pear_exception/.gitignore
deleted file mode 100644 (file)
index 479265b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-PEAR_Exception*.tgz
-
-# composer related
-composer.lock
-composer.phar
-vendor
diff --git a/wcfsetup/install/files/lib/system/api/pear/pear_exception/.travis.yml b/wcfsetup/install/files/lib/system/api/pear/pear_exception/.travis.yml
deleted file mode 100644 (file)
index 18875d9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-language: php
-php:
-  - 5.6
-  - 5.5
-  - 5.4
-script:
-  - cd tests && phpunit --coverage-text .
index 5abf4f84a9acb5abd61cc7b5c77f8edd9b0d6e94..a8ef6e086c363baff4a05129a33c9cb90f7c28aa 100644 (file)
@@ -142,7 +142,7 @@ class PEAR_Exception extends Exception
             $code = null;
             $this->cause = null;
         }
-        parent::__construct($message, $code);
+        parent::__construct($message, (int) $code);
         $this->signal();
     }
 
index b923cf7181bd02a987e685988a26185d0c5d4aff..9ffba9b3d8ccdf0c3fa8fcd69247500c673860fc 100644 (file)
@@ -18,7 +18,7 @@
         }
     ],
     "require": {
-        "php": ">=4.4.0"
+        "php": ">=5.2.0"
     },
     "autoload": {
         "classmap": ["PEAR/"]
@@ -36,6 +36,6 @@
         "source": "https://github.com/pear/PEAR_Exception"
     },
     "require-dev": {
-        "phpunit/phpunit": "*"
+        "phpunit/phpunit": "<9"
     }
 }
diff --git a/wcfsetup/install/files/lib/system/api/pear/pear_exception/package.xml b/wcfsetup/install/files/lib/system/api/pear/pear_exception/package.xml
deleted file mode 100644 (file)
index 98290c6..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.4" version="2.0"
- xmlns="http://pear.php.net/dtd/package-2.0"
- xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"
->
- <name>PEAR_Exception</name>
- <channel>pear.php.net</channel>
- <summary>The PEAR Exception base class</summary>
- <description>PEAR_Exception PHP5 error handling mechanism</description>
-
- <lead>
-  <name>Christian Weiske</name>
-  <user>cweiske</user>
-  <email>cweiske@php.net</email>
-  <active>yes</active>
- </lead>
- <lead>
-  <name>Helgi Thormar</name>
-  <user>dufuz</user>
-  <email>dufuz@php.net</email>
-  <active>no</active>
- </lead>
- <developer>
-  <name>Greg Beaver</name>
-  <user>cellog</user>
-  <email>cellog@php.net</email>
-  <active>no</active>
- </developer>
-
- <date>2015-02-10</date>
- <time>21:02:23</time>
- <version>
-  <release>1.0.0</release>
-  <api>1.0.0</api>
- </version>
- <stability>
-  <release>stable</release>
-  <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-  This package was split out from the PEAR package.
-  If you use PEAR_Exception in your package and use nothing from the PEAR package
-  then it's better to depend on just PEAR_Exception.
- </notes>
- <contents>
-  <dir  name="/">
-   <file name="/PEAR/Exception.php" role="php">
-    <tasks:replace from="@package_version@" to="version" type="package-info" />
-   </file>
-   <dir name="tests">
-    <dir name="PEAR">
-     <file name="ExceptionTest.php" role="test"/>
-    </dir>
-   </dir>
-  </dir>
- </contents>
-
- <dependencies>
-  <required>
-   <php>
-    <min>5.4.0</min>
-   </php>
-   <pearinstaller>
-    <min>1.9.5</min>
-   </pearinstaller>
-  </required>
- </dependencies>
-
- <phprelease />
-
- <changelog>
-  <release>
-   <version>
-    <release>1.0.0</release>
-    <api>1.0.0</api>
-   </version>
-   <stability>
-    <release>stable</release>
-    <api>stable</api>
-   </stability>
-   <date>2015-02-10</date>
-   <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
-   <notes>Release stable version</notes>
-  </release>
-
-  <release>
-   <version>
-    <release>1.0.0beta2</release>
-    <api>1.0.0</api>
-   </version>
-   <stability>
-    <release>beta</release>
-    <api>stable</api>
-   </stability>
-   <date>2014-02-21</date>
-   <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
-   <notes>Bump up PEAR dependency.</notes>
-  </release>
-
-  <release>
-   <version>
-    <release>1.0.0beta1</release>
-    <api>1.0.0</api>
-   </version>
-   <stability>
-    <release>beta</release>
-    <api>stable</api>
-   </stability>
-   <date>2012-05-10</date>
-   <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
-   <notes>
-This packge was split out from the PEAR package. If you use PEAR_Exception in your package
-and use nothing from the PEAR package then it&apos;s better to depend on just PEAR_Exception.
-   </notes>
-  </release>
- </changelog>
-</package>
diff --git a/wcfsetup/install/files/lib/system/api/pear/pear_exception/tests/PEAR/ExceptionTest.php b/wcfsetup/install/files/lib/system/api/pear/pear_exception/tests/PEAR/ExceptionTest.php
deleted file mode 100644 (file)
index 61d2df4..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-$localFile = __DIR__ . '/../../PEAR/Exception.php';
-if (file_exists($localFile)) {
-    require_once $localFile;
-} else {
-    require_once 'PEAR/Exception.php';
-}
-
-class PEAR_ExceptionTest extends PHPUnit_Framework_TestCase
-{
-    /**
-     * @expectedException PEAR_Exception
-     * @expectedExceptionMessage foo
-     */
-    public function testThrow()
-    {
-        throw new PEAR_Exception('foo');
-    }
-
-    public function testGetCauseNone()
-    {
-        $e = new PEAR_Exception('foo bar');
-        $this->assertNull($e->getCause());
-    }
-
-    public function testGetCauseException()
-    {
-        $cause = new Exception('foo bar');
-        $e = new PEAR_Exception('I caught an exception', $cause);
-        $this->assertNotNull($e->getCause());
-        $this->assertInstanceOf('Exception', $e->getCause());
-        $this->assertEquals($cause, $e->getCause());
-    }
-
-    public function testGetCauseMessage()
-    {
-        $cause = new Exception('foo bar');
-        $e = new PEAR_Exception('I caught an exception', $cause);
-
-        $e->getCauseMessage($causes);
-        $this->assertEquals('I caught an exception', $causes[0]['message']);
-        $this->assertEquals('foo bar', $causes[1]['message']);
-    }
-
-    public function testGetTraceSafe()
-    {
-        $e = new PEAR_Exception('oops');
-        $this->assertInternalType('array', $e->getTraceSafe());
-    }
-
-    public function testGetErrorClass()
-    {
-        $e = new PEAR_Exception('oops');
-        $this->assertEquals('PEAR_ExceptionTest', $e->getErrorClass());
-    }
-
-    public function testGetErrorMethod()
-    {
-        $e = new PEAR_Exception('oops');
-        $this->assertEquals('testGetErrorMethod', $e->getErrorMethod());
-    }
-
-    public function test__toString()
-    {
-        $e = new PEAR_Exception('oops');
-        $this->assertInternalType('string', (string) $e);
-        $this->assertContains('oops', (string) $e);
-    }
-
-    public function testToHtml()
-    {
-        $e = new PEAR_Exception('oops');
-        $html = $e->toHtml();
-        $this->assertInternalType('string', $html);
-        $this->assertContains('oops', $html);
-    }
-}
-?>
index 3c455a1a6d071e5d267bb26bf94f3f027d5c46db..6266a95e9052243375f5d30af95e401b3298e3c9 100644 (file)
@@ -10,11 +10,24 @@ This project adheres to [Semantic Versioning](https://semver.org/).
 ### Changed
 
 ### Deprecated
+- Support for PHP 7.2 will be removed in Emogrifier 7.0.
 
 ### Removed
 
 ### Fixed
 
+## 5.0.1
+
+### Changed
+- Switch the default branch from `master` to `main`
+  ([#951](https://github.com/MyIntervals/emogrifier/pull/951))
+
+### Fixed
+- Ignore `http-equiv` `Content-Type` in `<body>`
+  ([#961](https://github.com/MyIntervals/emogrifier/pull/961))
+- Allow "Content-Type" in content
+  ([#959](https://github.com/MyIntervals/emogrifier/pull/959))
+
 ## 5.0.0
 
 ### Added
index fea1536d42ba3dff406c958e77db5bd5caf826ae..fd9b08bd3433d37204bc1cbd21383567a67d1ebe 100644 (file)
@@ -1,6 +1,6 @@
 # Emogrifier
 
-[![Build Status](https://github.com/MyIntervals/emogrifier/workflows/CI/badge.svg?branch=master)](https://github.com/MyIntervals/emogrifier/actions/)
+[![Build Status](https://github.com/MyIntervals/emogrifier/workflows/CI/badge.svg?branch=main)](https://github.com/MyIntervals/emogrifier/actions/)
 [![Latest Stable Version](https://poser.pugx.org/pelago/emogrifier/v/stable.svg)](https://packagist.org/packages/pelago/emogrifier)
 [![Total Downloads](https://poser.pugx.org/pelago/emogrifier/downloads.svg)](https://packagist.org/packages/pelago/emogrifier)
 [![Latest Unstable Version](https://poser.pugx.org/pelago/emogrifier/v/unstable.svg)](https://packagist.org/packages/pelago/emogrifier)
@@ -342,10 +342,10 @@ The following selectors are not implemented yet:
      without a type
    * [optional](https://developer.mozilla.org/en-US/docs/Web/CSS/:optional)
    * [required](https://developer.mozilla.org/en-US/docs/Web/CSS/:required)
-     
+
 Rules involving the following selectors cannot be applied as inline styles.
 They will, however, be preserved and copied to a `<style>` element in the HTML:
-     
+
  * dynamic [pseudo-classes](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes)
    (such as `:hover`)
  * [pseudo-elements](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)
@@ -362,7 +362,7 @@ They will, however, be preserved and copied to a `<style>` element in the HTML:
   to some of the declarations within them so that they will override CSS styles
   that have been inlined.  For example, with the following CSS, the `font-size`
   declaration in the `@media` rule would not override the font size for `p`
-  elements from the preceding rule after that has been inlined as 
+  elements from the preceding rule after that has been inlined as
   `<p style="font-size: 16px;">` in the HTML, without the `!important` directive
   (even though `!important` would not be necessary if the CSS were not inlined):
   ```css
@@ -373,7 +373,7 @@ They will, however, be preserved and copied to a `<style>` element in the HTML:
     p {
       font-size: 14px !important;
     }
-  } 
+  }
   ```
 * Emogrifier cannot inline CSS rules involving selectors with pseudo-elements
   (such as `::after`) or dynamic pseudo-classes (such as `:hover`) – it is
index a91e69cf1d10c71007939693fdcc882cc959245e..54a7acbab4308f801698bbf05e7711090b90c1d1 100644 (file)
@@ -44,6 +44,7 @@
     },
     "require-dev": {
         "php-parallel-lint/php-parallel-lint": "^1.2.0",
+        "rawr/cross-data-providers": "^2.3.0",
         "slevomat/coding-standard": "^6.4.1",
         "squizlabs/php_codesniffer": "^3.5.8"
     },
@@ -95,7 +96,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "5.0.x-dev"
+            "dev-main": "6.0.x-dev"
         }
     }
 }
index 479e6e347df168130e526f21eb386276426139ec..300d1717925b2e34c3b92539b71126ec66b16403 100644 (file)
@@ -32,6 +32,30 @@ abstract class AbstractHtmlProcessor
      */
     protected const PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER = '(?:command|embed|keygen|source|track|wbr)';
 
+    /**
+     * Regular expression part to match tag names that may appear before the start of the `<body>` element.  A start tag
+     * for any other element would implicitly start the `<body>` element due to tag omission rules.
+     *
+     * @var string
+     */
+    protected const TAGNAME_ALLOWED_BEFORE_BODY_MATCHER
+        = '(?:html|head|base|command|link|meta|noscript|script|style|template|title)';
+
+    /**
+     * regular expression pattern to match an HTML comment, including delimiters and modifiers
+     *
+     * @var string
+     */
+    protected const HTML_COMMENT_PATTERN = '/<!--[^-]*+(?:-(?!->)[^-]*+)*+(?:-->|$)/';
+
+    /**
+     * regular expression pattern to match an HTML `<template>` element, including delimiters and modifiers
+     *
+     * @var string
+     */
+    protected const HTML_TEMPLATE_ELEMENT_PATTERN
+        = '%<template[\\s>][^<]*+(?:<(?!/template>)[^<]*+)*+(?:</template>|$)%i';
+
     /**
      * @var \DOMDocument|null
      */
@@ -163,7 +187,7 @@ abstract class AbstractHtmlProcessor
      */
     private function removeSelfClosingTagsClosingTags(string $html): string
     {
-        return \preg_replace('%</' . static::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '>%', '', $html);
+        return \preg_replace('%</' . self::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '>%', '', $html);
     }
 
     /**
@@ -239,7 +263,7 @@ abstract class AbstractHtmlProcessor
             return $this->normalizeDocumentType($html);
         }
 
-        return static::DEFAULT_DOCUMENT_TYPE . $html;
+        return self::DEFAULT_DOCUMENT_TYPE . $html;
     }
 
     /**
@@ -271,8 +295,7 @@ abstract class AbstractHtmlProcessor
      */
     private function addContentTypeMetaTag(string $html): string
     {
-        $hasContentTypeMetaTag = \stripos($html, 'Content-Type') !== false;
-        if ($hasContentTypeMetaTag) {
+        if ($this->hasContentTypeMetaTagInHead($html)) {
             return $html;
         }
 
@@ -284,22 +307,118 @@ abstract class AbstractHtmlProcessor
         if ($hasHeadTag) {
             $reworkedHtml = \preg_replace(
                 '/<head(?=[\\s>])([^>]*+)>/i',
-                '<head$1>' . static::CONTENT_TYPE_META_TAG,
+                '<head$1>' . self::CONTENT_TYPE_META_TAG,
                 $html
             );
         } elseif ($hasHtmlTag) {
             $reworkedHtml = \preg_replace(
                 '/<html(.*?)>/i',
-                '<html$1><head>' . static::CONTENT_TYPE_META_TAG . '</head>',
+                '<html$1><head>' . self::CONTENT_TYPE_META_TAG . '</head>',
                 $html
             );
         } else {
-            $reworkedHtml = static::CONTENT_TYPE_META_TAG . $html;
+            $reworkedHtml = self::CONTENT_TYPE_META_TAG . $html;
         }
 
         return $reworkedHtml;
     }
 
+    /**
+     * Tests whether the given HTML has a valid `Content-Type` metadata element within the `<head>` element.  Due to tag
+     * omission rules, HTML parsers are expected to end the `<head>` element and start the `<body>` element upon
+     * encountering a start tag for any element which is permitted only within the `<body>`.
+     *
+     * @param string $html
+     *
+     * @return bool
+     */
+    private function hasContentTypeMetaTagInHead(string $html): bool
+    {
+        \preg_match('%^.*?(?=<meta(?=\\s)[^>]*\\shttp-equiv=(["\']?+)Content-Type\\g{-1}[\\s/>])%is', $html, $matches);
+        if (isset($matches[0])) {
+            $htmlBefore = $matches[0];
+            try {
+                $hasContentTypeMetaTagInHead = !$this->hasEndOfHeadElement($htmlBefore);
+            } catch (\RuntimeException $exception) {
+                // If something unexpected occurs, assume the `Content-Type` that was found is valid.
+                \trigger_error($exception->getMessage());
+                $hasContentTypeMetaTagInHead = true;
+            }
+        } else {
+            $hasContentTypeMetaTagInHead = false;
+        }
+
+        return $hasContentTypeMetaTagInHead;
+    }
+
+    /**
+     * Tests whether the `<head>` element ends within the given HTML.  Due to tag omission rules, HTML parsers are
+     * expected to end the `<head>` element and start the `<body>` element upon encountering a start tag for any element
+     * which is permitted only within the `<body>`.
+     *
+     * @param string $html
+     *
+     * @return bool
+     *
+     * @throws \RuntimeException
+     */
+    private function hasEndOfHeadElement(string $html): bool
+    {
+        $headEndTagMatchCount
+            = \preg_match('%<(?!' . self::TAGNAME_ALLOWED_BEFORE_BODY_MATCHER . '[\\s/>])\\w|</head>%i', $html);
+        if (\is_int($headEndTagMatchCount) && $headEndTagMatchCount > 0) {
+            // An exception to the implicit end of the `<head>` is any content within a `<template>` element, as well in
+            // comments.  As an optimization, this is only checked for if a potential `<head>` end tag is found.
+            $htmlWithoutCommentsOrTemplates = $this->removeHtmlTemplateElements($this->removeHtmlComments($html));
+            $hasEndOfHeadElement = $htmlWithoutCommentsOrTemplates === $html
+                || $this->hasEndOfHeadElement($htmlWithoutCommentsOrTemplates);
+        } else {
+            $hasEndOfHeadElement = false;
+        }
+
+        return $hasEndOfHeadElement;
+    }
+
+    /**
+     * Removes comments from the given HTML, including any which are unterminated, for which the remainder of the string
+     * is removed.
+     *
+     * @param string $html
+     *
+     * @return string
+     *
+     * @throws \RuntimeException
+     */
+    private function removeHtmlComments(string $html): string
+    {
+        $result = \preg_replace(self::HTML_COMMENT_PATTERN, '', $html);
+        if (!\is_string($result)) {
+            throw new \RuntimeException('Internal PCRE error', 1616521475);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Removes `<template>` elements from the given HTML, including any without an end tag, for which the remainder of
+     * the string is removed.
+     *
+     * @param string $html
+     *
+     * @return string
+     *
+     * @throws \RuntimeException
+     */
+    private function removeHtmlTemplateElements(string $html): string
+    {
+        $result = \preg_replace(self::HTML_TEMPLATE_ELEMENT_PATTERN, '', $html);
+        if (!\is_string($result)) {
+            throw new \RuntimeException('Internal PCRE error', 1616519652);
+        }
+
+        return $result;
+    }
+
     /**
      * Makes sure that any self-closing tags not recognized as such by PHP's DOMDocument implementation have a
      * self-closing slash.
@@ -311,7 +430,7 @@ abstract class AbstractHtmlProcessor
     private function ensurePhpUnrecognizedSelfClosingTagsAreXml(string $html): string
     {
         return \preg_replace(
-            '%<' . static::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '\\b[^>]*+(?<!/)(?=>)%',
+            '%<' . self::PHP_UNRECOGNIZED_VOID_TAGNAME_MATCHER . '\\b[^>]*+(?<!/)(?=>)%',
             '$0/',
             $html
         );