diff --git a/dist-persist/composer.lock b/dist-persist/composer.lock index ab3fe9b67..486a748e4 100644 --- a/dist-persist/composer.lock +++ b/dist-persist/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "clue/stream-filter", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/clue/stream-filter.git", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e", + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e", "shasum": "" }, "require": { @@ -28,12 +28,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "Clue\\StreamFilter\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -58,7 +58,7 @@ ], "support": { "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" }, "funding": [ { @@ -70,7 +70,7 @@ "type": "github" } ], - "time": "2020-10-02T12:38:20+00:00" + "time": "2022-02-21T13:15:14+00:00" }, { "name": "composer/installers", @@ -388,8 +388,8 @@ "autoload": { "psr-4": { "DataValues\\": "src/DataValues/", - "ValueFormatters\\": "src/ValueFormatters/", - "ValueParsers\\": "src/ValueParsers/" + "ValueParsers\\": "src/ValueParsers/", + "ValueFormatters\\": "src/ValueFormatters/" } }, "notification-url": "https://packagist.org/downloads/", @@ -601,8 +601,8 @@ "type": "library", "autoload": { "psr-4": { - "ValueFormatters\\": "src/ValueFormatters/", "ValueParsers\\": "src/ValueParsers/", + "ValueFormatters\\": "src/ValueFormatters/", "ValueValidators\\": "src/ValueValidators/" } }, @@ -665,8 +665,8 @@ ], "psr-0": { "DataValues\\": "src", - "ValueFormatters\\": "src", - "ValueParsers\\": "src" + "ValueParsers\\": "src", + "ValueFormatters\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -793,8 +793,8 @@ "autoload": { "psr-0": { "DataValues\\": "src", - "ValueFormatters\\": "src", - "ValueParsers\\": "src" + "ValueParsers\\": "src", + "ValueFormatters\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1133,16 +1133,16 @@ }, { "name": "firebase/php-jwt", - "version": "v5.2.0", + "version": "v5.5.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb" + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6", + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6", "shasum": "" }, "require": { @@ -1151,6 +1151,9 @@ "require-dev": { "phpunit/phpunit": ">=4.8 <=9" }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, "type": "library", "autoload": { "psr-4": { @@ -1181,9 +1184,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/master" + "source": "https://github.com/firebase/php-jwt/tree/v5.5.1" }, - "time": "2020-03-25T18:49:23+00:00" + "time": "2021-11-08T20:18:51+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1227,12 +1230,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1289,16 +1292,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1314,12 +1317,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1353,7 +1356,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1369,20 +1372,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.3", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { @@ -1403,16 +1406,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1463,7 +1466,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.3" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, "funding": [ { @@ -1479,20 +1482,20 @@ "type": "tidelift" } ], - "time": "2021-10-05T13:56:00+00:00" + "time": "2022-06-20T21:43:03+00:00" }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -1547,9 +1550,9 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-04-13T08:02:27+00:00" }, { "name": "lcobucci/clock", @@ -1614,16 +1617,16 @@ }, { "name": "lcobucci/jwt", - "version": "4.1.5", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/72ac6d807ee51a70ad376ee03a2387e8646e10f3", + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3", "shasum": "" }, "require": { @@ -1639,12 +1642,12 @@ "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, @@ -1672,7 +1675,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.1.5" + "source": "https://github.com/lcobucci/jwt/tree/4.2.1" }, "funding": [ { @@ -1684,7 +1687,7 @@ "type": "patreon" } ], - "time": "2021-09-28T19:34:56+00:00" + "time": "2022-08-19T23:14:07+00:00" }, { "name": "league/event", @@ -1752,8 +1755,9 @@ "defuse/php-encryption": "^2.2.1", "ext-json": "*", "ext-openssl": "*", - "lcobucci/jwt": "^3.4 || ^4.0", + "lcobucci/jwt": "^3.4.6 || ^4.0.4", "league/event": "^2.2", + "league/uri": "^6.4", "php": "^7.2 || ^8.0", "psr/http-message": "^1.0.1" }, @@ -1815,7 +1819,177 @@ "secure", "server" ], - "time": "2021-03-05T01:19:42+00:00" + "time": "2022-08-02T10:31:36+00:00" + }, + { + "name": "league/uri", + "version": "6.7.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/d3b50812dd51f3fbf176344cc2981db03d10fe06", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.7.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2022-09-13T19:50:42+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" + }, + "suggest": { + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2021-06-28T04:27:21+00:00" }, { "name": "liuggio/statsd-php-client", @@ -1873,16 +2047,16 @@ }, { "name": "mailgun/mailgun-php", - "version": "v3.5.1", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/mailgun/mailgun-php.git", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5" + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", + "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/8765ce557c373243ae9604d1d44d86e037bd1018", + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018", "shasum": "" }, "require": { @@ -1896,12 +2070,12 @@ "require-dev": { "nyholm/nsa": "^1.2.1", "nyholm/psr7": "^1.3.1", - "php-http/guzzle7-adapter": "^0.1.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/http-client": "^5.3" }, "suggest": { - "guzzlehttp/psr7": "PSR-7 message implementation that also provides common utility methods", - "php-http/curl-client": "cURL client for PHP-HTTP" + "nyholm/psr7": "PSR-7 message implementation", + "symfony/http-client": "HTTP client" }, "type": "library", "extra": { @@ -1927,9 +2101,9 @@ "description": "The Mailgun SDK provides methods for all API functions.", "support": { "issues": "https://github.com/mailgun/mailgun-php/issues", - "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.1" + "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.4" }, - "time": "2021-08-16T09:57:44+00:00" + "time": "2022-08-25T19:40:50+00:00" }, { "name": "monolog/monolog", @@ -2029,16 +2203,16 @@ }, { "name": "nesbot/carbon", - "version": "2.55.2", + "version": "2.62.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2" + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8c2a18ce3e67c34efc1b29f64fe61304368259a2", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", "shasum": "" }, "require": { @@ -2053,10 +2227,12 @@ "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -2113,28 +2289,32 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2021-12-03T14:59:52+00:00" + "time": "2022-09-02T07:48:13+00:00" }, { "name": "nyholm/psr7", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec" + "reference": "f734364e38a876a23be4d906a2a089e1315be18a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/2212385b47153ea71b1c1b1374f8cb5e4f7892ec", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", + "reference": "f734364e38a876a23be4d906a2a089e1315be18a", "shasum": "" }, "require": { @@ -2186,7 +2366,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.4.1" + "source": "https://github.com/Nyholm/psr7/tree/1.5.1" }, "funding": [ { @@ -2198,7 +2378,7 @@ "type": "github" } ], - "time": "2021-07-02T08:32:20+00:00" + "time": "2022-06-22T07:13:36+00:00" }, { "name": "onoi/message-reporter", @@ -2937,16 +3117,16 @@ }, { "name": "php-http/discovery", - "version": "1.14.1", + "version": "1.14.3", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", + "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735", + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735", "shasum": "" }, "require": { @@ -2959,8 +3139,7 @@ "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1", - "puli/composer-plugin": "1.0.0-beta10" + "phpspec/phpspec": "^5.1 || ^6.1" }, "suggest": { "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" @@ -2999,22 +3178,22 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.1" + "source": "https://github.com/php-http/discovery/tree/1.14.3" }, - "time": "2021-09-18T07:57:46+00:00" + "time": "2022-07-11T14:04:40+00:00" }, { "name": "php-http/httplug", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + "reference": "f640739f80dfa1152533976e3c112477f69274eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", + "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, "require": { @@ -3061,22 +3240,22 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/master" + "source": "https://github.com/php-http/httplug/tree/2.3.0" }, - "time": "2020-07-13T15:43:23+00:00" + "time": "2022-02-21T09:52:22+00:00" }, { "name": "php-http/message", - "version": "1.12.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", + "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", "shasum": "" }, "require": { @@ -3093,7 +3272,7 @@ "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", "laminas/laminas-diactoros": "^2.0", - "phpspec/phpspec": "^5.1 || ^6.3", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, "suggest": { @@ -3109,12 +3288,12 @@ } }, "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, "files": [ "src/filters.php" - ] + ], + "psr-4": { + "Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3135,9 +3314,9 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.12.0" + "source": "https://github.com/php-http/message/tree/1.13.0" }, - "time": "2021-08-29T09:13:12+00:00" + "time": "2022-02-11T13:41:14+00:00" }, { "name": "php-http/message-factory", @@ -3365,16 +3544,16 @@ }, { "name": "professional-wiki/edtf", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/ProfessionalWiki/EDTF.git", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4" + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", + "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/2cebb350e0b703d202e6a3a31daf15aa2adb88a7", + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7", "shasum": "" }, "require": { @@ -3413,19 +3592,15 @@ "description": "PHP library to parse, represent and work with dates that follow the Extended Date/Time Format specification.", "support": { "issues": "https://github.com/ProfessionalWiki/EDTF/issues", - "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.0" + "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.2" }, "funding": [ { "url": "https://github.com/JeroenDeDauw", "type": "github" - }, - { - "url": "https://www.patreon.com/jeroendedauw", - "type": "patreon" } ], - "time": "2021-04-28T13:37:17+00:00" + "time": "2022-04-29T13:08:22+00:00" }, { "name": "psr/container", @@ -3782,32 +3957,32 @@ }, { "name": "react/promise", - "version": "v2.8.0", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3816,7 +3991,23 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", @@ -3826,9 +4017,19 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" + "source": "https://github.com/reactphp/promise/tree/v2.9.0" }, - "time": "2020-05-12T15:16:56+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-11T10:27:51+00:00" }, { "name": "ruflin/elastica", @@ -3927,8 +4128,8 @@ }, "autoload": { "psr-4": { - "Deserializers\\": "src/Deserializers/", - "Serializers\\": "src/Serializers/" + "Serializers\\": "src/Serializers/", + "Deserializers\\": "src/Deserializers/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3961,16 +4162,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -4008,7 +4209,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4024,20 +4225,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.0", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847" + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b0fb78576487af19c500aaddb269fd36701d4847", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", "shasum": "" }, "require": { @@ -4077,7 +4278,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" }, "funding": [ { @@ -4093,20 +4294,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T10:19:22+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -4115,7 +4316,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4123,12 +4324,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -4156,7 +4357,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4172,7 +4373,7 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", @@ -4202,12 +4403,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -4259,16 +4460,16 @@ }, { "name": "symfony/translation", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca" + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", + "url": "https://api.github.com/repos/symfony/translation/zipball/42ecc77eb4f229ce2df702a648ec93b8478d76ae", + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae", "shasum": "" }, "require": { @@ -4336,7 +4537,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.2" + "source": "https://github.com/symfony/translation/tree/v5.4.12" }, "funding": [ { @@ -4352,20 +4553,20 @@ "type": "tidelift" } ], - "time": "2021-12-25T19:45:36+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", "shasum": "" }, "require": { @@ -4414,7 +4615,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4430,25 +4631,25 @@ "type": "tidelift" } ], - "time": "2021-08-17T14:20:01+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4486,9 +4687,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "wikimedia/assert", @@ -4575,12 +4776,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/" - }, "files": [ "src/Wikimedia/Functions.php" - ] + ], + "psr-4": { + "Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5292,11 +5493,11 @@ }, "type": "library", "autoload": { - "psr-4": { - "Wikimedia\\Minify\\": "src/" - }, "psr-0": { "CSSMin": "src/" + }, + "psr-4": { + "Wikimedia\\Minify\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5995,12 +6196,12 @@ "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/wikimedia/wikimedia-textcat.git", + "url": "https://github.com/wikimedia/textcat.git", "reference": "4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/wikimedia-textcat/zipball/4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", + "url": "https://api.github.com/repos/wikimedia/textcat/zipball/4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", "reference": "4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", "shasum": "" }, @@ -6026,19 +6227,19 @@ "LGPL-2.1-only" ], "authors": [ - { - "name": "Stanislav Malyshev", - "email": "smalyshev@wikimedia.org" - }, { "name": "Trey Jones", "email": "tjones@wikimedia.org" + }, + { + "name": "Stanislav Malyshev", + "email": "smalyshev@wikimedia.org" } ], "description": "PHP port of the TextCat language guesser utility, see http://odur.let.rug.nl/~vannoord/TextCat/.", "homepage": "https://www.mediawiki.org/wiki/TextCat", "support": { - "source": "https://github.com/wikimedia/wikimedia-textcat/tree/master" + "source": "https://github.com/wikimedia/textcat/tree/1.3.0" }, "time": "2019-02-12T05:25:57+00:00" }, @@ -6517,16 +6718,16 @@ "packages-dev": [ { "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", + "version": "1.11.99.5", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { @@ -6570,7 +6771,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -6586,27 +6787,27 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:41:34+00:00" + "time": "2022-01-17T14:14:24+00:00" }, { "name": "composer/pcre", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", "symfony/phpunit-bridge": "^4.2 || ^5" }, @@ -6641,7 +6842,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.0" + "source": "https://github.com/composer/pcre/tree/1.0.1" }, "funding": [ { @@ -6657,7 +6858,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T15:17:27+00:00" + "time": "2022-01-21T20:24:37+00:00" }, { "name": "composer/spdx-licenses", @@ -6740,16 +6941,16 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a" + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", "shasum": "" }, "require": { @@ -6786,7 +6987,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" }, "funding": [ { @@ -6802,7 +7003,7 @@ "type": "tidelift" } ], - "time": "2022-01-04T17:06:45+00:00" + "time": "2022-02-24T20:20:32+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -6843,16 +7044,16 @@ }, { "name": "doctrine/cache", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8" + "reference": "56cd022adb5514472cb144c087393c1821911d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/4cf401d14df219fa6f38b671f5493449151c9ad8", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8", + "url": "https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09", + "reference": "56cd022adb5514472cb144c087393c1821911d09", "shasum": "" }, "require": { @@ -6864,13 +7065,13 @@ "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "predis/predis": "~1.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", - "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -6922,7 +7123,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.12.1" + "source": "https://github.com/doctrine/cache/tree/1.13.0" }, "funding": [ { @@ -6938,7 +7139,7 @@ "type": "tidelift" } ], - "time": "2021-07-17T14:39:21+00:00" + "time": "2022-05-20T20:06:54+00:00" }, { "name": "doctrine/dbal", @@ -7053,34 +7254,31 @@ }, { "name": "doctrine/event-manager", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", + "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { - "doctrine/common": "<2.9@dev" + "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "~1.4.10 || ^1.5.4", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\": "lib/Doctrine/Common" @@ -7127,7 +7325,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + "source": "https://github.com/doctrine/event-manager/tree/1.1.2" }, "funding": [ { @@ -7143,33 +7341,34 @@ "type": "tidelift" } ], - "time": "2020-05-29T18:28:51+00:00" + "time": "2022-07-27T22:18:11+00:00" }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -7196,7 +7395,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -7212,7 +7411,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "doctrine/sql-formatter", @@ -7344,12 +7543,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Eris\\": "src/" - }, "files": [ "src/Generator/functions.php" - ] + ], + "psr-4": { + "Eris\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7693,37 +7892,38 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7739,7 +7939,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -7747,7 +7947,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "netresearch/jsonmapper", @@ -8041,16 +8241,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -8086,9 +8286,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "php-parallel-lint/php-console-color", @@ -8361,16 +8561,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -8405,76 +8605,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8775,16 +8908,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.22", + "version": "8.5.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ddd05b9d844260353895a3b950a9258126c11503" + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ddd05b9d844260353895a3b950a9258126c11503", - "reference": "ddd05b9d844260353895a3b950a9258126c11503", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4fd448df9affda65a5faa58f8b93087d415216ce", + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce", "shasum": "" }, "require": { @@ -8799,24 +8932,20 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", + "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -8856,7 +8985,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.30" }, "funding": [ { @@ -8866,9 +8995,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-12-25T06:58:09+00:00" + "time": "2022-09-25T03:43:00+00:00" }, { "name": "psy/psysh", @@ -8970,14 +9103,14 @@ }, "type": "library", "autoload": { - "psr-4": { - "Sabre\\Event\\": "lib/" - }, "files": [ "lib/coroutine.php", "lib/Loop/functions.php", "lib/Promise/functions.php" - ] + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -9069,16 +9202,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -9131,7 +9264,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -9139,7 +9272,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -9272,16 +9405,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -9337,7 +9470,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -9345,20 +9478,20 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { @@ -9401,7 +9534,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, "funding": [ { @@ -9409,7 +9542,7 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", @@ -9862,16 +9995,16 @@ }, { "name": "symfony/console", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e" + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2c6b7ced2eb7799a35375fb9022519282b5405e", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e", + "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", "shasum": "" }, "require": { @@ -9941,7 +10074,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.2" + "source": "https://github.com/symfony/console/tree/v5.4.12" }, "funding": [ { @@ -9957,20 +10090,20 @@ "type": "tidelift" } ], - "time": "2021-12-20T16:11:12+00:00" + "time": "2022-08-17T13:18:05+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -9982,7 +10115,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -9990,12 +10123,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10022,7 +10155,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -10038,20 +10171,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -10063,7 +10196,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -10071,12 +10204,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -10106,7 +10239,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -10122,26 +10255,26 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -10189,7 +10322,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -10205,20 +10338,20 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d" + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", + "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", "shasum": "" }, "require": { @@ -10240,12 +10373,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -10275,7 +10408,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.2" + "source": "https://github.com/symfony/string/tree/v5.4.12" }, "funding": [ { @@ -10291,20 +10424,20 @@ "type": "tidelift" } ], - "time": "2021-12-16T21:52:00+00:00" + "time": "2022-08-12T17:03:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.2", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1" + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1b56c32c3679002b3a42384a580e16e2600f41c1", - "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", "shasum": "" }, "require": { @@ -10364,7 +10497,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.2" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" }, "funding": [ { @@ -10380,20 +10513,20 @@ "type": "tidelift" } ], - "time": "2021-12-29T10:10:35+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58" + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58", + "url": "https://api.github.com/repos/symfony/yaml/zipball/7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", "shasum": "" }, "require": { @@ -10439,7 +10572,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.2" + "source": "https://github.com/symfony/yaml/tree/v5.4.12" }, "funding": [ { @@ -10455,7 +10588,7 @@ "type": "tidelift" } ], - "time": "2021-12-16T21:58:21+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "theseer/tokenizer", @@ -10509,37 +10642,45 @@ }, { "name": "tysonandre/var_representation_polyfill", - "version": "0.1.1", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/TysonAndre/var_representation_polyfill.git", - "reference": "0a942e74e18af5514749895507bc6ca7ab96399a" + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a", - "reference": "0a942e74e18af5514749895507bc6ca7ab96399a", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.2.0|^8.0.0" }, + "provide": { + "ext-var_representation": "*" + }, "require-dev": { - "phan/phan": "^4.0", + "phan/phan": "^5.4.1", "phpunit/phpunit": "^8.5.0" }, "suggest": { - "ext-var_representation": "*" + "ext-var_representation": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, "autoload": { - "psr-4": { - "VarRepresentation\\": "src/VarRepresentation" - }, "files": [ "src/var_representation.php" - ] + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10557,9 +10698,9 @@ ], "support": { "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", - "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.1" + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" }, - "time": "2021-08-16T00:12:50+00:00" + "time": "2022-08-31T12:59:22+00:00" }, { "name": "wikimedia/testing-access-wrapper", diff --git a/dist/composer.lock b/dist/composer.lock index ab3fe9b67..486a748e4 100644 --- a/dist/composer.lock +++ b/dist/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "clue/stream-filter", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/clue/stream-filter.git", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e", + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e", "shasum": "" }, "require": { @@ -28,12 +28,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "Clue\\StreamFilter\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -58,7 +58,7 @@ ], "support": { "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" }, "funding": [ { @@ -70,7 +70,7 @@ "type": "github" } ], - "time": "2020-10-02T12:38:20+00:00" + "time": "2022-02-21T13:15:14+00:00" }, { "name": "composer/installers", @@ -388,8 +388,8 @@ "autoload": { "psr-4": { "DataValues\\": "src/DataValues/", - "ValueFormatters\\": "src/ValueFormatters/", - "ValueParsers\\": "src/ValueParsers/" + "ValueParsers\\": "src/ValueParsers/", + "ValueFormatters\\": "src/ValueFormatters/" } }, "notification-url": "https://packagist.org/downloads/", @@ -601,8 +601,8 @@ "type": "library", "autoload": { "psr-4": { - "ValueFormatters\\": "src/ValueFormatters/", "ValueParsers\\": "src/ValueParsers/", + "ValueFormatters\\": "src/ValueFormatters/", "ValueValidators\\": "src/ValueValidators/" } }, @@ -665,8 +665,8 @@ ], "psr-0": { "DataValues\\": "src", - "ValueFormatters\\": "src", - "ValueParsers\\": "src" + "ValueParsers\\": "src", + "ValueFormatters\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -793,8 +793,8 @@ "autoload": { "psr-0": { "DataValues\\": "src", - "ValueFormatters\\": "src", - "ValueParsers\\": "src" + "ValueParsers\\": "src", + "ValueFormatters\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1133,16 +1133,16 @@ }, { "name": "firebase/php-jwt", - "version": "v5.2.0", + "version": "v5.5.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb" + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6", + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6", "shasum": "" }, "require": { @@ -1151,6 +1151,9 @@ "require-dev": { "phpunit/phpunit": ">=4.8 <=9" }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, "type": "library", "autoload": { "psr-4": { @@ -1181,9 +1184,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/master" + "source": "https://github.com/firebase/php-jwt/tree/v5.5.1" }, - "time": "2020-03-25T18:49:23+00:00" + "time": "2021-11-08T20:18:51+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1227,12 +1230,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1289,16 +1292,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1314,12 +1317,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1353,7 +1356,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1369,20 +1372,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.3", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { @@ -1403,16 +1406,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1463,7 +1466,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.3" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, "funding": [ { @@ -1479,20 +1482,20 @@ "type": "tidelift" } ], - "time": "2021-10-05T13:56:00+00:00" + "time": "2022-06-20T21:43:03+00:00" }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -1547,9 +1550,9 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-04-13T08:02:27+00:00" }, { "name": "lcobucci/clock", @@ -1614,16 +1617,16 @@ }, { "name": "lcobucci/jwt", - "version": "4.1.5", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/72ac6d807ee51a70ad376ee03a2387e8646e10f3", + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3", "shasum": "" }, "require": { @@ -1639,12 +1642,12 @@ "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, @@ -1672,7 +1675,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.1.5" + "source": "https://github.com/lcobucci/jwt/tree/4.2.1" }, "funding": [ { @@ -1684,7 +1687,7 @@ "type": "patreon" } ], - "time": "2021-09-28T19:34:56+00:00" + "time": "2022-08-19T23:14:07+00:00" }, { "name": "league/event", @@ -1752,8 +1755,9 @@ "defuse/php-encryption": "^2.2.1", "ext-json": "*", "ext-openssl": "*", - "lcobucci/jwt": "^3.4 || ^4.0", + "lcobucci/jwt": "^3.4.6 || ^4.0.4", "league/event": "^2.2", + "league/uri": "^6.4", "php": "^7.2 || ^8.0", "psr/http-message": "^1.0.1" }, @@ -1815,7 +1819,177 @@ "secure", "server" ], - "time": "2021-03-05T01:19:42+00:00" + "time": "2022-08-02T10:31:36+00:00" + }, + { + "name": "league/uri", + "version": "6.7.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/d3b50812dd51f3fbf176344cc2981db03d10fe06", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.7.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2022-09-13T19:50:42+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" + }, + "suggest": { + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2021-06-28T04:27:21+00:00" }, { "name": "liuggio/statsd-php-client", @@ -1873,16 +2047,16 @@ }, { "name": "mailgun/mailgun-php", - "version": "v3.5.1", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/mailgun/mailgun-php.git", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5" + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", + "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/8765ce557c373243ae9604d1d44d86e037bd1018", + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018", "shasum": "" }, "require": { @@ -1896,12 +2070,12 @@ "require-dev": { "nyholm/nsa": "^1.2.1", "nyholm/psr7": "^1.3.1", - "php-http/guzzle7-adapter": "^0.1.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/http-client": "^5.3" }, "suggest": { - "guzzlehttp/psr7": "PSR-7 message implementation that also provides common utility methods", - "php-http/curl-client": "cURL client for PHP-HTTP" + "nyholm/psr7": "PSR-7 message implementation", + "symfony/http-client": "HTTP client" }, "type": "library", "extra": { @@ -1927,9 +2101,9 @@ "description": "The Mailgun SDK provides methods for all API functions.", "support": { "issues": "https://github.com/mailgun/mailgun-php/issues", - "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.1" + "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.4" }, - "time": "2021-08-16T09:57:44+00:00" + "time": "2022-08-25T19:40:50+00:00" }, { "name": "monolog/monolog", @@ -2029,16 +2203,16 @@ }, { "name": "nesbot/carbon", - "version": "2.55.2", + "version": "2.62.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2" + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8c2a18ce3e67c34efc1b29f64fe61304368259a2", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", "shasum": "" }, "require": { @@ -2053,10 +2227,12 @@ "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -2113,28 +2289,32 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2021-12-03T14:59:52+00:00" + "time": "2022-09-02T07:48:13+00:00" }, { "name": "nyholm/psr7", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec" + "reference": "f734364e38a876a23be4d906a2a089e1315be18a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/2212385b47153ea71b1c1b1374f8cb5e4f7892ec", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", + "reference": "f734364e38a876a23be4d906a2a089e1315be18a", "shasum": "" }, "require": { @@ -2186,7 +2366,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.4.1" + "source": "https://github.com/Nyholm/psr7/tree/1.5.1" }, "funding": [ { @@ -2198,7 +2378,7 @@ "type": "github" } ], - "time": "2021-07-02T08:32:20+00:00" + "time": "2022-06-22T07:13:36+00:00" }, { "name": "onoi/message-reporter", @@ -2937,16 +3117,16 @@ }, { "name": "php-http/discovery", - "version": "1.14.1", + "version": "1.14.3", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", + "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735", + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735", "shasum": "" }, "require": { @@ -2959,8 +3139,7 @@ "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1", - "puli/composer-plugin": "1.0.0-beta10" + "phpspec/phpspec": "^5.1 || ^6.1" }, "suggest": { "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" @@ -2999,22 +3178,22 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.1" + "source": "https://github.com/php-http/discovery/tree/1.14.3" }, - "time": "2021-09-18T07:57:46+00:00" + "time": "2022-07-11T14:04:40+00:00" }, { "name": "php-http/httplug", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + "reference": "f640739f80dfa1152533976e3c112477f69274eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", + "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, "require": { @@ -3061,22 +3240,22 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/master" + "source": "https://github.com/php-http/httplug/tree/2.3.0" }, - "time": "2020-07-13T15:43:23+00:00" + "time": "2022-02-21T09:52:22+00:00" }, { "name": "php-http/message", - "version": "1.12.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", + "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", "shasum": "" }, "require": { @@ -3093,7 +3272,7 @@ "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", "laminas/laminas-diactoros": "^2.0", - "phpspec/phpspec": "^5.1 || ^6.3", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, "suggest": { @@ -3109,12 +3288,12 @@ } }, "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, "files": [ "src/filters.php" - ] + ], + "psr-4": { + "Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3135,9 +3314,9 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.12.0" + "source": "https://github.com/php-http/message/tree/1.13.0" }, - "time": "2021-08-29T09:13:12+00:00" + "time": "2022-02-11T13:41:14+00:00" }, { "name": "php-http/message-factory", @@ -3365,16 +3544,16 @@ }, { "name": "professional-wiki/edtf", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/ProfessionalWiki/EDTF.git", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4" + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", + "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/2cebb350e0b703d202e6a3a31daf15aa2adb88a7", + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7", "shasum": "" }, "require": { @@ -3413,19 +3592,15 @@ "description": "PHP library to parse, represent and work with dates that follow the Extended Date/Time Format specification.", "support": { "issues": "https://github.com/ProfessionalWiki/EDTF/issues", - "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.0" + "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.2" }, "funding": [ { "url": "https://github.com/JeroenDeDauw", "type": "github" - }, - { - "url": "https://www.patreon.com/jeroendedauw", - "type": "patreon" } ], - "time": "2021-04-28T13:37:17+00:00" + "time": "2022-04-29T13:08:22+00:00" }, { "name": "psr/container", @@ -3782,32 +3957,32 @@ }, { "name": "react/promise", - "version": "v2.8.0", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3816,7 +3991,23 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", @@ -3826,9 +4017,19 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" + "source": "https://github.com/reactphp/promise/tree/v2.9.0" }, - "time": "2020-05-12T15:16:56+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-11T10:27:51+00:00" }, { "name": "ruflin/elastica", @@ -3927,8 +4128,8 @@ }, "autoload": { "psr-4": { - "Deserializers\\": "src/Deserializers/", - "Serializers\\": "src/Serializers/" + "Serializers\\": "src/Serializers/", + "Deserializers\\": "src/Deserializers/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3961,16 +4162,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -4008,7 +4209,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4024,20 +4225,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.0", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847" + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b0fb78576487af19c500aaddb269fd36701d4847", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", "shasum": "" }, "require": { @@ -4077,7 +4278,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" }, "funding": [ { @@ -4093,20 +4294,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T10:19:22+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -4115,7 +4316,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4123,12 +4324,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -4156,7 +4357,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4172,7 +4373,7 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", @@ -4202,12 +4403,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -4259,16 +4460,16 @@ }, { "name": "symfony/translation", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca" + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", + "url": "https://api.github.com/repos/symfony/translation/zipball/42ecc77eb4f229ce2df702a648ec93b8478d76ae", + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae", "shasum": "" }, "require": { @@ -4336,7 +4537,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.2" + "source": "https://github.com/symfony/translation/tree/v5.4.12" }, "funding": [ { @@ -4352,20 +4553,20 @@ "type": "tidelift" } ], - "time": "2021-12-25T19:45:36+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", "shasum": "" }, "require": { @@ -4414,7 +4615,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4430,25 +4631,25 @@ "type": "tidelift" } ], - "time": "2021-08-17T14:20:01+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4486,9 +4687,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "wikimedia/assert", @@ -4575,12 +4776,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/" - }, "files": [ "src/Wikimedia/Functions.php" - ] + ], + "psr-4": { + "Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5292,11 +5493,11 @@ }, "type": "library", "autoload": { - "psr-4": { - "Wikimedia\\Minify\\": "src/" - }, "psr-0": { "CSSMin": "src/" + }, + "psr-4": { + "Wikimedia\\Minify\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5995,12 +6196,12 @@ "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/wikimedia/wikimedia-textcat.git", + "url": "https://github.com/wikimedia/textcat.git", "reference": "4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/wikimedia-textcat/zipball/4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", + "url": "https://api.github.com/repos/wikimedia/textcat/zipball/4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", "reference": "4f13aed2b32382c9d2fe9dc8b3e3fbb26ea4a2a9", "shasum": "" }, @@ -6026,19 +6227,19 @@ "LGPL-2.1-only" ], "authors": [ - { - "name": "Stanislav Malyshev", - "email": "smalyshev@wikimedia.org" - }, { "name": "Trey Jones", "email": "tjones@wikimedia.org" + }, + { + "name": "Stanislav Malyshev", + "email": "smalyshev@wikimedia.org" } ], "description": "PHP port of the TextCat language guesser utility, see http://odur.let.rug.nl/~vannoord/TextCat/.", "homepage": "https://www.mediawiki.org/wiki/TextCat", "support": { - "source": "https://github.com/wikimedia/wikimedia-textcat/tree/master" + "source": "https://github.com/wikimedia/textcat/tree/1.3.0" }, "time": "2019-02-12T05:25:57+00:00" }, @@ -6517,16 +6718,16 @@ "packages-dev": [ { "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", + "version": "1.11.99.5", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { @@ -6570,7 +6771,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -6586,27 +6787,27 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:41:34+00:00" + "time": "2022-01-17T14:14:24+00:00" }, { "name": "composer/pcre", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", "symfony/phpunit-bridge": "^4.2 || ^5" }, @@ -6641,7 +6842,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.0" + "source": "https://github.com/composer/pcre/tree/1.0.1" }, "funding": [ { @@ -6657,7 +6858,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T15:17:27+00:00" + "time": "2022-01-21T20:24:37+00:00" }, { "name": "composer/spdx-licenses", @@ -6740,16 +6941,16 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a" + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", "shasum": "" }, "require": { @@ -6786,7 +6987,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" }, "funding": [ { @@ -6802,7 +7003,7 @@ "type": "tidelift" } ], - "time": "2022-01-04T17:06:45+00:00" + "time": "2022-02-24T20:20:32+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -6843,16 +7044,16 @@ }, { "name": "doctrine/cache", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8" + "reference": "56cd022adb5514472cb144c087393c1821911d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/4cf401d14df219fa6f38b671f5493449151c9ad8", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8", + "url": "https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09", + "reference": "56cd022adb5514472cb144c087393c1821911d09", "shasum": "" }, "require": { @@ -6864,13 +7065,13 @@ "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "predis/predis": "~1.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", - "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -6922,7 +7123,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.12.1" + "source": "https://github.com/doctrine/cache/tree/1.13.0" }, "funding": [ { @@ -6938,7 +7139,7 @@ "type": "tidelift" } ], - "time": "2021-07-17T14:39:21+00:00" + "time": "2022-05-20T20:06:54+00:00" }, { "name": "doctrine/dbal", @@ -7053,34 +7254,31 @@ }, { "name": "doctrine/event-manager", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", + "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { - "doctrine/common": "<2.9@dev" + "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "~1.4.10 || ^1.5.4", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\": "lib/Doctrine/Common" @@ -7127,7 +7325,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + "source": "https://github.com/doctrine/event-manager/tree/1.1.2" }, "funding": [ { @@ -7143,33 +7341,34 @@ "type": "tidelift" } ], - "time": "2020-05-29T18:28:51+00:00" + "time": "2022-07-27T22:18:11+00:00" }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -7196,7 +7395,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -7212,7 +7411,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "doctrine/sql-formatter", @@ -7344,12 +7543,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Eris\\": "src/" - }, "files": [ "src/Generator/functions.php" - ] + ], + "psr-4": { + "Eris\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7693,37 +7892,38 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7739,7 +7939,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -7747,7 +7947,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "netresearch/jsonmapper", @@ -8041,16 +8241,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -8086,9 +8286,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "php-parallel-lint/php-console-color", @@ -8361,16 +8561,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -8405,76 +8605,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8775,16 +8908,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.22", + "version": "8.5.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ddd05b9d844260353895a3b950a9258126c11503" + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ddd05b9d844260353895a3b950a9258126c11503", - "reference": "ddd05b9d844260353895a3b950a9258126c11503", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4fd448df9affda65a5faa58f8b93087d415216ce", + "reference": "4fd448df9affda65a5faa58f8b93087d415216ce", "shasum": "" }, "require": { @@ -8799,24 +8932,20 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", + "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -8856,7 +8985,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.30" }, "funding": [ { @@ -8866,9 +8995,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-12-25T06:58:09+00:00" + "time": "2022-09-25T03:43:00+00:00" }, { "name": "psy/psysh", @@ -8970,14 +9103,14 @@ }, "type": "library", "autoload": { - "psr-4": { - "Sabre\\Event\\": "lib/" - }, "files": [ "lib/coroutine.php", "lib/Loop/functions.php", "lib/Promise/functions.php" - ] + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -9069,16 +9202,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -9131,7 +9264,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -9139,7 +9272,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -9272,16 +9405,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -9337,7 +9470,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -9345,20 +9478,20 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { @@ -9401,7 +9534,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, "funding": [ { @@ -9409,7 +9542,7 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", @@ -9862,16 +9995,16 @@ }, { "name": "symfony/console", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e" + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2c6b7ced2eb7799a35375fb9022519282b5405e", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e", + "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", "shasum": "" }, "require": { @@ -9941,7 +10074,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.2" + "source": "https://github.com/symfony/console/tree/v5.4.12" }, "funding": [ { @@ -9957,20 +10090,20 @@ "type": "tidelift" } ], - "time": "2021-12-20T16:11:12+00:00" + "time": "2022-08-17T13:18:05+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -9982,7 +10115,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -9990,12 +10123,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10022,7 +10155,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -10038,20 +10171,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -10063,7 +10196,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -10071,12 +10204,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -10106,7 +10239,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -10122,26 +10255,26 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -10189,7 +10322,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -10205,20 +10338,20 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d" + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", + "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", "shasum": "" }, "require": { @@ -10240,12 +10373,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -10275,7 +10408,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.2" + "source": "https://github.com/symfony/string/tree/v5.4.12" }, "funding": [ { @@ -10291,20 +10424,20 @@ "type": "tidelift" } ], - "time": "2021-12-16T21:52:00+00:00" + "time": "2022-08-12T17:03:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.2", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1" + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1b56c32c3679002b3a42384a580e16e2600f41c1", - "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", "shasum": "" }, "require": { @@ -10364,7 +10497,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.2" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" }, "funding": [ { @@ -10380,20 +10513,20 @@ "type": "tidelift" } ], - "time": "2021-12-29T10:10:35+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.2", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58" + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58", + "url": "https://api.github.com/repos/symfony/yaml/zipball/7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", "shasum": "" }, "require": { @@ -10439,7 +10572,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.2" + "source": "https://github.com/symfony/yaml/tree/v5.4.12" }, "funding": [ { @@ -10455,7 +10588,7 @@ "type": "tidelift" } ], - "time": "2021-12-16T21:58:21+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "theseer/tokenizer", @@ -10509,37 +10642,45 @@ }, { "name": "tysonandre/var_representation_polyfill", - "version": "0.1.1", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/TysonAndre/var_representation_polyfill.git", - "reference": "0a942e74e18af5514749895507bc6ca7ab96399a" + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a", - "reference": "0a942e74e18af5514749895507bc6ca7ab96399a", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.2.0|^8.0.0" }, + "provide": { + "ext-var_representation": "*" + }, "require-dev": { - "phan/phan": "^4.0", + "phan/phan": "^5.4.1", "phpunit/phpunit": "^8.5.0" }, "suggest": { - "ext-var_representation": "*" + "ext-var_representation": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, "autoload": { - "psr-4": { - "VarRepresentation\\": "src/VarRepresentation" - }, "files": [ "src/var_representation.php" - ] + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10557,9 +10698,9 @@ ], "support": { "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", - "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.1" + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" }, - "time": "2021-08-16T00:12:50+00:00" + "time": "2022-08-31T12:59:22+00:00" }, { "name": "wikimedia/testing-access-wrapper", diff --git a/dist/vendor/autoload.php b/dist/vendor/autoload.php index aca89aeb3..6d83e9260 100644 --- a/dist/vendor/autoload.php +++ b/dist/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitcaa98657d744543fb963672146b9911d::getLoader(); +return ComposerAutoloaderInit9d4c4aa5af74f93fb7d21ea4ad148f60::getLoader(); diff --git a/dist/vendor/clue/stream-filter/CHANGELOG.md b/dist/vendor/clue/stream-filter/CHANGELOG.md index 12f5a4ef2..e6ae94b58 100644 --- a/dist/vendor/clue/stream-filter/CHANGELOG.md +++ b/dist/vendor/clue/stream-filter/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 1.6.0 (2022-02-21) + +* Feature: Support PHP 8.1 release. + (#45 by @clue) + +* Improve documentation to use fully-qualified function names. + (#43 by @SimonFrings and #42 by @PaulRotmann) + +* Improve test suite and use GitHub actions for continuous integration (CI). + (#39 and #40 by @SimonFrings) + ## 1.5.0 (2020-10-02) * Feature: Improve performance by using global imports. diff --git a/dist/vendor/clue/stream-filter/README.md b/dist/vendor/clue/stream-filter/README.md index 861f2b852..4196c2cc9 100644 --- a/dist/vendor/clue/stream-filter/README.md +++ b/dist/vendor/clue/stream-filter/README.md @@ -1,4 +1,7 @@ -# clue/stream-filter [![Build Status](https://travis-ci.org/clue/php-stream-filter.svg?branch=master)](https://travis-ci.org/clue/php-stream-filter) +# clue/stream-filter + +[![CI status](https://github.com/clue/stream-filter/workflows/CI/badge.svg)](https://github.com/clue/stream-filter/actions) +[![installs on Packagist](https://img.shields.io/packagist/dt/clue/stream-filter?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/stream-filter) A simple and modern approach to stream filtering in PHP @@ -7,10 +10,10 @@ A simple and modern approach to stream filtering in PHP * [Why?](#why) * [Support us](#support-us) * [Usage](#usage) - * [append()](#append) - * [prepend()](#prepend) - * [fun()](#fun) - * [remove()](#remove) + * [append()](#append) + * [prepend()](#prepend) + * [fun()](#fun) + * [remove()](#remove) * [Install](#install) * [Tests](#tests) * [License](#license) @@ -55,26 +58,26 @@ Let's take these projects to the next level together! 🚀 This lightweight library consists only of a few simple functions. All functions reside under the `Clue\StreamFilter` namespace. -The below examples assume you use an import statement similar to this: +The below examples refer to all functions with their fully-qualified names like this: ```php -use Clue\StreamFilter as Filter; - -Filter\append(…); +Clue\StreamFilter\append(…); ``` -Alternatively, you can also refer to them with their fully-qualified name: +As of PHP 5.6+ you can also import each required function into your code like this: ```php -\Clue\StreamFilter\append(…); +use function Clue\StreamFilter\append; + +append(…); ``` -As of PHP 5.6+ you can also import each required function into your code like this: +Alternatively, you can also use an import statement similar to this: ```php -use function Clue\StreamFilter\append; +use Clue\StreamFilter as Filter; -append(…); +Filter\append(…); ``` ### append() @@ -97,7 +100,7 @@ The `$callback` should be a valid callable function which accepts an individual chunk of data and should return the updated chunk: ```php -$filter = Filter\append($stream, function ($chunk) { +$filter = Clue\StreamFilter\append($stream, function ($chunk) { // will be called each time you read or write a $chunk to/from the stream return $chunk; }); @@ -106,7 +109,7 @@ $filter = Filter\append($stream, function ($chunk) { As such, you can also use native PHP functions or any other `callable`: ```php -Filter\append($stream, 'strtoupper'); +Clue\StreamFilter\append($stream, 'strtoupper'); // will write "HELLO" to the underlying stream fwrite($stream, 'hello'); @@ -116,7 +119,7 @@ If the `$callback` accepts invocation without parameters, then this signature will be invoked once ending (flushing) the filter: ```php -Filter\append($stream, function ($chunk = null) { +Clue\StreamFilter\append($stream, function ($chunk = null) { if ($chunk === null) { // will be called once ending the filter return 'end'; @@ -136,7 +139,7 @@ In order to play nice with PHP's stream handling, the `Exception` will be transformed to a PHP warning instead: ```php -Filter\append($stream, function ($chunk) { +Clue\StreamFilter\append($stream, function ($chunk) { throw new \RuntimeException('Unexpected chunk'); }); @@ -148,12 +151,12 @@ The optional `$read_write` parameter can be used to only invoke the `$callback` when either writing to the stream or only when reading from the stream: ```php -Filter\append($stream, function ($chunk) { +Clue\StreamFilter\append($stream, function ($chunk) { // will be called each time you write to the stream return $chunk; }, STREAM_FILTER_WRITE); -Filter\append($stream, function ($chunk) { +Clue\StreamFilter\append($stream, function ($chunk) { // will be called each time you read from the stream return $chunk; }, STREAM_FILTER_READ); @@ -183,7 +186,7 @@ This function prepends a filter to the start of this list. If the given filter can not be added, it throws an `Exception`. ```php -$filter = Filter\prepend($stream, function ($chunk) { +$filter = Clue\StreamFilter\prepend($stream, function ($chunk) { // will be called each time you read or write a $chunk to/from the stream return $chunk; }); @@ -205,7 +208,7 @@ Using `fun()` makes accessing these as easy as passing an input string to filter and getting the filtered output string. ```php -$fun = Filter\fun('string.rot13'); +$fun = Clue\StreamFilter\fun('string.rot13'); assert('grfg' === $fun('test')); assert('test' === $fun($fun('test')); @@ -218,7 +221,7 @@ or parameters as Zend PHP. Accessing an unknown filter function will result in a `RuntimeException`: ```php -Filter\fun('unknown'); // throws RuntimeException +Clue\StreamFilter\fun('unknown'); // throws RuntimeException ``` Some filters may accept or require additional filter parameters – most @@ -231,7 +234,7 @@ Please refer to the individual filter definition for more details. For example, the `string.strip_tags` filter can be invoked like this: ```php -$fun = Filter\fun('string.strip_tags', ''); +$fun = Clue\StreamFilter\fun('string.strip_tags', ''); $ret = $fun('h
i
'); assert('hi' === $ret); @@ -245,7 +248,7 @@ may use internal buffers and may emit a final data chunk on close. The filter function can be closed by invoking without any arguments: ```php -$fun = Filter\fun('zlib.deflate'); +$fun = Clue\StreamFilter\fun('zlib.deflate'); $ret = $fun('hello') . $fun('world') . $fun(); assert('helloworld' === gzinflate($ret)); @@ -255,7 +258,7 @@ The filter function must not be used anymore after it has been closed. Doing so will result in a `RuntimeException`: ```php -$fun = Filter\fun('string.rot13'); +$fun = Clue\StreamFilter\fun('string.rot13'); $fun(); $fun('test'); // throws RuntimeException @@ -274,36 +277,36 @@ The `remove(resource $filter): bool` function can be used to remove a filter previously added via [`append()`](#append) or [`prepend()`](#prepend). ```php -$filter = Filter\append($stream, function () { +$filter = Clue\StreamFilter\append($stream, function () { // … }); -Filter\remove($filter); +Clue\StreamFilter\remove($filter); ``` ## Install -The recommended way to install this library is [through Composer](https://getcomposer.org). +The recommended way to install this library is [through Composer](https://getcomposer.org/). [New to Composer?](https://getcomposer.org/doc/00-intro.md) This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require clue/stream-filter:^1.5 +$ composer require clue/stream-filter:^1.6 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP -extensions and supports running on legacy PHP 5.3 through current PHP 7+ and +extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM. -It's *highly recommended to use PHP 7+* for this project. +It's *highly recommended to use the latest supported PHP version* for this project. Older PHP versions may suffer from a number of inconsistencies documented above. ## Tests To run the test suite, you first need to clone this repo and then install all -dependencies [through Composer](https://getcomposer.org): +dependencies [through Composer](https://getcomposer.org/): ```bash $ composer install @@ -312,7 +315,7 @@ $ composer install To run the test suite, go to the project root and run: ```bash -$ php vendor/bin/phpunit +$ vendor/bin/phpunit ``` ## License diff --git a/dist/vendor/clue/stream-filter/src/CallbackFilter.php b/dist/vendor/clue/stream-filter/src/CallbackFilter.php index 1ca074b6c..a667fe68b 100644 --- a/dist/vendor/clue/stream-filter/src/CallbackFilter.php +++ b/dist/vendor/clue/stream-filter/src/CallbackFilter.php @@ -13,6 +13,8 @@ class CallbackFilter extends \php_user_filter private $closed = true; private $supportsClose = false; + /** @return bool */ + #[\ReturnTypeWillChange] public function onCreate() { $this->closed = false; @@ -29,6 +31,8 @@ public function onCreate() return true; } + /** @return void */ + #[\ReturnTypeWillChange] public function onClose() { $this->closed = true; @@ -49,6 +53,8 @@ public function onClose() $this->callback = null; } + /** @return int */ + #[\ReturnTypeWillChange] public function filter($in, $out, &$consumed, $closing) { // concatenate whole buffer from input brigade diff --git a/dist/vendor/clue/stream-filter/src/functions.php b/dist/vendor/clue/stream-filter/src/functions.php index 4746d887a..cad88a29a 100644 --- a/dist/vendor/clue/stream-filter/src/functions.php +++ b/dist/vendor/clue/stream-filter/src/functions.php @@ -20,7 +20,7 @@ * an individual chunk of data and should return the updated chunk: * * ```php - * $filter = Filter\append($stream, function ($chunk) { + * $filter = Clue\StreamFilter\append($stream, function ($chunk) { * // will be called each time you read or write a $chunk to/from the stream * return $chunk; * }); @@ -29,7 +29,7 @@ * As such, you can also use native PHP functions or any other `callable`: * * ```php - * Filter\append($stream, 'strtoupper'); + * Clue\StreamFilter\append($stream, 'strtoupper'); * * // will write "HELLO" to the underlying stream * fwrite($stream, 'hello'); @@ -39,7 +39,7 @@ * then this signature will be invoked once ending (flushing) the filter: * * ```php - * Filter\append($stream, function ($chunk = null) { + * Clue\StreamFilter\append($stream, function ($chunk = null) { * if ($chunk === null) { * // will be called once ending the filter * return 'end'; @@ -59,7 +59,7 @@ * the `Exception` will be transformed to a PHP warning instead: * * ```php - * Filter\append($stream, function ($chunk) { + * Clue\StreamFilter\append($stream, function ($chunk) { * throw new \RuntimeException('Unexpected chunk'); * }); * @@ -71,12 +71,12 @@ * when either writing to the stream or only when reading from the stream: * * ```php - * Filter\append($stream, function ($chunk) { + * Clue\StreamFilter\append($stream, function ($chunk) { * // will be called each time you write to the stream * return $chunk; * }, STREAM_FILTER_WRITE); * - * Filter\append($stream, function ($chunk) { + * Clue\StreamFilter\append($stream, function ($chunk) { * // will be called each time you read from the stream * return $chunk; * }, STREAM_FILTER_READ); @@ -126,7 +126,7 @@ function append($stream, $callback, $read_write = STREAM_FILTER_ALL) * If the given filter can not be added, it throws an `Exception`. * * ```php - * $filter = Filter\prepend($stream, function ($chunk) { + * $filter = Clue\StreamFilter\prepend($stream, function ($chunk) { * // will be called each time you read or write a $chunk to/from the stream * return $chunk; * }); @@ -168,7 +168,7 @@ function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) * and getting the filtered output string. * * ```php - * $fun = Filter\fun('string.rot13'); + * $fun = Clue\StreamFilter\fun('string.rot13'); * * assert('grfg' === $fun('test')); * assert('test' === $fun($fun('test')); @@ -181,7 +181,7 @@ function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) * Accessing an unknown filter function will result in a `RuntimeException`: * * ```php - * Filter\fun('unknown'); // throws RuntimeException + * Clue\StreamFilter\fun('unknown'); // throws RuntimeException * ``` * * Some filters may accept or require additional filter parameters – most @@ -194,7 +194,7 @@ function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) * For example, the `string.strip_tags` filter can be invoked like this: * * ```php - * $fun = Filter\fun('string.strip_tags', '
'); + * $fun = Clue\StreamFilter\fun('string.strip_tags', ''); * * $ret = $fun('h
i
'); * assert('hi' === $ret); @@ -208,7 +208,7 @@ function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) * The filter function can be closed by invoking without any arguments: * * ```php - * $fun = Filter\fun('zlib.deflate'); + * $fun = Clue\StreamFilter\fun('zlib.deflate'); * * $ret = $fun('hello') . $fun('world') . $fun(); * assert('helloworld' === gzinflate($ret)); @@ -218,7 +218,7 @@ function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) * Doing so will result in a `RuntimeException`: * * ```php - * $fun = Filter\fun('string.rot13'); + * $fun = Clue\StreamFilter\fun('string.rot13'); * $fun(); * * $fun('test'); // throws RuntimeException @@ -288,10 +288,10 @@ function fun($filter, $parameters = null) * Remove a filter previously added via `append()` or `prepend()`. * * ```php - * $filter = Filter\append($stream, function () { + * $filter = Clue\StreamFilter\append($stream, function () { * // … * }); - * Filter\remove($filter); + * Clue\StreamFilter\remove($filter); * ``` * * @param resource $filter diff --git a/dist/vendor/composer/autoload_classmap.php b/dist/vendor/composer/autoload_classmap.php index 297494753..3f80d10c0 100644 --- a/dist/vendor/composer/autoload_classmap.php +++ b/dist/vendor/composer/autoload_classmap.php @@ -35,6 +35,7 @@ 'Carbon\\Exceptions\\BadFluentConstructorException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php', 'Carbon\\Exceptions\\BadFluentSetterException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php', 'Carbon\\Exceptions\\BadMethodCallException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php', + 'Carbon\\Exceptions\\EndLessPeriodException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php', 'Carbon\\Exceptions\\Exception' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/Exception.php', 'Carbon\\Exceptions\\ImmutableException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php', 'Carbon\\Exceptions\\InvalidArgumentException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php', @@ -63,6 +64,7 @@ 'Carbon\\FactoryImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/FactoryImmutable.php', 'Carbon\\Language' => $vendorDir . '/nesbot/carbon/src/Carbon/Language.php', 'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', + 'Carbon\\PHPStan\\AbstractMacro' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 'Carbon\\PHPStan\\Macro' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', 'Carbon\\PHPStan\\MacroExtension' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php', 'Carbon\\PHPStan\\MacroScanner' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php', @@ -90,6 +92,7 @@ 'Carbon\\Traits\\Units' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Units.php', 'Carbon\\Traits\\Week' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Week.php', 'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\TranslatorImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/TranslatorImmutable.php', 'Carbon\\TranslatorStrongTypeInterface' => $vendorDir . '/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php', 'Cdb\\Exception' => $vendorDir . '/wikimedia/cdb/src/Exception.php', 'Cdb\\Reader' => $vendorDir . '/wikimedia/cdb/src/Reader.php', @@ -912,6 +915,7 @@ 'Firebase\\JWT\\ExpiredException' => $vendorDir . '/firebase/php-jwt/src/ExpiredException.php', 'Firebase\\JWT\\JWK' => $vendorDir . '/firebase/php-jwt/src/JWK.php', 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php', + 'Firebase\\JWT\\Key' => $vendorDir . '/firebase/php-jwt/src/Key.php', 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . '/firebase/php-jwt/src/SignatureInvalidException.php', 'GuzzleHttp\\BodySummarizer' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizer.php', 'GuzzleHttp\\BodySummarizerInterface' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', @@ -987,6 +991,7 @@ 'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php', 'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php', 'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => $vendorDir . '/guzzlehttp/psr7/src/UriComparator.php', 'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php', 'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php', 'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php', @@ -1245,8 +1250,10 @@ 'Lcobucci\\JWT\\Encoding\\UnifyAudience' => $vendorDir . '/lcobucci/jwt/src/Encoding/UnifyAudience.php', 'Lcobucci\\JWT\\Encoding\\UnixTimestampDates' => $vendorDir . '/lcobucci/jwt/src/Encoding/UnixTimestampDates.php', 'Lcobucci\\JWT\\Exception' => $vendorDir . '/lcobucci/jwt/src/Exception.php', + 'Lcobucci\\JWT\\JwtFacade' => $vendorDir . '/lcobucci/jwt/src/JwtFacade.php', 'Lcobucci\\JWT\\Parser' => $vendorDir . '/lcobucci/jwt/src/Parser.php', 'Lcobucci\\JWT\\Signer' => $vendorDir . '/lcobucci/jwt/src/Signer.php', + 'Lcobucci\\JWT\\Signer\\Blake2b' => $vendorDir . '/lcobucci/jwt/src/Signer/Blake2b.php', 'Lcobucci\\JWT\\Signer\\CannotSignPayload' => $vendorDir . '/lcobucci/jwt/src/Signer/CannotSignPayload.php', 'Lcobucci\\JWT\\Signer\\Ecdsa' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\ConversionFailed' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/ConversionFailed.php', @@ -1255,11 +1262,17 @@ 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\SignatureConverter' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha512.php', 'Lcobucci\\JWT\\Signer\\Eddsa' => $vendorDir . '/lcobucci/jwt/src/Signer/Eddsa.php', 'Lcobucci\\JWT\\Signer\\Hmac' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha256.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha384.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha512.php', 'Lcobucci\\JWT\\Signer\\InvalidKeyProvided' => $vendorDir . '/lcobucci/jwt/src/Signer/InvalidKeyProvided.php', 'Lcobucci\\JWT\\Signer\\Key' => $vendorDir . '/lcobucci/jwt/src/Signer/Key.php', 'Lcobucci\\JWT\\Signer\\Key\\FileCouldNotBeRead' => $vendorDir . '/lcobucci/jwt/src/Signer/Key/FileCouldNotBeRead.php', @@ -1271,6 +1284,11 @@ 'Lcobucci\\JWT\\Signer\\Rsa\\Sha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha512.php', + 'Lcobucci\\JWT\\Signer\\UnsafeEcdsa' => $vendorDir . '/lcobucci/jwt/src/Signer/UnsafeEcdsa.php', + 'Lcobucci\\JWT\\Signer\\UnsafeRsa' => $vendorDir . '/lcobucci/jwt/src/Signer/UnsafeRsa.php', 'Lcobucci\\JWT\\SodiumBase64Polyfill' => $vendorDir . '/lcobucci/jwt/src/SodiumBase64Polyfill.php', 'Lcobucci\\JWT\\Token' => $vendorDir . '/lcobucci/jwt/src/Token.php', 'Lcobucci\\JWT\\Token\\Builder' => $vendorDir . '/lcobucci/jwt/src/Token/Builder.php', @@ -1285,6 +1303,8 @@ 'Lcobucci\\JWT\\UnencryptedToken' => $vendorDir . '/lcobucci/jwt/src/UnencryptedToken.php', 'Lcobucci\\JWT\\Validation\\Constraint' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint.php', 'Lcobucci\\JWT\\Validation\\ConstraintViolation' => $vendorDir . '/lcobucci/jwt/src/Validation/ConstraintViolation.php', + 'Lcobucci\\JWT\\Validation\\Constraint\\CannotValidateARegisteredClaim' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/CannotValidateARegisteredClaim.php', + 'Lcobucci\\JWT\\Validation\\Constraint\\HasClaimWithValue' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/HasClaimWithValue.php', 'Lcobucci\\JWT\\Validation\\Constraint\\IdentifiedBy' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php', 'Lcobucci\\JWT\\Validation\\Constraint\\IssuedBy' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php', 'Lcobucci\\JWT\\Validation\\Constraint\\LeewayCannotBeNegative' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/LeewayCannotBeNegative.php', @@ -1296,6 +1316,8 @@ 'Lcobucci\\JWT\\Validation\\Constraint\\ValidAt' => $vendorDir . '/lcobucci/jwt/src/Validation/Constraint/ValidAt.php', 'Lcobucci\\JWT\\Validation\\NoConstraintsGiven' => $vendorDir . '/lcobucci/jwt/src/Validation/NoConstraintsGiven.php', 'Lcobucci\\JWT\\Validation\\RequiredConstraintsViolated' => $vendorDir . '/lcobucci/jwt/src/Validation/RequiredConstraintsViolated.php', + 'Lcobucci\\JWT\\Validation\\SignedWith' => $vendorDir . '/lcobucci/jwt/src/Validation/SignedWith.php', + 'Lcobucci\\JWT\\Validation\\ValidAt' => $vendorDir . '/lcobucci/jwt/src/Validation/ValidAt.php', 'Lcobucci\\JWT\\Validation\\Validator' => $vendorDir . '/lcobucci/jwt/src/Validation/Validator.php', 'Lcobucci\\JWT\\Validator' => $vendorDir . '/lcobucci/jwt/src/Validator.php', 'League\\Event\\AbstractEvent' => $vendorDir . '/league/event/src/AbstractEvent.php', @@ -1368,6 +1390,38 @@ 'League\\OAuth2\\Server\\ResponseTypes\\BearerTokenResponse' => $vendorDir . '/league/oauth2-server/src/ResponseTypes/BearerTokenResponse.php', 'League\\OAuth2\\Server\\ResponseTypes\\RedirectResponse' => $vendorDir . '/league/oauth2-server/src/ResponseTypes/RedirectResponse.php', 'League\\OAuth2\\Server\\ResponseTypes\\ResponseTypeInterface' => $vendorDir . '/league/oauth2-server/src/ResponseTypes/ResponseTypeInterface.php', + 'League\\Uri\\Contracts\\AuthorityInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/AuthorityInterface.php', + 'League\\Uri\\Contracts\\DataPathInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/DataPathInterface.php', + 'League\\Uri\\Contracts\\DomainHostInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/DomainHostInterface.php', + 'League\\Uri\\Contracts\\FragmentInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/FragmentInterface.php', + 'League\\Uri\\Contracts\\HostInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/HostInterface.php', + 'League\\Uri\\Contracts\\IpHostInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/IpHostInterface.php', + 'League\\Uri\\Contracts\\PathInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/PathInterface.php', + 'League\\Uri\\Contracts\\PortInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/PortInterface.php', + 'League\\Uri\\Contracts\\QueryInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/QueryInterface.php', + 'League\\Uri\\Contracts\\SegmentedPathInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php', + 'League\\Uri\\Contracts\\UriComponentInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/UriComponentInterface.php', + 'League\\Uri\\Contracts\\UriException' => $vendorDir . '/league/uri-interfaces/src/Contracts/UriException.php', + 'League\\Uri\\Contracts\\UriInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/UriInterface.php', + 'League\\Uri\\Contracts\\UserInfoInterface' => $vendorDir . '/league/uri-interfaces/src/Contracts/UserInfoInterface.php', + 'League\\Uri\\Exceptions\\FileinfoSupportMissing' => $vendorDir . '/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php', + 'League\\Uri\\Exceptions\\IdnSupportMissing' => $vendorDir . '/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php', + 'League\\Uri\\Exceptions\\IdnaConversionFailed' => $vendorDir . '/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php', + 'League\\Uri\\Exceptions\\SyntaxError' => $vendorDir . '/league/uri-interfaces/src/Exceptions/SyntaxError.php', + 'League\\Uri\\Exceptions\\TemplateCanNotBeExpanded' => $vendorDir . '/league/uri/src/Exceptions/TemplateCanNotBeExpanded.php', + 'League\\Uri\\Http' => $vendorDir . '/league/uri/src/Http.php', + 'League\\Uri\\HttpFactory' => $vendorDir . '/league/uri/src/HttpFactory.php', + 'League\\Uri\\Idna\\Idna' => $vendorDir . '/league/uri-interfaces/src/Idna/Idna.php', + 'League\\Uri\\Idna\\IdnaInfo' => $vendorDir . '/league/uri-interfaces/src/Idna/IdnaInfo.php', + 'League\\Uri\\Uri' => $vendorDir . '/league/uri/src/Uri.php', + 'League\\Uri\\UriInfo' => $vendorDir . '/league/uri/src/UriInfo.php', + 'League\\Uri\\UriResolver' => $vendorDir . '/league/uri/src/UriResolver.php', + 'League\\Uri\\UriString' => $vendorDir . '/league/uri/src/UriString.php', + 'League\\Uri\\UriTemplate' => $vendorDir . '/league/uri/src/UriTemplate.php', + 'League\\Uri\\UriTemplate\\Expression' => $vendorDir . '/league/uri/src/UriTemplate/Expression.php', + 'League\\Uri\\UriTemplate\\Template' => $vendorDir . '/league/uri/src/UriTemplate/Template.php', + 'League\\Uri\\UriTemplate\\VarSpecifier' => $vendorDir . '/league/uri/src/UriTemplate/VarSpecifier.php', + 'League\\Uri\\UriTemplate\\VariableBag' => $vendorDir . '/league/uri/src/UriTemplate/VariableBag.php', 'Less_Autoloader' => $vendorDir . '/wikimedia/less.php/lib/Less/Autoloader.php', 'Less_Cache' => $vendorDir . '/wikimedia/less.php/lib/Less/Cache.php', 'Less_Colors' => $vendorDir . '/wikimedia/less.php/lib/Less/Colors.php', @@ -1489,7 +1543,9 @@ 'Mailgun\\Api\\EmailValidationV4' => $vendorDir . '/mailgun/mailgun-php/src/Api/EmailValidationV4.php', 'Mailgun\\Api\\Event' => $vendorDir . '/mailgun/mailgun-php/src/Api/Event.php', 'Mailgun\\Api\\HttpApi' => $vendorDir . '/mailgun/mailgun-php/src/Api/HttpApi.php', + 'Mailgun\\Api\\HttpClient' => $vendorDir . '/mailgun/mailgun-php/src/Api/HttpClient.php', 'Mailgun\\Api\\Ip' => $vendorDir . '/mailgun/mailgun-php/src/Api/Ip.php', + 'Mailgun\\Api\\Mailboxes' => $vendorDir . '/mailgun/mailgun-php/src/Api/Mailboxes.php', 'Mailgun\\Api\\MailingList' => $vendorDir . '/mailgun/mailgun-php/src/Api/MailingList.php', 'Mailgun\\Api\\MailingList\\Member' => $vendorDir . '/mailgun/mailgun-php/src/Api/MailingList/Member.php', 'Mailgun\\Api\\Message' => $vendorDir . '/mailgun/mailgun-php/src/Api/Message.php', @@ -1549,6 +1605,7 @@ 'Mailgun\\Model\\Domain\\UpdateOpenTrackingResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Domain/UpdateOpenTrackingResponse.php', 'Mailgun\\Model\\Domain\\UpdateUnsubscribeTrackingResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Domain/UpdateUnsubscribeTrackingResponse.php', 'Mailgun\\Model\\Domain\\VerifyResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Domain/VerifyResponse.php', + 'Mailgun\\Model\\Domain\\WebSchemeResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Domain/WebSchemeResponse.php', 'Mailgun\\Model\\EmailValidationV4\\CreateBulkJobResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/EmailValidationV4/CreateBulkJobResponse.php', 'Mailgun\\Model\\EmailValidationV4\\CreateBulkPreviewResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/EmailValidationV4/CreateBulkPreviewResponse.php', 'Mailgun\\Model\\EmailValidationV4\\DeleteBulkJobResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/EmailValidationV4/DeleteBulkJobResponse.php', @@ -1572,6 +1629,10 @@ 'Mailgun\\Model\\Ip\\IndexResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php', 'Mailgun\\Model\\Ip\\ShowResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Ip/ShowResponse.php', 'Mailgun\\Model\\Ip\\UpdateResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Ip/UpdateResponse.php', + 'Mailgun\\Model\\Mailboxes\\CreateResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Mailboxes/CreateResponse.php', + 'Mailgun\\Model\\Mailboxes\\DeleteResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Mailboxes/DeleteResponse.php', + 'Mailgun\\Model\\Mailboxes\\ShowResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Mailboxes/ShowResponse.php', + 'Mailgun\\Model\\Mailboxes\\UpdateResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/Mailboxes/UpdateResponse.php', 'Mailgun\\Model\\MailingList\\CreateResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/MailingList/CreateResponse.php', 'Mailgun\\Model\\MailingList\\DeleteResponse' => $vendorDir . '/mailgun/mailgun-php/src/Model/MailingList/DeleteResponse.php', 'Mailgun\\Model\\MailingList\\MailingList' => $vendorDir . '/mailgun/mailgun-php/src/Model/MailingList/MailingList.php', diff --git a/dist/vendor/composer/autoload_files.php b/dist/vendor/composer/autoload_files.php index 57e0f0f1e..06f35066c 100644 --- a/dist/vendor/composer/autoload_files.php +++ b/dist/vendor/composer/autoload_files.php @@ -14,15 +14,15 @@ 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', - '9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php', 'eccc0347283a01e62f5536bcf76b6e62' => $vendorDir . '/wikimedia/at-ease/src/Wikimedia/Functions.php', + '9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php', '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', - 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', 'c3f7f0e81464740a933532e81fa26cc7' => $vendorDir . '/wikimedia/base-convert/src/Functions.php', + 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', 'c50606d667a3fde2b80a955639479d3d' => $vendorDir . '/wikimedia/timestamp/src/defines.php', 'c15f8000750e4e04ba559d9745044427' => $vendorDir . '/data-values/number/Number.php', '3ef87127dc6892a0a78f223558a0b940' => $vendorDir . '/diff/diff/Diff.php', - '6513700b70192b7dfd0e5e9fc8082cf3' => $vendorDir . '/wikimedia/relpath/src/Wikimedia/RelPath.php', 'db89166205707d49719c395c26d4e52d' => $vendorDir . '/wikimedia/parsoid/DomImpl.php', + '6513700b70192b7dfd0e5e9fc8082cf3' => $vendorDir . '/wikimedia/relpath/src/Wikimedia/RelPath.php', ); diff --git a/dist/vendor/composer/autoload_namespaces.php b/dist/vendor/composer/autoload_namespaces.php index 2535785d3..27095d13d 100644 --- a/dist/vendor/composer/autoload_namespaces.php +++ b/dist/vendor/composer/autoload_namespaces.php @@ -9,7 +9,7 @@ 'ValueParsers\\' => array($vendorDir . '/data-values/number/src', $vendorDir . '/data-values/time/src'), 'ValueFormatters\\' => array($vendorDir . '/data-values/number/src', $vendorDir . '/data-values/time/src'), 'TextCat' => array($vendorDir . '/wikimedia/textcat/src'), - 'Net' => array($vendorDir . '/pear/net_socket', $vendorDir . '/pear/net_smtp'), + 'Net' => array($vendorDir . '/pear/net_smtp', $vendorDir . '/pear/net_socket'), 'Mail' => array($vendorDir . '/pear/mail', $vendorDir . '/pear/mail_mime'), 'Liuggio' => array($vendorDir . '/liuggio/statsd-php-client/src'), 'Less' => array($vendorDir . '/wikimedia/less.php/lib'), diff --git a/dist/vendor/composer/autoload_psr4.php b/dist/vendor/composer/autoload_psr4.php index bf440dda8..582db1374 100644 --- a/dist/vendor/composer/autoload_psr4.php +++ b/dist/vendor/composer/autoload_psr4.php @@ -24,15 +24,15 @@ 'Wikimedia\\CommonPasswords\\' => array($vendorDir . '/wikimedia/common-passwords/src/CommonPasswords'), 'Wikimedia\\AtEase\\' => array($vendorDir . '/wikimedia/at-ease/src/Wikimedia/AtEase'), 'Wikimedia\\Assert\\' => array($vendorDir . '/wikimedia/assert/src'), - 'Wikimedia\\' => array($vendorDir . '/wikimedia/ip-set/src', $vendorDir . '/wikimedia/scoped-callback/src', $vendorDir . '/wikimedia/object-factory/src', $vendorDir . '/wikimedia/ip-utils/src', $vendorDir . '/wikimedia/wait-condition-loop/src', $vendorDir . '/wikimedia/wrappedstring/src'), + 'Wikimedia\\' => array($vendorDir . '/wikimedia/ip-set/src', $vendorDir . '/wikimedia/ip-utils/src', $vendorDir . '/wikimedia/object-factory/src', $vendorDir . '/wikimedia/scoped-callback/src', $vendorDir . '/wikimedia/wait-condition-loop/src', $vendorDir . '/wikimedia/wrappedstring/src'), 'Wikibase\\Lexeme\\Tests\\' => array($baseDir . '/extensions/WikibaseLexeme/tests/phpunit/composer'), 'Wikibase\\Lexeme\\' => array($baseDir . '/extensions/WikibaseLexeme/src'), 'WikiPEG\\' => array($vendorDir . '/wikimedia/wikipeg/src'), 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), 'WMDE\\VueJsTemplating\\' => array($vendorDir . '/wmde/php-vuejs-templating/src'), 'ValueValidators\\' => array($vendorDir . '/data-values/interfaces/src/ValueValidators'), - 'ValueParsers\\' => array($vendorDir . '/data-values/interfaces/src/ValueParsers', $vendorDir . '/data-values/common/src/ValueParsers'), - 'ValueFormatters\\' => array($vendorDir . '/data-values/interfaces/src/ValueFormatters', $vendorDir . '/data-values/common/src/ValueFormatters'), + 'ValueParsers\\' => array($vendorDir . '/data-values/common/src/ValueParsers', $vendorDir . '/data-values/interfaces/src/ValueParsers'), + 'ValueFormatters\\' => array($vendorDir . '/data-values/common/src/ValueFormatters', $vendorDir . '/data-values/interfaces/src/ValueFormatters'), 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), @@ -44,7 +44,7 @@ 'React\\Promise\\' => array($vendorDir . '/react/promise/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Pleo\\BloomFilter\\' => array($vendorDir . '/pleonasm/bloom-filter/src'), @@ -54,6 +54,7 @@ 'Mailgun\\' => array($vendorDir . '/mailgun/mailgun-php/src'), 'LuceneExplain\\' => array($vendorDir . '/wikimedia/lucene-explain-parser/src'), 'LightnCandy\\' => array($vendorDir . '/zordius/lightncandy/src'), + 'League\\Uri\\' => array($vendorDir . '/league/uri-interfaces/src', $vendorDir . '/league/uri/src'), 'League\\OAuth2\\Server\\' => array($vendorDir . '/league/oauth2-server/src'), 'League\\Event\\' => array($vendorDir . '/league/event/src'), 'Lcobucci\\JWT\\' => array($vendorDir . '/lcobucci/jwt/src'), @@ -81,7 +82,7 @@ 'DataValues\\Serializers\\' => array($vendorDir . '/data-values/serialization/src/Serializers'), 'DataValues\\Geo\\' => array($vendorDir . '/data-values/geo/src'), 'DataValues\\Deserializers\\' => array($vendorDir . '/data-values/serialization/src/Deserializers'), - 'DataValues\\' => array($vendorDir . '/data-values/data-values/src', $vendorDir . '/data-values/common/src/DataValues'), + 'DataValues\\' => array($vendorDir . '/data-values/common/src/DataValues', $vendorDir . '/data-values/data-values/src'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), 'Clue\\StreamFilter\\' => array($vendorDir . '/clue/stream-filter/src'), diff --git a/dist/vendor/composer/autoload_real.php b/dist/vendor/composer/autoload_real.php index ec9451654..6d8e816c1 100644 --- a/dist/vendor/composer/autoload_real.php +++ b/dist/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitcaa98657d744543fb963672146b9911d +class ComposerAutoloaderInit9d4c4aa5af74f93fb7d21ea4ad148f60 { private static $loader; @@ -24,9 +24,9 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitcaa98657d744543fb963672146b9911d', 'loadClassLoader'), true, false); + spl_autoload_register(array('ComposerAutoloaderInit9d4c4aa5af74f93fb7d21ea4ad148f60', 'loadClassLoader'), true, false); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInitcaa98657d744543fb963672146b9911d', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit9d4c4aa5af74f93fb7d21ea4ad148f60', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); @@ -36,7 +36,7 @@ public static function getLoader() if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitcaa98657d744543fb963672146b9911d::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -57,19 +57,19 @@ public static function getLoader() $loader->register(false); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitcaa98657d744543fb963672146b9911d::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirecaa98657d744543fb963672146b9911d($fileIdentifier, $file); + composerRequire9d4c4aa5af74f93fb7d21ea4ad148f60($fileIdentifier, $file); } return $loader; } } -function composerRequirecaa98657d744543fb963672146b9911d($fileIdentifier, $file) +function composerRequire9d4c4aa5af74f93fb7d21ea4ad148f60($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/dist/vendor/composer/autoload_static.php b/dist/vendor/composer/autoload_static.php index abf40a466..dbfd4a7b8 100644 --- a/dist/vendor/composer/autoload_static.php +++ b/dist/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitcaa98657d744543fb963672146b9911d +class ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60 { public static $files = array ( '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', @@ -15,17 +15,17 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - '9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php', 'eccc0347283a01e62f5536bcf76b6e62' => __DIR__ . '/..' . '/wikimedia/at-ease/src/Wikimedia/Functions.php', + '9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php', '8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', - 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', 'c3f7f0e81464740a933532e81fa26cc7' => __DIR__ . '/..' . '/wikimedia/base-convert/src/Functions.php', + 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', 'c50606d667a3fde2b80a955639479d3d' => __DIR__ . '/..' . '/wikimedia/timestamp/src/defines.php', 'c15f8000750e4e04ba559d9745044427' => __DIR__ . '/..' . '/data-values/number/Number.php', '3ef87127dc6892a0a78f223558a0b940' => __DIR__ . '/..' . '/diff/diff/Diff.php', - '6513700b70192b7dfd0e5e9fc8082cf3' => __DIR__ . '/..' . '/wikimedia/relpath/src/Wikimedia/RelPath.php', 'db89166205707d49719c395c26d4e52d' => __DIR__ . '/..' . '/wikimedia/parsoid/DomImpl.php', + '6513700b70192b7dfd0e5e9fc8082cf3' => __DIR__ . '/..' . '/wikimedia/relpath/src/Wikimedia/RelPath.php', ); public static $prefixLengthsPsr4 = array ( @@ -103,6 +103,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d array ( 'LuceneExplain\\' => 14, 'LightnCandy\\' => 12, + 'League\\Uri\\' => 11, 'League\\OAuth2\\Server\\' => 21, 'League\\Event\\' => 13, 'Lcobucci\\JWT\\' => 13, @@ -236,9 +237,9 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Wikimedia\\' => array ( 0 => __DIR__ . '/..' . '/wikimedia/ip-set/src', - 1 => __DIR__ . '/..' . '/wikimedia/scoped-callback/src', + 1 => __DIR__ . '/..' . '/wikimedia/ip-utils/src', 2 => __DIR__ . '/..' . '/wikimedia/object-factory/src', - 3 => __DIR__ . '/..' . '/wikimedia/ip-utils/src', + 3 => __DIR__ . '/..' . '/wikimedia/scoped-callback/src', 4 => __DIR__ . '/..' . '/wikimedia/wait-condition-loop/src', 5 => __DIR__ . '/..' . '/wikimedia/wrappedstring/src', ), @@ -268,13 +269,13 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d ), 'ValueParsers\\' => array ( - 0 => __DIR__ . '/..' . '/data-values/interfaces/src/ValueParsers', - 1 => __DIR__ . '/..' . '/data-values/common/src/ValueParsers', + 0 => __DIR__ . '/..' . '/data-values/common/src/ValueParsers', + 1 => __DIR__ . '/..' . '/data-values/interfaces/src/ValueParsers', ), 'ValueFormatters\\' => array ( - 0 => __DIR__ . '/..' . '/data-values/interfaces/src/ValueFormatters', - 1 => __DIR__ . '/..' . '/data-values/common/src/ValueFormatters', + 0 => __DIR__ . '/..' . '/data-values/common/src/ValueFormatters', + 1 => __DIR__ . '/..' . '/data-values/interfaces/src/ValueFormatters', ), 'Symfony\\Polyfill\\Php80\\' => array ( @@ -322,8 +323,8 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - 1 => __DIR__ . '/..' . '/psr/http-factory/src', + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Psr\\Http\\Client\\' => array ( @@ -361,6 +362,11 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d array ( 0 => __DIR__ . '/..' . '/zordius/lightncandy/src', ), + 'League\\Uri\\' => + array ( + 0 => __DIR__ . '/..' . '/league/uri-interfaces/src', + 1 => __DIR__ . '/..' . '/league/uri/src', + ), 'League\\OAuth2\\Server\\' => array ( 0 => __DIR__ . '/..' . '/league/oauth2-server/src', @@ -472,8 +478,8 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d ), 'DataValues\\' => array ( - 0 => __DIR__ . '/..' . '/data-values/data-values/src', - 1 => __DIR__ . '/..' . '/data-values/common/src/DataValues', + 0 => __DIR__ . '/..' . '/data-values/common/src/DataValues', + 1 => __DIR__ . '/..' . '/data-values/data-values/src', ), 'Composer\\Semver\\' => array ( @@ -522,8 +528,8 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d array ( 'Net' => array ( - 0 => __DIR__ . '/..' . '/pear/net_socket', - 1 => __DIR__ . '/..' . '/pear/net_smtp', + 0 => __DIR__ . '/..' . '/pear/net_smtp', + 1 => __DIR__ . '/..' . '/pear/net_socket', ), ), 'M' => @@ -613,6 +619,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Carbon\\Exceptions\\BadFluentConstructorException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php', 'Carbon\\Exceptions\\BadFluentSetterException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php', 'Carbon\\Exceptions\\BadMethodCallException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php', + 'Carbon\\Exceptions\\EndLessPeriodException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php', 'Carbon\\Exceptions\\Exception' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/Exception.php', 'Carbon\\Exceptions\\ImmutableException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php', 'Carbon\\Exceptions\\InvalidArgumentException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php', @@ -641,6 +648,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Carbon\\FactoryImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/FactoryImmutable.php', 'Carbon\\Language' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Language.php', 'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', + 'Carbon\\PHPStan\\AbstractMacro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 'Carbon\\PHPStan\\Macro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', 'Carbon\\PHPStan\\MacroExtension' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php', 'Carbon\\PHPStan\\MacroScanner' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php', @@ -668,6 +676,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Carbon\\Traits\\Units' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Units.php', 'Carbon\\Traits\\Week' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Week.php', 'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\TranslatorImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/TranslatorImmutable.php', 'Carbon\\TranslatorStrongTypeInterface' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php', 'Cdb\\Exception' => __DIR__ . '/..' . '/wikimedia/cdb/src/Exception.php', 'Cdb\\Reader' => __DIR__ . '/..' . '/wikimedia/cdb/src/Reader.php', @@ -1490,6 +1499,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Firebase\\JWT\\ExpiredException' => __DIR__ . '/..' . '/firebase/php-jwt/src/ExpiredException.php', 'Firebase\\JWT\\JWK' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWK.php', 'Firebase\\JWT\\JWT' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWT.php', + 'Firebase\\JWT\\Key' => __DIR__ . '/..' . '/firebase/php-jwt/src/Key.php', 'Firebase\\JWT\\SignatureInvalidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/SignatureInvalidException.php', 'GuzzleHttp\\BodySummarizer' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizer.php', 'GuzzleHttp\\BodySummarizerInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', @@ -1565,6 +1575,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php', 'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php', 'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriComparator.php', 'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php', 'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php', 'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php', @@ -1823,8 +1834,10 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Lcobucci\\JWT\\Encoding\\UnifyAudience' => __DIR__ . '/..' . '/lcobucci/jwt/src/Encoding/UnifyAudience.php', 'Lcobucci\\JWT\\Encoding\\UnixTimestampDates' => __DIR__ . '/..' . '/lcobucci/jwt/src/Encoding/UnixTimestampDates.php', 'Lcobucci\\JWT\\Exception' => __DIR__ . '/..' . '/lcobucci/jwt/src/Exception.php', + 'Lcobucci\\JWT\\JwtFacade' => __DIR__ . '/..' . '/lcobucci/jwt/src/JwtFacade.php', 'Lcobucci\\JWT\\Parser' => __DIR__ . '/..' . '/lcobucci/jwt/src/Parser.php', 'Lcobucci\\JWT\\Signer' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer.php', + 'Lcobucci\\JWT\\Signer\\Blake2b' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Blake2b.php', 'Lcobucci\\JWT\\Signer\\CannotSignPayload' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/CannotSignPayload.php', 'Lcobucci\\JWT\\Signer\\Ecdsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\ConversionFailed' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/ConversionFailed.php', @@ -1833,11 +1846,17 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\SignatureConverter' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\UnsafeSha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha512.php', 'Lcobucci\\JWT\\Signer\\Eddsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Eddsa.php', 'Lcobucci\\JWT\\Signer\\Hmac' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha256.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha384.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Hmac\\UnsafeSha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/UnsafeSha512.php', 'Lcobucci\\JWT\\Signer\\InvalidKeyProvided' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/InvalidKeyProvided.php', 'Lcobucci\\JWT\\Signer\\Key' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Key.php', 'Lcobucci\\JWT\\Signer\\Key\\FileCouldNotBeRead' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Key/FileCouldNotBeRead.php', @@ -1849,6 +1868,11 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Lcobucci\\JWT\\Signer\\Rsa\\Sha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha256.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha384.php', + 'Lcobucci\\JWT\\Signer\\Rsa\\UnsafeSha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/UnsafeSha512.php', + 'Lcobucci\\JWT\\Signer\\UnsafeEcdsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/UnsafeEcdsa.php', + 'Lcobucci\\JWT\\Signer\\UnsafeRsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/UnsafeRsa.php', 'Lcobucci\\JWT\\SodiumBase64Polyfill' => __DIR__ . '/..' . '/lcobucci/jwt/src/SodiumBase64Polyfill.php', 'Lcobucci\\JWT\\Token' => __DIR__ . '/..' . '/lcobucci/jwt/src/Token.php', 'Lcobucci\\JWT\\Token\\Builder' => __DIR__ . '/..' . '/lcobucci/jwt/src/Token/Builder.php', @@ -1863,6 +1887,8 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Lcobucci\\JWT\\UnencryptedToken' => __DIR__ . '/..' . '/lcobucci/jwt/src/UnencryptedToken.php', 'Lcobucci\\JWT\\Validation\\Constraint' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint.php', 'Lcobucci\\JWT\\Validation\\ConstraintViolation' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/ConstraintViolation.php', + 'Lcobucci\\JWT\\Validation\\Constraint\\CannotValidateARegisteredClaim' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/CannotValidateARegisteredClaim.php', + 'Lcobucci\\JWT\\Validation\\Constraint\\HasClaimWithValue' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/HasClaimWithValue.php', 'Lcobucci\\JWT\\Validation\\Constraint\\IdentifiedBy' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php', 'Lcobucci\\JWT\\Validation\\Constraint\\IssuedBy' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php', 'Lcobucci\\JWT\\Validation\\Constraint\\LeewayCannotBeNegative' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/LeewayCannotBeNegative.php', @@ -1874,6 +1900,8 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Lcobucci\\JWT\\Validation\\Constraint\\ValidAt' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Constraint/ValidAt.php', 'Lcobucci\\JWT\\Validation\\NoConstraintsGiven' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/NoConstraintsGiven.php', 'Lcobucci\\JWT\\Validation\\RequiredConstraintsViolated' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/RequiredConstraintsViolated.php', + 'Lcobucci\\JWT\\Validation\\SignedWith' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/SignedWith.php', + 'Lcobucci\\JWT\\Validation\\ValidAt' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/ValidAt.php', 'Lcobucci\\JWT\\Validation\\Validator' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validation/Validator.php', 'Lcobucci\\JWT\\Validator' => __DIR__ . '/..' . '/lcobucci/jwt/src/Validator.php', 'League\\Event\\AbstractEvent' => __DIR__ . '/..' . '/league/event/src/AbstractEvent.php', @@ -1946,6 +1974,38 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'League\\OAuth2\\Server\\ResponseTypes\\BearerTokenResponse' => __DIR__ . '/..' . '/league/oauth2-server/src/ResponseTypes/BearerTokenResponse.php', 'League\\OAuth2\\Server\\ResponseTypes\\RedirectResponse' => __DIR__ . '/..' . '/league/oauth2-server/src/ResponseTypes/RedirectResponse.php', 'League\\OAuth2\\Server\\ResponseTypes\\ResponseTypeInterface' => __DIR__ . '/..' . '/league/oauth2-server/src/ResponseTypes/ResponseTypeInterface.php', + 'League\\Uri\\Contracts\\AuthorityInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/AuthorityInterface.php', + 'League\\Uri\\Contracts\\DataPathInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/DataPathInterface.php', + 'League\\Uri\\Contracts\\DomainHostInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/DomainHostInterface.php', + 'League\\Uri\\Contracts\\FragmentInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/FragmentInterface.php', + 'League\\Uri\\Contracts\\HostInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/HostInterface.php', + 'League\\Uri\\Contracts\\IpHostInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/IpHostInterface.php', + 'League\\Uri\\Contracts\\PathInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/PathInterface.php', + 'League\\Uri\\Contracts\\PortInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/PortInterface.php', + 'League\\Uri\\Contracts\\QueryInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/QueryInterface.php', + 'League\\Uri\\Contracts\\SegmentedPathInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php', + 'League\\Uri\\Contracts\\UriComponentInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/UriComponentInterface.php', + 'League\\Uri\\Contracts\\UriException' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/UriException.php', + 'League\\Uri\\Contracts\\UriInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/UriInterface.php', + 'League\\Uri\\Contracts\\UserInfoInterface' => __DIR__ . '/..' . '/league/uri-interfaces/src/Contracts/UserInfoInterface.php', + 'League\\Uri\\Exceptions\\FileinfoSupportMissing' => __DIR__ . '/..' . '/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php', + 'League\\Uri\\Exceptions\\IdnSupportMissing' => __DIR__ . '/..' . '/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php', + 'League\\Uri\\Exceptions\\IdnaConversionFailed' => __DIR__ . '/..' . '/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php', + 'League\\Uri\\Exceptions\\SyntaxError' => __DIR__ . '/..' . '/league/uri-interfaces/src/Exceptions/SyntaxError.php', + 'League\\Uri\\Exceptions\\TemplateCanNotBeExpanded' => __DIR__ . '/..' . '/league/uri/src/Exceptions/TemplateCanNotBeExpanded.php', + 'League\\Uri\\Http' => __DIR__ . '/..' . '/league/uri/src/Http.php', + 'League\\Uri\\HttpFactory' => __DIR__ . '/..' . '/league/uri/src/HttpFactory.php', + 'League\\Uri\\Idna\\Idna' => __DIR__ . '/..' . '/league/uri-interfaces/src/Idna/Idna.php', + 'League\\Uri\\Idna\\IdnaInfo' => __DIR__ . '/..' . '/league/uri-interfaces/src/Idna/IdnaInfo.php', + 'League\\Uri\\Uri' => __DIR__ . '/..' . '/league/uri/src/Uri.php', + 'League\\Uri\\UriInfo' => __DIR__ . '/..' . '/league/uri/src/UriInfo.php', + 'League\\Uri\\UriResolver' => __DIR__ . '/..' . '/league/uri/src/UriResolver.php', + 'League\\Uri\\UriString' => __DIR__ . '/..' . '/league/uri/src/UriString.php', + 'League\\Uri\\UriTemplate' => __DIR__ . '/..' . '/league/uri/src/UriTemplate.php', + 'League\\Uri\\UriTemplate\\Expression' => __DIR__ . '/..' . '/league/uri/src/UriTemplate/Expression.php', + 'League\\Uri\\UriTemplate\\Template' => __DIR__ . '/..' . '/league/uri/src/UriTemplate/Template.php', + 'League\\Uri\\UriTemplate\\VarSpecifier' => __DIR__ . '/..' . '/league/uri/src/UriTemplate/VarSpecifier.php', + 'League\\Uri\\UriTemplate\\VariableBag' => __DIR__ . '/..' . '/league/uri/src/UriTemplate/VariableBag.php', 'Less_Autoloader' => __DIR__ . '/..' . '/wikimedia/less.php/lib/Less/Autoloader.php', 'Less_Cache' => __DIR__ . '/..' . '/wikimedia/less.php/lib/Less/Cache.php', 'Less_Colors' => __DIR__ . '/..' . '/wikimedia/less.php/lib/Less/Colors.php', @@ -2067,7 +2127,9 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Mailgun\\Api\\EmailValidationV4' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/EmailValidationV4.php', 'Mailgun\\Api\\Event' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/Event.php', 'Mailgun\\Api\\HttpApi' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/HttpApi.php', + 'Mailgun\\Api\\HttpClient' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/HttpClient.php', 'Mailgun\\Api\\Ip' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/Ip.php', + 'Mailgun\\Api\\Mailboxes' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/Mailboxes.php', 'Mailgun\\Api\\MailingList' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/MailingList.php', 'Mailgun\\Api\\MailingList\\Member' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/MailingList/Member.php', 'Mailgun\\Api\\Message' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Api/Message.php', @@ -2127,6 +2189,7 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Mailgun\\Model\\Domain\\UpdateOpenTrackingResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Domain/UpdateOpenTrackingResponse.php', 'Mailgun\\Model\\Domain\\UpdateUnsubscribeTrackingResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Domain/UpdateUnsubscribeTrackingResponse.php', 'Mailgun\\Model\\Domain\\VerifyResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Domain/VerifyResponse.php', + 'Mailgun\\Model\\Domain\\WebSchemeResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Domain/WebSchemeResponse.php', 'Mailgun\\Model\\EmailValidationV4\\CreateBulkJobResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/EmailValidationV4/CreateBulkJobResponse.php', 'Mailgun\\Model\\EmailValidationV4\\CreateBulkPreviewResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/EmailValidationV4/CreateBulkPreviewResponse.php', 'Mailgun\\Model\\EmailValidationV4\\DeleteBulkJobResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/EmailValidationV4/DeleteBulkJobResponse.php', @@ -2150,6 +2213,10 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d 'Mailgun\\Model\\Ip\\IndexResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php', 'Mailgun\\Model\\Ip\\ShowResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Ip/ShowResponse.php', 'Mailgun\\Model\\Ip\\UpdateResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Ip/UpdateResponse.php', + 'Mailgun\\Model\\Mailboxes\\CreateResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Mailboxes/CreateResponse.php', + 'Mailgun\\Model\\Mailboxes\\DeleteResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Mailboxes/DeleteResponse.php', + 'Mailgun\\Model\\Mailboxes\\ShowResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Mailboxes/ShowResponse.php', + 'Mailgun\\Model\\Mailboxes\\UpdateResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/Mailboxes/UpdateResponse.php', 'Mailgun\\Model\\MailingList\\CreateResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/MailingList/CreateResponse.php', 'Mailgun\\Model\\MailingList\\DeleteResponse' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/MailingList/DeleteResponse.php', 'Mailgun\\Model\\MailingList\\MailingList' => __DIR__ . '/..' . '/mailgun/mailgun-php/src/Model/MailingList/MailingList.php', @@ -4028,11 +4095,11 @@ class ComposerStaticInitcaa98657d744543fb963672146b9911d public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitcaa98657d744543fb963672146b9911d::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitcaa98657d744543fb963672146b9911d::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInitcaa98657d744543fb963672146b9911d::$prefixesPsr0; - $loader->fallbackDirsPsr0 = ComposerStaticInitcaa98657d744543fb963672146b9911d::$fallbackDirsPsr0; - $loader->classMap = ComposerStaticInitcaa98657d744543fb963672146b9911d::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$prefixesPsr0; + $loader->fallbackDirsPsr0 = ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$fallbackDirsPsr0; + $loader->classMap = ComposerStaticInit9d4c4aa5af74f93fb7d21ea4ad148f60::$classMap; }, null, ClassLoader::class); } diff --git a/dist/vendor/composer/include_paths.php b/dist/vendor/composer/include_paths.php index 06fc5ec61..66d025bf1 100644 --- a/dist/vendor/composer/include_paths.php +++ b/dist/vendor/composer/include_paths.php @@ -6,12 +6,12 @@ $baseDir = dirname($vendorDir); return array( - $vendorDir . '/pear/pear_exception', $vendorDir . '/pear/console_getopt', - $vendorDir . '/pear/pear-core-minimal/src', $vendorDir . '/pear/mail', $vendorDir . '/pear/mail_mime', - $vendorDir . '/pear/net_socket', $vendorDir . '/pear/net_smtp', + $vendorDir . '/pear/net_socket', $vendorDir . '/pear/net_url2', + $vendorDir . '/pear/pear-core-minimal/src', + $vendorDir . '/pear/pear_exception', ); diff --git a/dist/vendor/composer/installed.json b/dist/vendor/composer/installed.json index 586641936..9ad85608d 100644 --- a/dist/vendor/composer/installed.json +++ b/dist/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "clue/stream-filter", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", + "version": "v1.6.0", + "version_normalized": "1.6.0.0", "source": { "type": "git", "url": "https://github.com/clue/stream-filter.git", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e", + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e", "shasum": "" }, "require": { @@ -21,16 +21,16 @@ "require-dev": { "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, - "time": "2020-10-02T12:38:20+00:00", + "time": "2022-02-21T13:15:14+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "Clue\\StreamFilter\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -55,7 +55,7 @@ ], "support": { "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" }, "funding": [ { @@ -1175,17 +1175,17 @@ }, { "name": "firebase/php-jwt", - "version": "v5.2.0", - "version_normalized": "5.2.0.0", + "version": "v5.5.1", + "version_normalized": "5.5.1.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb" + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb", - "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6", + "reference": "83b609028194aa042ea33b5af2d41a7427de80e6", "shasum": "" }, "require": { @@ -1194,7 +1194,10 @@ "require-dev": { "phpunit/phpunit": ">=4.8 <=9" }, - "time": "2020-03-25T18:49:23+00:00", + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "time": "2021-11-08T20:18:51+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1226,7 +1229,7 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/master" + "source": "https://github.com/firebase/php-jwt/tree/v5.5.1" }, "install-path": "../firebase/php-jwt" }, @@ -1337,17 +1340,17 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.1", - "version_normalized": "1.5.1.0", + "version": "1.5.2", + "version_normalized": "1.5.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1356,7 +1359,7 @@ "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5.1" }, - "time": "2021-10-22T20:56:57+00:00", + "time": "2022-08-28T14:55:35+00:00", "type": "library", "extra": { "branch-alias": { @@ -1365,12 +1368,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1404,7 +1407,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1424,17 +1427,17 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.8.3", - "version_normalized": "1.8.3.0", + "version": "1.9.0", + "version_normalized": "1.9.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", - "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { @@ -1452,21 +1455,21 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2021-10-05T13:56:00+00:00", + "time": "2022-06-20T21:43:03+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1517,7 +1520,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.3" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, "funding": [ { @@ -1537,17 +1540,17 @@ }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", - "version_normalized": "5.2.11.0", + "version": "5.2.12", + "version_normalized": "5.2.12.0", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -1558,7 +1561,7 @@ "json-schema/json-schema-test-suite": "1.2.0", "phpunit/phpunit": "^4.8.35" }, - "time": "2021-07-22T09:24:00+00:00", + "time": "2022-04-13T08:02:27+00:00", "bin": [ "bin/validate-json" ], @@ -1604,7 +1607,7 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, "install-path": "../justinrainbow/json-schema" }, @@ -1674,17 +1677,17 @@ }, { "name": "lcobucci/jwt", - "version": "4.1.5", - "version_normalized": "4.1.5.0", + "version": "4.2.1", + "version_normalized": "4.2.1.0", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/72ac6d807ee51a70ad376ee03a2387e8646e10f3", + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3", "shasum": "" }, "require": { @@ -1700,16 +1703,16 @@ "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, - "time": "2021-09-28T19:34:56+00:00", + "time": "2022-08-19T23:14:07+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1735,7 +1738,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.1.5" + "source": "https://github.com/lcobucci/jwt/tree/4.2.1" }, "funding": [ { @@ -1886,6 +1889,182 @@ ], "install-path": "../league/oauth2-server" }, + { + "name": "league/uri", + "version": "6.7.2", + "version_normalized": "6.7.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/d3b50812dd51f3fbf176344cc2981db03d10fe06", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "time": "2022-09-13T19:50:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.7.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "install-path": "../league/uri" + }, + { + "name": "league/uri-interfaces", + "version": "2.3.0", + "version_normalized": "2.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" + }, + "suggest": { + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + }, + "time": "2021-06-28T04:27:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "install-path": "../league/uri-interfaces" + }, { "name": "liuggio/statsd-php-client", "version": "v1.0.18", @@ -1945,17 +2124,17 @@ }, { "name": "mailgun/mailgun-php", - "version": "v3.5.1", - "version_normalized": "3.5.1.0", + "version": "v3.5.4", + "version_normalized": "3.5.4.0", "source": { "type": "git", "url": "https://github.com/mailgun/mailgun-php.git", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5" + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", - "reference": "4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5", + "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/8765ce557c373243ae9604d1d44d86e037bd1018", + "reference": "8765ce557c373243ae9604d1d44d86e037bd1018", "shasum": "" }, "require": { @@ -1969,14 +2148,14 @@ "require-dev": { "nyholm/nsa": "^1.2.1", "nyholm/psr7": "^1.3.1", - "php-http/guzzle7-adapter": "^0.1.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/http-client": "^5.3" }, "suggest": { - "guzzlehttp/psr7": "PSR-7 message implementation that also provides common utility methods", - "php-http/curl-client": "cURL client for PHP-HTTP" + "nyholm/psr7": "PSR-7 message implementation", + "symfony/http-client": "HTTP client" }, - "time": "2021-08-16T09:57:44+00:00", + "time": "2022-08-25T19:40:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -2002,7 +2181,7 @@ "description": "The Mailgun SDK provides methods for all API functions.", "support": { "issues": "https://github.com/mailgun/mailgun-php/issues", - "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.1" + "source": "https://github.com/mailgun/mailgun-php/tree/v3.5.4" }, "install-path": "../mailgun/mailgun-php" }, @@ -2107,17 +2286,17 @@ }, { "name": "nesbot/carbon", - "version": "2.55.2", - "version_normalized": "2.55.2.0", + "version": "2.62.1", + "version_normalized": "2.62.1.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2" + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8c2a18ce3e67c34efc1b29f64fe61304368259a2", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", "shasum": "" }, "require": { @@ -2132,13 +2311,15 @@ "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "time": "2021-12-03T14:59:52+00:00", + "time": "2022-09-02T07:48:13+00:00", "bin": [ "bin/carbon" ], @@ -2194,11 +2375,15 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], @@ -2206,17 +2391,17 @@ }, { "name": "nyholm/psr7", - "version": "1.4.1", - "version_normalized": "1.4.1.0", + "version": "1.5.1", + "version_normalized": "1.5.1.0", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec" + "reference": "f734364e38a876a23be4d906a2a089e1315be18a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/2212385b47153ea71b1c1b1374f8cb5e4f7892ec", - "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", + "reference": "f734364e38a876a23be4d906a2a089e1315be18a", "shasum": "" }, "require": { @@ -2235,7 +2420,7 @@ "phpunit/phpunit": "^7.5 || 8.5 || 9.4", "symfony/error-handler": "^4.4" }, - "time": "2021-07-02T08:32:20+00:00", + "time": "2022-06-22T07:13:36+00:00", "type": "library", "extra": { "branch-alias": { @@ -2270,7 +2455,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.4.1" + "source": "https://github.com/Nyholm/psr7/tree/1.5.1" }, "funding": [ { @@ -3057,17 +3242,17 @@ }, { "name": "php-http/discovery", - "version": "1.14.1", - "version_normalized": "1.14.1.0", + "version": "1.14.3", + "version_normalized": "1.14.3.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", - "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", + "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735", + "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735", "shasum": "" }, "require": { @@ -3080,13 +3265,12 @@ "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1", - "puli/composer-plugin": "1.0.0-beta10" + "phpspec/phpspec": "^5.1 || ^6.1" }, "suggest": { "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" }, - "time": "2021-09-18T07:57:46+00:00", + "time": "2022-07-11T14:04:40+00:00", "type": "library", "extra": { "branch-alias": { @@ -3122,23 +3306,23 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.1" + "source": "https://github.com/php-http/discovery/tree/1.14.3" }, "install-path": "../php-http/discovery" }, { "name": "php-http/httplug", - "version": "2.2.0", - "version_normalized": "2.2.0.0", + "version": "2.3.0", + "version_normalized": "2.3.0.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + "reference": "f640739f80dfa1152533976e3c112477f69274eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", + "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, "require": { @@ -3151,7 +3335,7 @@ "friends-of-phpspec/phpspec-code-coverage": "^4.1", "phpspec/phpspec": "^5.1 || ^6.0" }, - "time": "2020-07-13T15:43:23+00:00", + "time": "2022-02-21T09:52:22+00:00", "type": "library", "extra": { "branch-alias": { @@ -3187,23 +3371,23 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/master" + "source": "https://github.com/php-http/httplug/tree/2.3.0" }, "install-path": "../php-http/httplug" }, { "name": "php-http/message", - "version": "1.12.0", - "version_normalized": "1.12.0.0", + "version": "1.13.0", + "version_normalized": "1.13.0.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", + "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", "shasum": "" }, "require": { @@ -3220,7 +3404,7 @@ "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", "laminas/laminas-diactoros": "^2.0", - "phpspec/phpspec": "^5.1 || ^6.3", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, "suggest": { @@ -3229,7 +3413,7 @@ "laminas/laminas-diactoros": "Used with Diactoros Factories", "slim/slim": "Used with Slim Framework PSR-7 implementation" }, - "time": "2021-08-29T09:13:12+00:00", + "time": "2022-02-11T13:41:14+00:00", "type": "library", "extra": { "branch-alias": { @@ -3238,12 +3422,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, "files": [ "src/filters.php" - ] + ], + "psr-4": { + "Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3264,7 +3448,7 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.12.0" + "source": "https://github.com/php-http/message/tree/1.13.0" }, "install-path": "../php-http/message" }, @@ -3506,17 +3690,17 @@ }, { "name": "professional-wiki/edtf", - "version": "2.0.0", - "version_normalized": "2.0.0.0", + "version": "2.0.2", + "version_normalized": "2.0.2.0", "source": { "type": "git", "url": "https://github.com/ProfessionalWiki/EDTF.git", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4" + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", - "reference": "070d4be1a1a2dfbabfacc7d8f5e47092415e78e4", + "url": "https://api.github.com/repos/ProfessionalWiki/EDTF/zipball/2cebb350e0b703d202e6a3a31daf15aa2adb88a7", + "reference": "2cebb350e0b703d202e6a3a31daf15aa2adb88a7", "shasum": "" }, "require": { @@ -3530,7 +3714,7 @@ "phpunit/phpunit": "^9.5.2", "vimeo/psalm": "^4.4.1" }, - "time": "2021-04-28T13:37:17+00:00", + "time": "2022-04-29T13:08:22+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3557,16 +3741,12 @@ "description": "PHP library to parse, represent and work with dates that follow the Extended Date/Time Format specification.", "support": { "issues": "https://github.com/ProfessionalWiki/EDTF/issues", - "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.0" + "source": "https://github.com/ProfessionalWiki/EDTF/tree/2.0.2" }, "funding": [ { "url": "https://github.com/JeroenDeDauw", "type": "github" - }, - { - "url": "https://www.patreon.com/jeroendedauw", - "type": "patreon" } ], "install-path": "../professional-wiki/edtf" @@ -3947,35 +4127,35 @@ }, { "name": "react/promise", - "version": "v2.8.0", - "version_normalized": "2.8.0.0", + "version": "v2.9.0", + "version_normalized": "2.9.0.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, - "time": "2020-05-12T15:16:56+00:00", + "time": "2022-02-11T10:27:51+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3984,7 +4164,23 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", @@ -3994,8 +4190,18 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" + "source": "https://github.com/reactphp/promise/tree/v2.9.0" }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], "install-path": "../react/promise" }, { @@ -4135,23 +4341,23 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-07-12T14:48:14+00:00", + "time": "2022-01-02T09:53:40+00:00", "type": "library", "extra": { "branch-alias": { @@ -4185,7 +4391,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4205,17 +4411,17 @@ }, { "name": "symfony/options-resolver", - "version": "v5.4.0", - "version_normalized": "5.4.0.0", + "version": "v5.4.11", + "version_normalized": "5.4.11.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847" + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b0fb78576487af19c500aaddb269fd36701d4847", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", "shasum": "" }, "require": { @@ -4224,7 +4430,7 @@ "symfony/polyfill-php73": "~1.0", "symfony/polyfill-php80": "^1.16" }, - "time": "2021-11-23T10:19:22+00:00", + "time": "2022-07-20T13:00:38+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4257,7 +4463,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" }, "funding": [ { @@ -4277,27 +4483,27 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.24.0", - "version_normalized": "1.24.0.0", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-06-05T21:20:04+00:00", + "time": "2022-05-24T11:49:31+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4306,12 +4512,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -4339,7 +4545,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4445,17 +4651,17 @@ }, { "name": "symfony/translation", - "version": "v5.4.2", - "version_normalized": "5.4.2.0", + "version": "v5.4.12", + "version_normalized": "5.4.12.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca" + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", - "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", + "url": "https://api.github.com/repos/symfony/translation/zipball/42ecc77eb4f229ce2df702a648ec93b8478d76ae", + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae", "shasum": "" }, "require": { @@ -4494,7 +4700,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2021-12-25T19:45:36+00:00", + "time": "2022-08-02T15:52:22+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4525,7 +4731,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.2" + "source": "https://github.com/symfony/translation/tree/v5.4.12" }, "funding": [ { @@ -4545,17 +4751,17 @@ }, { "name": "symfony/translation-contracts", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", "shasum": "" }, "require": { @@ -4564,7 +4770,7 @@ "suggest": { "symfony/translation-implementation": "" }, - "time": "2021-08-17T14:20:01+00:00", + "time": "2022-06-27T16:58:25+00:00", "type": "library", "extra": { "branch-alias": { @@ -4606,7 +4812,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4626,22 +4832,22 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", - "version_normalized": "1.10.0.0", + "version": "1.11.0", + "version_normalized": "1.11.0.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4650,7 +4856,7 @@ "require-dev": { "phpunit/phpunit": "^8.5.13" }, - "time": "2021-03-09T10:59:23+00:00", + "time": "2022-06-03T18:03:27+00:00", "type": "library", "extra": { "branch-alias": { @@ -4681,7 +4887,7 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "install-path": "../webmozart/assert" }, diff --git a/dist/vendor/composer/installed.php b/dist/vendor/composer/installed.php index 7e4fa697e..0031b6d49 100644 --- a/dist/vendor/composer/installed.php +++ b/dist/vendor/composer/installed.php @@ -11,12 +11,12 @@ ), 'versions' => array( 'clue/stream-filter' => array( - 'pretty_version' => 'v1.5.0', - 'version' => '1.5.0.0', + 'pretty_version' => 'v1.6.0', + 'version' => '1.6.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/stream-filter', 'aliases' => array(), - 'reference' => 'aeb7d8ea49c7963d3b581378955dbf5bc49aa320', + 'reference' => 'd6169430c7731d8509da7aecd0af756a5747b78e', 'dev_requirement' => false, ), 'composer/installers' => array( @@ -155,12 +155,12 @@ 'dev_requirement' => false, ), 'firebase/php-jwt' => array( - 'pretty_version' => 'v5.2.0', - 'version' => '5.2.0.0', + 'pretty_version' => 'v5.5.1', + 'version' => '5.5.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), - 'reference' => 'feb0e820b8436873675fd3aca04f3728eb2185cb', + 'reference' => '83b609028194aa042ea33b5af2d41a7427de80e6', 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( @@ -173,21 +173,21 @@ 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '1.5.1', - 'version' => '1.5.1.0', + 'pretty_version' => '1.5.2', + 'version' => '1.5.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), - 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', + 'reference' => 'b94b2807d85443f9719887892882d0329d1e2598', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '1.8.3', - 'version' => '1.8.3.0', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), - 'reference' => '1afdd860a2566ed3c2b0b4a3de6e23434a79ec85', + 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318', 'dev_requirement' => false, ), 'guzzlehttp/ringphp' => array( @@ -197,12 +197,12 @@ ), ), 'justinrainbow/json-schema' => array( - 'pretty_version' => '5.2.11', - 'version' => '5.2.11.0', + 'pretty_version' => '5.2.12', + 'version' => '5.2.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../justinrainbow/json-schema', 'aliases' => array(), - 'reference' => '2ab6744b7296ded80f8cc4f9509abbff393399aa', + 'reference' => 'ad87d5a5ca981228e0e205c2bc7dfb8e24559b60', 'dev_requirement' => false, ), 'lcobucci/clock' => array( @@ -215,12 +215,12 @@ 'dev_requirement' => false, ), 'lcobucci/jwt' => array( - 'pretty_version' => '4.1.5', - 'version' => '4.1.5.0', + 'pretty_version' => '4.2.1', + 'version' => '4.2.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../lcobucci/jwt', 'aliases' => array(), - 'reference' => 'fe2d89f2eaa7087af4aa166c6f480ef04e000582', + 'reference' => '72ac6d807ee51a70ad376ee03a2387e8646e10f3', 'dev_requirement' => false, ), 'league/event' => array( @@ -249,6 +249,24 @@ 0 => '*', ), ), + 'league/uri' => array( + 'pretty_version' => '6.7.2', + 'version' => '6.7.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../league/uri', + 'aliases' => array(), + 'reference' => 'd3b50812dd51f3fbf176344cc2981db03d10fe06', + 'dev_requirement' => false, + ), + 'league/uri-interfaces' => array( + 'pretty_version' => '2.3.0', + 'version' => '2.3.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../league/uri-interfaces', + 'aliases' => array(), + 'reference' => '00e7e2943f76d8cb50c7dfdc2f6dee356e15e383', + 'dev_requirement' => false, + ), 'liuggio/statsd-php-client' => array( 'pretty_version' => 'v1.0.18', 'version' => '1.0.18.0', @@ -265,12 +283,12 @@ ), ), 'mailgun/mailgun-php' => array( - 'pretty_version' => 'v3.5.1', - 'version' => '3.5.1.0', + 'pretty_version' => 'v3.5.4', + 'version' => '3.5.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../mailgun/mailgun-php', 'aliases' => array(), - 'reference' => '4ec42cdaf0b77fe9c4fb92c4236dc9e84e1989c5', + 'reference' => '8765ce557c373243ae9604d1d44d86e037bd1018', 'dev_requirement' => false, ), 'mediawiki/core' => array( @@ -304,21 +322,21 @@ 'dev_requirement' => false, ), 'nesbot/carbon' => array( - 'pretty_version' => '2.55.2', - 'version' => '2.55.2.0', + 'pretty_version' => '2.62.1', + 'version' => '2.62.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), - 'reference' => '8c2a18ce3e67c34efc1b29f64fe61304368259a2', + 'reference' => '01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a', 'dev_requirement' => false, ), 'nyholm/psr7' => array( - 'pretty_version' => '1.4.1', - 'version' => '1.4.1.0', + 'pretty_version' => '1.5.1', + 'version' => '1.5.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nyholm/psr7', 'aliases' => array(), - 'reference' => '2212385b47153ea71b1c1b1374f8cb5e4f7892ec', + 'reference' => 'f734364e38a876a23be4d906a2a089e1315be18a', 'dev_requirement' => false, ), 'onoi/message-reporter' => array( @@ -430,30 +448,30 @@ 'dev_requirement' => false, ), 'php-http/discovery' => array( - 'pretty_version' => '1.14.1', - 'version' => '1.14.1.0', + 'pretty_version' => '1.14.3', + 'version' => '1.14.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../php-http/discovery', 'aliases' => array(), - 'reference' => 'de90ab2b41d7d61609f504e031339776bc8c7223', + 'reference' => '31d8ee46d0215108df16a8527c7438e96a4d7735', 'dev_requirement' => false, ), 'php-http/httplug' => array( - 'pretty_version' => '2.2.0', - 'version' => '2.2.0.0', + 'pretty_version' => '2.3.0', + 'version' => '2.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../php-http/httplug', 'aliases' => array(), - 'reference' => '191a0a1b41ed026b717421931f8d3bd2514ffbf9', + 'reference' => 'f640739f80dfa1152533976e3c112477f69274eb', 'dev_requirement' => false, ), 'php-http/message' => array( - 'pretty_version' => '1.12.0', - 'version' => '1.12.0.0', + 'pretty_version' => '1.13.0', + 'version' => '1.13.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../php-http/message', 'aliases' => array(), - 'reference' => '39eb7548be982a81085fe5a6e2a44268cd586291', + 'reference' => '7886e647a30a966a1a8d1dad1845b71ca8678361', 'dev_requirement' => false, ), 'php-http/message-factory' => array( @@ -499,12 +517,12 @@ 'dev_requirement' => false, ), 'professional-wiki/edtf' => array( - 'pretty_version' => '2.0.0', - 'version' => '2.0.0.0', + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../professional-wiki/edtf', 'aliases' => array(), - 'reference' => '070d4be1a1a2dfbabfacc7d8f5e47092415e78e4', + 'reference' => '2cebb350e0b703d202e6a3a31daf15aa2adb88a7', 'dev_requirement' => false, ), 'psr/container' => array( @@ -601,12 +619,12 @@ 'dev_requirement' => false, ), 'react/promise' => array( - 'pretty_version' => 'v2.8.0', - 'version' => '2.8.0.0', + 'pretty_version' => 'v2.9.0', + 'version' => '2.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), - 'reference' => 'f3cff96a19736714524ca0dd1d4130de73dbbbc4', + 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', 'dev_requirement' => false, ), 'roundcube/plugin-installer' => array( @@ -646,21 +664,21 @@ ), ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v2.5.0', - 'version' => '2.5.0.0', + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), - 'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8', + 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'dev_requirement' => false, ), 'symfony/options-resolver' => array( - 'pretty_version' => 'v5.4.0', - 'version' => '5.4.0.0', + 'pretty_version' => 'v5.4.11', + 'version' => '5.4.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/options-resolver', 'aliases' => array(), - 'reference' => 'b0fb78576487af19c500aaddb269fd36701d4847', + 'reference' => '54f14e36aa73cb8f7261d7686691fd4d75ea2690', 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( @@ -676,12 +694,12 @@ ), ), 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.24.0', - 'version' => '1.24.0.0', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), - 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5', + 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85', 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( @@ -694,21 +712,21 @@ 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v5.4.2', - 'version' => '5.4.2.0', + 'pretty_version' => 'v5.4.12', + 'version' => '5.4.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), - 'reference' => 'ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca', + 'reference' => '42ecc77eb4f229ce2df702a648ec93b8478d76ae', 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( - 'pretty_version' => 'v2.5.0', - 'version' => '2.5.0.0', + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), - 'reference' => 'd28150f0f44ce854e942b671fc2620a98aae1b1e', + 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'dev_requirement' => false, ), 'symfony/translation-implementation' => array( @@ -718,12 +736,12 @@ ), ), 'webmozart/assert' => array( - 'pretty_version' => '1.10.0', - 'version' => '1.10.0.0', + 'pretty_version' => '1.11.0', + 'version' => '1.11.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), - 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', + 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'dev_requirement' => false, ), 'wikimedia/assert' => array( diff --git a/dist/vendor/firebase/php-jwt/LICENSE b/dist/vendor/firebase/php-jwt/LICENSE index cb0c49b33..11c014665 100644 --- a/dist/vendor/firebase/php-jwt/LICENSE +++ b/dist/vendor/firebase/php-jwt/LICENSE @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are met: disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Neuman Vong nor the names of other + * Neither the name of the copyright holder nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/dist/vendor/firebase/php-jwt/README.md b/dist/vendor/firebase/php-jwt/README.md index 9c8b5455b..1d392cd12 100644 --- a/dist/vendor/firebase/php-jwt/README.md +++ b/dist/vendor/firebase/php-jwt/README.md @@ -16,11 +16,18 @@ Use composer to manage your dependencies and download PHP-JWT: composer require firebase/php-jwt ``` +Optionally, install the `paragonie/sodium_compat` package from composer if your +php is < 7.2 or does not have libsodium installed: + +```bash +composer require paragonie/sodium_compat +``` + Example ------- ```php - +$decoded = JWT::decode($jwt, new Key($key, 'HS256')); ``` Example with RS256 (openssl) ---------------------------- ```php - +``` + +Example with a passphrase +------------------------- + +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +// Your passphrase +$passphrase = '[YOUR_PASSPHRASE]'; + +// Your private key file with passphrase +// Can be generated with "ssh-keygen -t rsa -m pem" +$privateKeyFile = '/path/to/key-with-passphrase.pem'; + +// Create a private key of type "resource" +$privateKey = openssl_pkey_get_private( + file_get_contents($privateKeyFile), + $passphrase +); + +$payload = array( + "iss" => "example.org", + "aud" => "example.com", + "iat" => 1356999524, + "nbf" => 1357000000 +); + +$jwt = JWT::encode($payload, $privateKey, 'RS256'); +echo "Encode:\n" . print_r($jwt, true) . "\n"; + +// Get public key from the private key, or pull from from a file. +$publicKey = openssl_pkey_get_details($privateKey)['key']; + +$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256')); +echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; +``` + +Example with EdDSA (libsodium and Ed25519 signature) +---------------------------- +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +// Public and private keys are expected to be Base64 encoded. The last +// non-empty line is used so that keys can be generated with +// sodium_crypto_sign_keypair(). The secret keys generated by other tools may +// need to be adjusted to match the input expected by libsodium. + +$keyPair = sodium_crypto_sign_keypair(); + +$privateKey = base64_encode(sodium_crypto_sign_secretkey($keyPair)); + +$publicKey = base64_encode(sodium_crypto_sign_publickey($keyPair)); + +$payload = array( + "iss" => "example.org", + "aud" => "example.com", + "iat" => 1356999524, + "nbf" => 1357000000 +); + +$jwt = JWT::encode($payload, $privateKey, 'EdDSA'); +echo "Encode:\n" . print_r($jwt, true) . "\n"; + +$decoded = JWT::decode($jwt, new Key($publicKey, 'EdDSA')); +echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; +```` + +Using JWKs +---------- + +```php +use Firebase\JWT\JWK; +use Firebase\JWT\JWT; + +// Set of keys. The "keys" key is required. For example, the JSON response to +// this endpoint: https://www.gstatic.com/iap/verify/public_key-jwk +$jwks = ['keys' => []]; + +// JWK::parseKeySet($jwks) returns an associative array of **kid** to private +// key. Pass this as the second parameter to JWT::decode. +// NOTE: The deprecated $supportedAlgorithm must be supplied when parsing from JWK. +JWT::decode($payload, JWK::parseKeySet($jwks), $supportedAlgorithm); ``` Changelog diff --git a/dist/vendor/firebase/php-jwt/composer.json b/dist/vendor/firebase/php-jwt/composer.json index 25d1cfa96..6146e2dcc 100644 --- a/dist/vendor/firebase/php-jwt/composer.json +++ b/dist/vendor/firebase/php-jwt/composer.json @@ -22,6 +22,9 @@ "require": { "php": ">=5.3.0" }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, "autoload": { "psr-4": { "Firebase\\JWT\\": "src" diff --git a/dist/vendor/firebase/php-jwt/src/BeforeValidException.php b/dist/vendor/firebase/php-jwt/src/BeforeValidException.php index fdf82bd94..c147852b9 100644 --- a/dist/vendor/firebase/php-jwt/src/BeforeValidException.php +++ b/dist/vendor/firebase/php-jwt/src/BeforeValidException.php @@ -1,4 +1,5 @@ array('openssl', 'SHA384'), 'ES256' => array('openssl', 'SHA256'), 'HS256' => array('hash_hmac', 'SHA256'), 'HS384' => array('hash_hmac', 'SHA384'), @@ -49,19 +53,24 @@ class JWT 'RS256' => array('openssl', 'SHA256'), 'RS384' => array('openssl', 'SHA384'), 'RS512' => array('openssl', 'SHA512'), + 'EdDSA' => array('sodium_crypto', 'EdDSA'), ); /** * Decodes a JWT string into a PHP object. * * @param string $jwt The JWT - * @param string|array|resource $key The key, or map of keys. + * @param Key|array|mixed $keyOrKeyArray The Key or array of Key objects. * If the algorithm used is asymmetric, this is the public key - * @param array $allowed_algs List of supported verification algorithms - * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' + * Each Key object contains an algorithm and matching key. + * Supported algorithms are 'ES384','ES256', 'HS256', 'HS384', + * 'HS512', 'RS256', 'RS384', and 'RS512' + * @param array $allowed_algs [DEPRECATED] List of supported verification algorithms. Only + * should be used for backwards compatibility. * * @return object The JWT's payload as a PHP object * + * @throws InvalidArgumentException Provided JWT was empty * @throws UnexpectedValueException Provided JWT was invalid * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf' @@ -71,11 +80,11 @@ class JWT * @uses jsonDecode * @uses urlsafeB64Decode */ - public static function decode($jwt, $key, array $allowed_algs = array()) + public static function decode($jwt, $keyOrKeyArray, array $allowed_algs = array()) { $timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp; - if (empty($key)) { + if (empty($keyOrKeyArray)) { throw new InvalidArgumentException('Key may not be empty'); } $tks = \explode('.', $jwt); @@ -98,27 +107,32 @@ public static function decode($jwt, $key, array $allowed_algs = array()) if (empty(static::$supported_algs[$header->alg])) { throw new UnexpectedValueException('Algorithm not supported'); } - if (!\in_array($header->alg, $allowed_algs)) { - throw new UnexpectedValueException('Algorithm not allowed'); - } - if ($header->alg === 'ES256') { - // OpenSSL expects an ASN.1 DER sequence for ES256 signatures - $sig = self::signatureToDER($sig); - } - if (\is_array($key) || $key instanceof \ArrayAccess) { - if (isset($header->kid)) { - if (!isset($key[$header->kid])) { - throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key'); - } - $key = $key[$header->kid]; - } else { - throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); + list($keyMaterial, $algorithm) = self::getKeyMaterialAndAlgorithm( + $keyOrKeyArray, + empty($header->kid) ? null : $header->kid + ); + + if (empty($algorithm)) { + // Use deprecated "allowed_algs" to determine if the algorithm is supported. + // This opens up the possibility of an attack in some implementations. + // @see https://github.com/firebase/php-jwt/issues/351 + if (!\in_array($header->alg, $allowed_algs)) { + throw new UnexpectedValueException('Algorithm not allowed'); } + } else { + // Check the algorithm + if (!self::constantTimeEquals($algorithm, $header->alg)) { + // See issue #351 + throw new UnexpectedValueException('Incorrect key for this algorithm'); + } + } + if ($header->alg === 'ES256' || $header->alg === 'ES384') { + // OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures + $sig = self::signatureToDER($sig); } - // Check the signature - if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) { + if (!static::verify("$headb64.$bodyb64", $sig, $keyMaterial, $header->alg)) { throw new SignatureInvalidException('Signature verification failed'); } @@ -150,13 +164,14 @@ public static function decode($jwt, $key, array $allowed_algs = array()) /** * Converts and signs a PHP object or array into a JWT string. * - * @param object|array $payload PHP object or array - * @param string $key The secret key. - * If the algorithm used is asymmetric, this is the private key - * @param string $alg The signing algorithm. - * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' - * @param mixed $keyId - * @param array $head An array with header elements to attach + * @param object|array $payload PHP object or array + * @param string|resource $key The secret key. + * If the algorithm used is asymmetric, this is the private key + * @param string $alg The signing algorithm. + * Supported algorithms are 'ES384','ES256', 'HS256', 'HS384', + * 'HS512', 'RS256', 'RS384', and 'RS512' + * @param mixed $keyId + * @param array $head An array with header elements to attach * * @return string A signed JWT * @@ -189,11 +204,12 @@ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $he * @param string $msg The message to sign * @param string|resource $key The secret key * @param string $alg The signing algorithm. - * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' + * Supported algorithms are 'ES384','ES256', 'HS256', 'HS384', + * 'HS512', 'RS256', 'RS384', and 'RS512' * * @return string An encrypted message * - * @throws DomainException Unsupported algorithm was specified + * @throws DomainException Unsupported algorithm or bad key was specified */ public static function sign($msg, $key, $alg = 'HS256') { @@ -209,11 +225,24 @@ public static function sign($msg, $key, $alg = 'HS256') $success = \openssl_sign($msg, $signature, $key, $algorithm); if (!$success) { throw new DomainException("OpenSSL unable to sign data"); - } else { - if ($alg === 'ES256') { - $signature = self::signatureFromDER($signature, 256); - } - return $signature; + } + if ($alg === 'ES256') { + $signature = self::signatureFromDER($signature, 256); + } elseif ($alg === 'ES384') { + $signature = self::signatureFromDER($signature, 384); + } + return $signature; + case 'sodium_crypto': + if (!function_exists('sodium_crypto_sign_detached')) { + throw new DomainException('libsodium is not available'); + } + try { + // The last non-empty line is used as the key. + $lines = array_filter(explode("\n", $key)); + $key = base64_decode(end($lines)); + return sodium_crypto_sign_detached($msg, $key); + } catch (Exception $e) { + throw new DomainException($e->getMessage(), 0, $e); } } } @@ -229,7 +258,7 @@ public static function sign($msg, $key, $alg = 'HS256') * * @return bool * - * @throws DomainException Invalid Algorithm or OpenSSL failure + * @throws DomainException Invalid Algorithm, bad key, or OpenSSL failure */ private static function verify($msg, $signature, $key, $alg) { @@ -250,21 +279,22 @@ private static function verify($msg, $signature, $key, $alg) throw new DomainException( 'OpenSSL error: ' . \openssl_error_string() ); + case 'sodium_crypto': + if (!function_exists('sodium_crypto_sign_verify_detached')) { + throw new DomainException('libsodium is not available'); + } + try { + // The last non-empty line is used as the key. + $lines = array_filter(explode("\n", $key)); + $key = base64_decode(end($lines)); + return sodium_crypto_sign_verify_detached($signature, $msg, $key); + } catch (Exception $e) { + throw new DomainException($e->getMessage(), 0, $e); + } case 'hash_hmac': default: $hash = \hash_hmac($algorithm, $msg, $key, true); - if (\function_exists('hash_equals')) { - return \hash_equals($signature, $hash); - } - $len = \min(static::safeStrlen($signature), static::safeStrlen($hash)); - - $status = 0; - for ($i = 0; $i < $len; $i++) { - $status |= (\ord($signature[$i]) ^ \ord($hash[$i])); - } - $status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash)); - - return ($status === 0); + return self::constantTimeEquals($signature, $hash); } } @@ -352,6 +382,75 @@ public static function urlsafeB64Encode($input) return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_')); } + + /** + * Determine if an algorithm has been provided for each Key + * + * @param Key|array|mixed $keyOrKeyArray + * @param string|null $kid + * + * @throws UnexpectedValueException + * + * @return array containing the keyMaterial and algorithm + */ + private static function getKeyMaterialAndAlgorithm($keyOrKeyArray, $kid = null) + { + if ( + is_string($keyOrKeyArray) + || is_resource($keyOrKeyArray) + || $keyOrKeyArray instanceof OpenSSLAsymmetricKey + ) { + return array($keyOrKeyArray, null); + } + + if ($keyOrKeyArray instanceof Key) { + return array($keyOrKeyArray->getKeyMaterial(), $keyOrKeyArray->getAlgorithm()); + } + + if (is_array($keyOrKeyArray) || $keyOrKeyArray instanceof ArrayAccess) { + if (!isset($kid)) { + throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); + } + if (!isset($keyOrKeyArray[$kid])) { + throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key'); + } + + $key = $keyOrKeyArray[$kid]; + + if ($key instanceof Key) { + return array($key->getKeyMaterial(), $key->getAlgorithm()); + } + + return array($key, null); + } + + throw new UnexpectedValueException( + '$keyOrKeyArray must be a string|resource key, an array of string|resource keys, ' + . 'an instance of Firebase\JWT\Key key or an array of Firebase\JWT\Key keys' + ); + } + + /** + * @param string $left + * @param string $right + * @return bool + */ + public static function constantTimeEquals($left, $right) + { + if (\function_exists('hash_equals')) { + return \hash_equals($left, $right); + } + $len = \min(static::safeStrlen($left), static::safeStrlen($right)); + + $status = 0; + for ($i = 0; $i < $len; $i++) { + $status |= (\ord($left[$i]) ^ \ord($right[$i])); + } + $status |= (static::safeStrlen($left) ^ static::safeStrlen($right)); + + return ($status === 0); + } + /** * Helper method to create a JSON error. * diff --git a/dist/vendor/firebase/php-jwt/src/Key.php b/dist/vendor/firebase/php-jwt/src/Key.php new file mode 100644 index 000000000..f1ede6f27 --- /dev/null +++ b/dist/vendor/firebase/php-jwt/src/Key.php @@ -0,0 +1,59 @@ +keyMaterial = $keyMaterial; + $this->algorithm = $algorithm; + } + + /** + * Return the algorithm valid for this key + * + * @return string + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * @return string|resource|OpenSSLAsymmetricKey + */ + public function getKeyMaterial() + { + return $this->keyMaterial; + } +} diff --git a/dist/vendor/firebase/php-jwt/src/SignatureInvalidException.php b/dist/vendor/firebase/php-jwt/src/SignatureInvalidException.php index 87cb34df7..d35dee9f1 100644 --- a/dist/vendor/firebase/php-jwt/src/SignatureInvalidException.php +++ b/dist/vendor/firebase/php-jwt/src/SignatureInvalidException.php @@ -1,4 +1,5 @@ then( ``` *Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promises triggers callbacks -registered with the promises's `then` method. These callbacks are triggered +reject a promise with a *reason*. Resolving a promise triggers callbacks +registered with the promise's `then` method. These callbacks are triggered only once and in the order in which they were added. - -## Resolving a promise +### Resolving a Promise Promises are fulfilled using the `resolve($value)` method. Resolving a promise with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger @@ -92,8 +90,7 @@ $promise $promise->resolve('reader.'); ``` - -## Promise forwarding +### Promise Forwarding Promises can be chained one after the other. Each then in the chain is a new promise. The return value of a promise is what's forwarded to the next @@ -123,7 +120,7 @@ $promise->resolve('A'); $nextPromise->resolve('B'); ``` -## Promise rejection +### Promise Rejection When a promise is rejected, the `$onRejected` callbacks are invoked with the rejection reason. @@ -140,7 +137,7 @@ $promise->reject('Error!'); // Outputs "Error!" ``` -## Rejection forwarding +### Rejection Forwarding If an exception is thrown in an `$onRejected` callback, subsequent `$onRejected` callbacks are invoked with the thrown exception as the reason. @@ -195,7 +192,8 @@ $promise $promise->reject('Error!'); ``` -# Synchronous wait + +## Synchronous Wait You can synchronously force promises to complete using a promise's `wait` method. When creating a promise, you can provide a wait function that is used @@ -247,8 +245,7 @@ $promise->wait(); > PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' - -## Unwrapping a promise +### Unwrapping a Promise When synchronously waiting on a promise, you are joining the state of the promise into the current state of execution (i.e., return the value of the @@ -275,7 +272,7 @@ wait function will be the value delivered to promise B. **Note**: when you do not unwrap the promise, no value is returned. -# Cancellation +## Cancellation You can cancel a promise that has not yet been fulfilled using the `cancel()` method of a promise. When creating a promise you can provide an optional @@ -283,10 +280,9 @@ cancel function that when invoked cancels the action of computing a resolution of the promise. -# API +## API - -## Promise +### Promise When creating a promise object, you can provide an optional `$waitFn` and `$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is @@ -349,7 +345,7 @@ A promise has the following methods: Rejects the promise with the given `$reason`. -## FulfilledPromise +### FulfilledPromise A fulfilled promise can be created to represent a promise that has been fulfilled. @@ -366,7 +362,7 @@ $promise->then(function ($value) { ``` -## RejectedPromise +### RejectedPromise A rejected promise can be created to represent a promise that has been rejected. @@ -383,7 +379,7 @@ $promise->then(null, function ($reason) { ``` -# Promise interop +## Promise Interoperability This library works with foreign promises that have a `then` method. This means you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) @@ -409,7 +405,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle promise in order to utilize wait and cancel functions with foreign promises. -## Event Loop Integration +### Event Loop Integration In order to keep the stack size constant, Guzzle promises are resolved asynchronously using a task queue. When waiting on promises synchronously, the @@ -437,10 +433,9 @@ $loop->addPeriodicTimer(0, [$queue, 'run']); *TODO*: Perhaps adding a `futureTick()` on each tick would be faster? -# Implementation notes - +## Implementation Notes -## Promise resolution and chaining is handled iteratively +### Promise Resolution and Chaining is Handled Iteratively By shuffling pending handlers from one owner to another, promises are resolved iteratively, allowing for "infinite" then chaining. @@ -476,8 +471,7 @@ all of its pending handlers to the new promise. When the new promise is eventually resolved, all of the pending handlers are delivered the forwarded value. - -## A promise is the deferred. +### A Promise is the Deferred Some promise libraries implement promises using a deferred object to represent a computation and a promise object to represent the delivery of the result of @@ -505,7 +499,10 @@ $promise->resolve('foo'); ## Upgrading from Function API -A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: +A static API was first introduced in 1.4.0, in order to mitigate problems with +functions conflicting between global and local copies of the package. The +function API will be removed in 2.0.0. A migration table has been provided here +for your convenience: | Original Function | Replacement Method | |----------------|----------------| @@ -536,10 +533,12 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. + ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + ## For Enterprise Available as part of the Tidelift Subscription diff --git a/dist/vendor/guzzlehttp/promises/src/EachPromise.php b/dist/vendor/guzzlehttp/promises/src/EachPromise.php index 38ecb59b1..280d79950 100644 --- a/dist/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/dist/vendor/guzzlehttp/promises/src/EachPromise.php @@ -81,16 +81,8 @@ public function promise() $this->iterable->rewind(); $this->refillPending(); } catch (\Throwable $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ $this->aggregate->reject($e); } catch (\Exception $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ $this->aggregate->reject($e); } diff --git a/dist/vendor/guzzlehttp/psr7/CHANGELOG.md b/dist/vendor/guzzlehttp/psr7/CHANGELOG.md index f40736c4e..b4fdf3c68 100644 --- a/dist/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/dist/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -3,12 +3,30 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +## 1.9.0 - 2022-06-20 + +### Added + +- Added `UriComparator::isCrossOrigin` method + +## 1.8.5 - 2022-03-20 + +### Fixed + +- Correct header value validation + +## 1.8.4 - 2022-03-20 + +### Fixed + +- Validate header values properly + ## 1.8.3 - 2021-10-05 ### Fixed diff --git a/dist/vendor/guzzlehttp/psr7/README.md b/dist/vendor/guzzlehttp/psr7/README.md index 464cae4f2..64776cb66 100644 --- a/dist/vendor/guzzlehttp/psr7/README.md +++ b/dist/vendor/guzzlehttp/psr7/README.md @@ -1,6 +1,6 @@ # PSR-7 Message Implementation -This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/) message implementation, several stream decorators, and some helpful functionality like query string parsing. @@ -659,7 +659,7 @@ manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__to `public static function fromParts(array $parts): UriInterface` -Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. +Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components. ### `GuzzleHttp\Psr7\Uri::withQueryValue` @@ -684,6 +684,16 @@ associative array of key => value. Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the provided key are removed. +## Cross-Origin Detection + +`GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin. + +### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin` + +`public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool` + +Determines if a modified URL should be considered cross-origin with respect to an original URL. + ## Reference Resolution `GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according @@ -809,14 +819,24 @@ This of course assumes they will be resolved against the same base URI. If this equivalence or difference of relative references does not mean anything. +## Version Guidance + +| Version | Status | PHP Version | +|---------|----------------|------------------| +| 1.x | Security fixes | >=5.4,<8.1 | +| 2.x | Latest | ^7.2.5 \|\| ^8.0 | + + ## Security If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. + ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + ## For Enterprise Available as part of the Tidelift Subscription diff --git a/dist/vendor/guzzlehttp/psr7/composer.json b/dist/vendor/guzzlehttp/psr7/composer.json index bfa7cfdc1..0e36920db 100644 --- a/dist/vendor/guzzlehttp/psr7/composer.json +++ b/dist/vendor/guzzlehttp/psr7/composer.json @@ -63,11 +63,14 @@ }, "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "config": { "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } } } diff --git a/dist/vendor/guzzlehttp/psr7/src/MessageTrait.php b/dist/vendor/guzzlehttp/psr7/src/MessageTrait.php index 99203bb43..0ac8663da 100644 --- a/dist/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/dist/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -157,17 +157,22 @@ private function setHeaders(array $headers) } } + /** + * @param mixed $value + * + * @return string[] + */ private function normalizeHeaderValue($value) { if (!is_array($value)) { - return $this->trimHeaderValues([$value]); + return $this->trimAndValidateHeaderValues([$value]); } if (count($value) === 0) { throw new \InvalidArgumentException('Header value can not be an empty array.'); } - return $this->trimHeaderValues($value); + return $this->trimAndValidateHeaderValues($value); } /** @@ -178,13 +183,13 @@ private function normalizeHeaderValue($value) * header-field = field-name ":" OWS field-value OWS * OWS = *( SP / HTAB ) * - * @param string[] $values Header values + * @param mixed[] $values Header values * * @return string[] Trimmed header values * * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 */ - private function trimHeaderValues(array $values) + private function trimAndValidateHeaderValues(array $values) { return array_map(function ($value) { if (!is_scalar($value) && null !== $value) { @@ -194,10 +199,20 @@ private function trimHeaderValues(array $values) )); } - return trim((string) $value, " \t"); + $trimmed = trim((string) $value, " \t"); + $this->assertValue($trimmed); + + return $trimmed; }, array_values($values)); } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2 + * + * @param mixed $header + * + * @return void + */ private function assertHeader($header) { if (!is_string($header)) { @@ -210,5 +225,46 @@ private function assertHeader($header) if ($header === '') { throw new \InvalidArgumentException('Header name can not be empty.'); } + + if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) { + throw new \InvalidArgumentException( + sprintf( + '"%s" is not valid header name', + $header + ) + ); + } + } + + /** + * @param string $value + * + * @return void + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2 + * + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + * VCHAR = %x21-7E + * obs-text = %x80-FF + * obs-fold = CRLF 1*( SP / HTAB ) + */ + private function assertValue($value) + { + // The regular expression intentionally does not support the obs-fold production, because as + // per RFC 7230#3.2.4: + // + // A sender MUST NOT generate a message that includes + // line folding (i.e., that has any field-value that contains a match to + // the obs-fold rule) unless the message is intended for packaging + // within the message/http media type. + // + // Clients must not send a request with line folding and a server sending folded headers is + // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting + // folding is not likely to break any legitimate use case. + if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) { + throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value)); + } } } diff --git a/dist/vendor/guzzlehttp/psr7/src/UriComparator.php b/dist/vendor/guzzlehttp/psr7/src/UriComparator.php new file mode 100644 index 000000000..ccf51ffb8 --- /dev/null +++ b/dist/vendor/guzzlehttp/psr7/src/UriComparator.php @@ -0,0 +1,55 @@ +getHost(), $modified->getHost()) !== 0) { + return true; + } + + if ($original->getScheme() !== $modified->getScheme()) { + return true; + } + + if (self::computePort($original) !== self::computePort($modified)) { + return true; + } + + return false; + } + + /** + * @return int + */ + private static function computePort(UriInterface $uri) + { + $port = $uri->getPort(); + + if (null !== $port) { + return $port; + } + + return 'https' === $uri->getScheme() ? 443 : 80; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/dist/vendor/justinrainbow/json-schema/.php_cs.dist b/dist/vendor/justinrainbow/json-schema/.php_cs.dist deleted file mode 100644 index a9e7e4ed1..000000000 --- a/dist/vendor/justinrainbow/json-schema/.php_cs.dist +++ /dev/null @@ -1,34 +0,0 @@ -in(__DIR__); - -/* Based on ^2.1 of php-cs-fixer */ -$config - ->setRules(array( - // default - '@PSR2' => true, - '@Symfony' => true, - // additionally - 'array_syntax' => array('syntax' => 'long'), - 'binary_operator_spaces' => false, - 'concat_space' => array('spacing' => 'one'), - 'no_useless_else' => true, - 'no_useless_return' => true, - 'ordered_imports' => true, - 'phpdoc_no_package' => false, - 'phpdoc_order' => true, - 'phpdoc_summary' => false, - 'pre_increment' => false, - 'increment_style' => false, - 'simplified_null_return' => false, - 'trailing_comma_in_multiline_array' => false, - 'yoda_style' => false, - 'phpdoc_types_order' => array('null_adjustment' => 'none', 'sort_algorithm' => 'none'), - 'no_superfluous_phpdoc_tags' => false, - )) - ->setFinder($finder) -; - -return $config; diff --git a/dist/vendor/justinrainbow/json-schema/demo/README.md b/dist/vendor/justinrainbow/json-schema/demo/README.md deleted file mode 100644 index 0309ee89f..000000000 --- a/dist/vendor/justinrainbow/json-schema/demo/README.md +++ /dev/null @@ -1,14 +0,0 @@ -## JsonSchema\Validator Demo - -This demo script uses the example from the root README.md and provides sample JSON files for testing `JsonSchema\Validator`. - -To change or replace the JSON schema document, please edit `/path/to/json-schema/demo/schema.json`. - -To change or replace the JSON document that is validated, please edit `/path/to/json-schema/demo/data.json`. - -To run the demo, change the path in the following example and run it in your terminal. - -``` -cd /path/to/json-schema/demo -php demo.php // The supplied JSON validates against the schema. -``` diff --git a/dist/vendor/justinrainbow/json-schema/demo/data.json b/dist/vendor/justinrainbow/json-schema/demo/data.json deleted file mode 100644 index 69591b710..000000000 --- a/dist/vendor/justinrainbow/json-schema/demo/data.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "foo":"bar" -} diff --git a/dist/vendor/justinrainbow/json-schema/demo/demo.php b/dist/vendor/justinrainbow/json-schema/demo/demo.php deleted file mode 100644 index 98b518a7b..000000000 --- a/dist/vendor/justinrainbow/json-schema/demo/demo.php +++ /dev/null @@ -1,18 +0,0 @@ -check($data, (object) array('$ref' => 'file://' . realpath('schema.json'))); - -if ($validator->isValid()) { - echo "The supplied JSON validates against the schema.\n"; -} else { - echo "JSON does not validate. Violations:\n"; - foreach ($validator->getErrors() as $error) { - echo sprintf("[%s] %s\n", $error['property'], $error['message']); - } -} diff --git a/dist/vendor/justinrainbow/json-schema/demo/schema.json b/dist/vendor/justinrainbow/json-schema/demo/schema.json deleted file mode 100644 index e6307dc1c..000000000 --- a/dist/vendor/justinrainbow/json-schema/demo/schema.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "object" -} diff --git a/dist/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php b/dist/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php index 0ef328431..efc0abbc4 100644 --- a/dist/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php +++ b/dist/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php @@ -134,7 +134,7 @@ protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = fa */ protected function validateTypeNameWording($type) { - if (!isset(self::$wording[$type])) { + if (!array_key_exists($type, self::$wording)) { throw new StandardUnexpectedValueException( sprintf( 'No wording for %s available, expected wordings are: [%s]', diff --git a/dist/vendor/lcobucci/jwt/composer.json b/dist/vendor/lcobucci/jwt/composer.json index a9369762c..dd3b2d7d6 100644 --- a/dist/vendor/lcobucci/jwt/composer.json +++ b/dist/vendor/lcobucci/jwt/composer.json @@ -1,14 +1,14 @@ { "name": "lcobucci/jwt", - "type": "library", "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "license": [ + "BSD-3-Clause" + ], + "type": "library", "keywords": [ "JWT", "JWS" ], - "license": [ - "BSD-3-Clause" - ], "authors": [ { "name": "Luís Cobucci", @@ -29,19 +29,15 @@ "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, - "config": { - "preferred-install": "dist", - "sort-packages": true - }, "autoload": { "psr-4": { "Lcobucci\\JWT\\": "src" @@ -56,5 +52,15 @@ ], "Lcobucci\\JWT\\FunctionalTests\\": "test/functional" } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "phpstan/extension-installer": true, + "infection/extension-installer": true, + "ocramius/package-versions": true + }, + "preferred-install": "dist", + "sort-packages": true } } diff --git a/dist/vendor/lcobucci/jwt/src/JwtFacade.php b/dist/vendor/lcobucci/jwt/src/JwtFacade.php new file mode 100644 index 000000000..45c52a1f4 --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/JwtFacade.php @@ -0,0 +1,66 @@ +parser = $parser ?? new Token\Parser(new JoseEncoder()); + $this->clock = $clock ?? SystemClock::fromSystemTimezone(); + } + + /** @param Closure(Builder, DateTimeImmutable):Builder $customiseBuilder */ + public function issue( + Signer $signer, + Key $signingKey, + Closure $customiseBuilder + ): UnencryptedToken { + $builder = new Token\Builder(new JoseEncoder(), ChainedFormatter::withUnixTimestampDates()); + + $now = $this->clock->now(); + $builder + ->issuedAt($now) + ->canOnlyBeUsedAfter($now) + ->expiresAt($now->modify('+5 minutes')); + + return $customiseBuilder($builder, $now)->getToken($signer, $signingKey); + } + + public function parse( + string $jwt, + SignedWith $signedWith, + ValidAt $validAt, + Constraint ...$constraints + ): UnencryptedToken { + $token = $this->parser->parse($jwt); + assert($token instanceof UnencryptedToken); + + (new Validator())->assert( + $token, + $signedWith, + $validAt, + ...$constraints + ); + + return $token; + } +} diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Blake2b.php b/dist/vendor/lcobucci/jwt/src/Signer/Blake2b.php new file mode 100644 index 000000000..71f2d9dda --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Signer/Blake2b.php @@ -0,0 +1,36 @@ +contents()); + + if ($actualKeyLength < self::MINIMUM_KEY_LENGTH_IN_BITS) { + throw InvalidKeyProvided::tooShort(self::MINIMUM_KEY_LENGTH_IN_BITS, $actualKeyLength); + } + + return sodium_crypto_generichash($payload, $key->contents()); + } + + public function verify(string $expected, string $payload, Key $key): bool + { + return hash_equals($expected, $this->sign($payload, $key)); + } +} diff --git a/dist/vendor/lcobucci/jwt/src/Signer/CannotSignPayload.php b/dist/vendor/lcobucci/jwt/src/Signer/CannotSignPayload.php index 418a8dce4..35cc4d6dd 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/CannotSignPayload.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/CannotSignPayload.php @@ -10,6 +10,6 @@ final class CannotSignPayload extends InvalidArgumentException implements Except { public static function errorHappened(string $error): self { - return new self('There was an error while creating the signature: ' . $error); + return new self('There was an error while creating the signature:' . $error); } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa.php b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa.php index f8ada157b..7291890a3 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa.php @@ -26,28 +26,43 @@ final public function sign(string $payload, Key $key): string { return $this->converter->fromAsn1( $this->createSignature($key->contents(), $key->passphrase(), $payload), - $this->keyLength() + $this->pointLength() ); } final public function verify(string $expected, string $payload, Key $key): bool { return $this->verifySignature( - $this->converter->toAsn1($expected, $this->keyLength()), + $this->converter->toAsn1($expected, $this->pointLength()), $payload, $key->contents() ); } - final public function keyType(): int + /** {@inheritdoc} */ + final protected function guardAgainstIncompatibleKey(int $type, int $lengthInBits): void { - return OPENSSL_KEYTYPE_EC; + if ($type !== OPENSSL_KEYTYPE_EC) { + throw InvalidKeyProvided::incompatibleKeyType( + self::KEY_TYPE_MAP[OPENSSL_KEYTYPE_EC], + self::KEY_TYPE_MAP[$type], + ); + } + + $expectedKeyLength = $this->expectedKeyLength(); + + if ($lengthInBits !== $expectedKeyLength) { + throw InvalidKeyProvided::incompatibleKeyLength($expectedKeyLength, $lengthInBits); + } } + /** @internal */ + abstract public function expectedKeyLength(): int; + /** * Returns the length of each point in the signature, so that we can calculate and verify R and S points properly * * @internal */ - abstract public function keyLength(): int; + abstract public function pointLength(): int; } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php index 36f6ec12a..ff00f4d47 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php @@ -19,8 +19,13 @@ public function algorithm(): int return OPENSSL_ALGO_SHA256; } - public function keyLength(): int + public function pointLength(): int { return 64; } + + public function expectedKeyLength(): int + { + return 256; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php index d3c5dbcee..fa6dd6577 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php @@ -19,8 +19,13 @@ public function algorithm(): int return OPENSSL_ALGO_SHA384; } - public function keyLength(): int + public function pointLength(): int { return 96; } + + public function expectedKeyLength(): int + { + return 384; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php index 1495d13ba..35857869e 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php @@ -19,8 +19,13 @@ public function algorithm(): int return OPENSSL_ALGO_SHA512; } - public function keyLength(): int + public function pointLength(): int { return 132; } + + public function expectedKeyLength(): int + { + return 521; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha256.php b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha256.php new file mode 100644 index 000000000..6f2699d08 --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Signer/Ecdsa/UnsafeSha256.php @@ -0,0 +1,27 @@ +contents()); + $expectedKeyLength = $this->minimumBitsLengthForKey(); + if ($actualKeyLength < $expectedKeyLength) { + throw InvalidKeyProvided::tooShort($expectedKeyLength, $actualKeyLength); + } + return hash_hmac($this->algorithm(), $payload, $key->contents(), true); } @@ -21,4 +28,7 @@ final public function verify(string $expected, string $payload, Key $key): bool } abstract public function algorithm(): string; + + /** @return positive-int */ + abstract public function minimumBitsLengthForKey(): int; } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php index 4be692e55..e19992ec3 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php @@ -16,4 +16,9 @@ public function algorithm(): string { return 'sha256'; } + + public function minimumBitsLengthForKey(): int + { + return 256; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php index 4cf044eee..ab795bc31 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php @@ -16,4 +16,9 @@ public function algorithm(): string { return 'sha384'; } + + public function minimumBitsLengthForKey(): int + { + return 384; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php index b9ff72c22..69716122b 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php @@ -16,4 +16,9 @@ public function algorithm(): string { return 'sha512'; } + + public function minimumBitsLengthForKey(): int + { + return 512; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Hmac/UnsafeSha256.php b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/UnsafeSha256.php new file mode 100644 index 000000000..3b66132d4 --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Signer/Hmac/UnsafeSha256.php @@ -0,0 +1,25 @@ +contents = $contents; $this->passphrase = $passphrase; } public static function empty(): self { - return new self('', ''); + $emptyKey = new self('empty', 'empty'); + $emptyKey->contents = ''; + $emptyKey->passphrase = ''; + + return $emptyKey; } + /** @param non-empty-string $contents */ public static function plainText(string $contents, string $passphrase = ''): self { return new self($contents, $passphrase); } + /** @param non-empty-string $contents */ public static function base64Encoded(string $contents, string $passphrase = ''): self { $decoded = SodiumBase64Polyfill::base642bin( @@ -39,6 +52,7 @@ public static function base64Encoded(string $contents, string $passphrase = ''): SodiumBase64Polyfill::SODIUM_BASE64_VARIANT_ORIGINAL ); + // @phpstan-ignore-next-line return new self($decoded, $passphrase); } @@ -53,6 +67,7 @@ public static function file(string $path, string $passphrase = ''): self $contents = $file->fread($file->getSize()); assert(is_string($contents)); + assert($contents !== ''); return new self($contents, $passphrase); } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/OpenSSL.php b/dist/vendor/lcobucci/jwt/src/Signer/OpenSSL.php index b030e75a0..0af618f71 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/OpenSSL.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/OpenSSL.php @@ -10,7 +10,7 @@ use function assert; use function is_array; use function is_bool; -use function is_string; +use function is_int; use function openssl_error_string; use function openssl_free_key; use function openssl_pkey_get_details; @@ -19,8 +19,21 @@ use function openssl_sign; use function openssl_verify; +use const OPENSSL_KEYTYPE_DH; +use const OPENSSL_KEYTYPE_DSA; +use const OPENSSL_KEYTYPE_EC; +use const OPENSSL_KEYTYPE_RSA; +use const PHP_EOL; + abstract class OpenSSL implements Signer { + protected const KEY_TYPE_MAP = [ + OPENSSL_KEYTYPE_RSA => 'RSA', + OPENSSL_KEYTYPE_DSA => 'DSA', + OPENSSL_KEYTYPE_DH => 'DH', + OPENSSL_KEYTYPE_EC => 'EC', + ]; + /** * @throws CannotSignPayload * @throws InvalidKeyProvided @@ -36,10 +49,7 @@ final protected function createSignature( $signature = ''; if (! openssl_sign($payload, $signature, $key, $this->algorithm())) { - $error = openssl_error_string(); - assert(is_string($error)); - - throw CannotSignPayload::errorHappened($error); + throw CannotSignPayload::errorHappened($this->fullOpenSSLErrorString()); } return $signature; @@ -97,20 +107,34 @@ private function getPublicKey(string $pem) private function validateKey($key): void { if (is_bool($key)) { - $error = openssl_error_string(); - assert(is_string($error)); - - throw InvalidKeyProvided::cannotBeParsed($error); + throw InvalidKeyProvided::cannotBeParsed($this->fullOpenSSLErrorString()); } $details = openssl_pkey_get_details($key); assert(is_array($details)); - if (! array_key_exists('key', $details) || $details['type'] !== $this->keyType()) { - throw InvalidKeyProvided::incompatibleKey(); + assert(array_key_exists('bits', $details)); + assert(is_int($details['bits'])); + assert(array_key_exists('type', $details)); + assert(is_int($details['type'])); + + $this->guardAgainstIncompatibleKey($details['type'], $details['bits']); + } + + private function fullOpenSSLErrorString(): string + { + $error = ''; + + while ($msg = openssl_error_string()) { + $error .= PHP_EOL . '* ' . $msg; } + + return $error; } + /** @throws InvalidKeyProvided */ + abstract protected function guardAgainstIncompatibleKey(int $type, int $lengthInBits): void; + /** @param resource|OpenSSLAsymmetricKey $key */ private function freeKey($key): void { @@ -121,13 +145,6 @@ private function freeKey($key): void openssl_free_key($key); // Deprecated and no longer necessary as of PHP >= 8.0 } - /** - * Returns the type of key to be used to create/verify the signature (using OpenSSL constants) - * - * @internal - */ - abstract public function keyType(): int; - /** * Returns which algorithm to be used to create/verify the signature (using OpenSSL constants) * diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Rsa.php b/dist/vendor/lcobucci/jwt/src/Signer/Rsa.php index ff54dd321..ba7d72d5e 100644 --- a/dist/vendor/lcobucci/jwt/src/Signer/Rsa.php +++ b/dist/vendor/lcobucci/jwt/src/Signer/Rsa.php @@ -7,6 +7,8 @@ abstract class Rsa extends OpenSSL { + private const MINIMUM_KEY_LENGTH = 2048; + final public function sign(string $payload, Key $key): string { return $this->createSignature($key->contents(), $key->passphrase(), $payload); @@ -17,8 +19,17 @@ final public function verify(string $expected, string $payload, Key $key): bool return $this->verifySignature($expected, $payload, $key->contents()); } - final public function keyType(): int + final protected function guardAgainstIncompatibleKey(int $type, int $lengthInBits): void { - return OPENSSL_KEYTYPE_RSA; + if ($type !== OPENSSL_KEYTYPE_RSA) { + throw InvalidKeyProvided::incompatibleKeyType( + self::KEY_TYPE_MAP[OPENSSL_KEYTYPE_RSA], + self::KEY_TYPE_MAP[$type], + ); + } + + if ($lengthInBits < self::MINIMUM_KEY_LENGTH) { + throw InvalidKeyProvided::tooShort(self::MINIMUM_KEY_LENGTH, $lengthInBits); + } } } diff --git a/dist/vendor/lcobucci/jwt/src/Signer/Rsa/UnsafeSha256.php b/dist/vendor/lcobucci/jwt/src/Signer/Rsa/UnsafeSha256.php new file mode 100644 index 000000000..e6e67f291 --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Signer/Rsa/UnsafeSha256.php @@ -0,0 +1,22 @@ +converter = $converter; + } + + public static function create(): UnsafeEcdsa + { + return new static(new MultibyteStringConverter()); // @phpstan-ignore-line + } + + final public function sign(string $payload, Key $key): string + { + return $this->converter->fromAsn1( + $this->createSignature($key->contents(), $key->passphrase(), $payload), + $this->pointLength() + ); + } + + final public function verify(string $expected, string $payload, Key $key): bool + { + return $this->verifySignature( + $this->converter->toAsn1($expected, $this->pointLength()), + $payload, + $key->contents() + ); + } + + // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter + final protected function guardAgainstIncompatibleKey(int $type, int $lengthInBits): void + { + if ($type !== OPENSSL_KEYTYPE_EC) { + throw InvalidKeyProvided::incompatibleKeyType( + self::KEY_TYPE_MAP[OPENSSL_KEYTYPE_EC], + self::KEY_TYPE_MAP[$type], + ); + } + } + + /** + * Returns the length of each point in the signature, so that we can calculate and verify R and S points properly + * + * @internal + */ + abstract public function pointLength(): int; +} diff --git a/dist/vendor/lcobucci/jwt/src/Signer/UnsafeRsa.php b/dist/vendor/lcobucci/jwt/src/Signer/UnsafeRsa.php new file mode 100644 index 000000000..182ef806d --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Signer/UnsafeRsa.php @@ -0,0 +1,31 @@ +createSignature($key->contents(), $key->passphrase(), $payload); + } + + final public function verify(string $expected, string $payload, Key $key): bool + { + return $this->verifySignature($expected, $payload, $key->contents()); + } + + // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter + final protected function guardAgainstIncompatibleKey(int $type, int $lengthInBits): void + { + if ($type !== OPENSSL_KEYTYPE_RSA) { + throw InvalidKeyProvided::incompatibleKeyType( + self::KEY_TYPE_MAP[OPENSSL_KEYTYPE_RSA], + self::KEY_TYPE_MAP[$type], + ); + } + } +} diff --git a/dist/vendor/lcobucci/jwt/src/Token/DataSet.php b/dist/vendor/lcobucci/jwt/src/Token/DataSet.php index f9256d6f5..504b2f414 100644 --- a/dist/vendor/lcobucci/jwt/src/Token/DataSet.php +++ b/dist/vendor/lcobucci/jwt/src/Token/DataSet.php @@ -11,7 +11,7 @@ final class DataSet private array $data; private string $encoded; - /** @param mixed[] $data */ + /** @param array $data */ public function __construct(array $data, string $encoded) { $this->data = $data; @@ -33,7 +33,7 @@ public function has(string $name): bool return array_key_exists($name, $this->data); } - /** @return mixed[] */ + /** @return array */ public function all(): array { return $this->data; diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/CannotValidateARegisteredClaim.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/CannotValidateARegisteredClaim.php new file mode 100644 index 000000000..4afb7cb7d --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/CannotValidateARegisteredClaim.php @@ -0,0 +1,17 @@ +claim = $claim; + $this->expectedValue = $expectedValue; + } + + public function assert(Token $token): void + { + if (! $token instanceof UnencryptedToken) { + throw ConstraintViolation::error('You should pass a plain token', $this); + } + + $claims = $token->claims(); + + if (! $claims->has($this->claim)) { + throw ConstraintViolation::error('The token does not have the claim "' . $this->claim . '"', $this); + } + + if ($claims->get($this->claim) !== $this->expectedValue) { + throw ConstraintViolation::error( + 'The claim "' . $this->claim . '" does not have the expected value', + $this + ); + } + } +} diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php index 0d3a19406..c0ad8a01c 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IdentifiedBy.php @@ -19,8 +19,9 @@ public function __construct(string $id) public function assert(Token $token): void { if (! $token->isIdentifiedBy($this->id)) { - throw new ConstraintViolation( - 'The token is not identified with the expected ID' + throw ConstraintViolation::error( + 'The token is not identified with the expected ID', + $this ); } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php index 5f5346e32..c46281507 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/IssuedBy.php @@ -20,8 +20,9 @@ public function __construct(string ...$issuers) public function assert(Token $token): void { if (! $token->hasBeenIssuedBy(...$this->issuers)) { - throw new ConstraintViolation( - 'The token was not issued by the given issuers' + throw ConstraintViolation::error( + 'The token was not issued by the given issuers', + $this ); } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/LooseValidAt.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/LooseValidAt.php index 5b1b7ae6d..22e0930db 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/LooseValidAt.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/LooseValidAt.php @@ -7,10 +7,10 @@ use DateTimeInterface; use Lcobucci\Clock\Clock; use Lcobucci\JWT\Token; -use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\ConstraintViolation; +use Lcobucci\JWT\Validation\ValidAt as ValidAtInterface; -final class LooseValidAt implements Constraint +final class LooseValidAt implements ValidAtInterface { private Clock $clock; private DateInterval $leeway; @@ -47,7 +47,7 @@ public function assert(Token $token): void private function assertExpiration(Token $token, DateTimeInterface $now): void { if ($token->isExpired($now)) { - throw new ConstraintViolation('The token is expired'); + throw ConstraintViolation::error('The token is expired', $this); } } @@ -55,7 +55,7 @@ private function assertExpiration(Token $token, DateTimeInterface $now): void private function assertMinimumTime(Token $token, DateTimeInterface $now): void { if (! $token->isMinimumTimeBefore($now)) { - throw new ConstraintViolation('The token cannot be used yet'); + throw ConstraintViolation::error('The token cannot be used yet', $this); } } @@ -63,7 +63,7 @@ private function assertMinimumTime(Token $token, DateTimeInterface $now): void private function assertIssueTime(Token $token, DateTimeInterface $now): void { if (! $token->hasBeenIssuedBefore($now)) { - throw new ConstraintViolation('The token was issued in the future'); + throw ConstraintViolation::error('The token was issued in the future', $this); } } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/PermittedFor.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/PermittedFor.php index 1155697a0..ed2ce8ee7 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/PermittedFor.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/PermittedFor.php @@ -19,8 +19,9 @@ public function __construct(string $audience) public function assert(Token $token): void { if (! $token->isPermittedFor($this->audience)) { - throw new ConstraintViolation( - 'The token is not allowed to be used by this audience' + throw ConstraintViolation::error( + 'The token is not allowed to be used by this audience', + $this ); } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/RelatedTo.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/RelatedTo.php index 8beecd70c..dc2461a2f 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/RelatedTo.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/RelatedTo.php @@ -19,8 +19,9 @@ public function __construct(string $subject) public function assert(Token $token): void { if (! $token->isRelatedTo($this->subject)) { - throw new ConstraintViolation( - 'The token is not related to the expected subject' + throw ConstraintViolation::error( + 'The token is not related to the expected subject', + $this ); } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/SignedWith.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/SignedWith.php index 1bc1e905f..150b6a384 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/SignedWith.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/SignedWith.php @@ -6,10 +6,10 @@ use Lcobucci\JWT\Signer; use Lcobucci\JWT\Token; use Lcobucci\JWT\UnencryptedToken; -use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\ConstraintViolation; +use Lcobucci\JWT\Validation\SignedWith as SignedWithInterface; -final class SignedWith implements Constraint +final class SignedWith implements SignedWithInterface { private Signer $signer; private Signer\Key $key; @@ -23,15 +23,15 @@ public function __construct(Signer $signer, Signer\Key $key) public function assert(Token $token): void { if (! $token instanceof UnencryptedToken) { - throw new ConstraintViolation('You should pass a plain token'); + throw ConstraintViolation::error('You should pass a plain token', $this); } if ($token->headers()->get('alg') !== $this->signer->algorithmId()) { - throw new ConstraintViolation('Token signer mismatch'); + throw ConstraintViolation::error('Token signer mismatch', $this); } if (! $this->signer->verify($token->signature()->hash(), $token->payload(), $this->key)) { - throw new ConstraintViolation('Token signature mismatch'); + throw ConstraintViolation::error('Token signature mismatch', $this); } } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/StrictValidAt.php b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/StrictValidAt.php index bb221092a..5a1738a12 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/Constraint/StrictValidAt.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/Constraint/StrictValidAt.php @@ -8,10 +8,10 @@ use Lcobucci\Clock\Clock; use Lcobucci\JWT\Token; use Lcobucci\JWT\UnencryptedToken; -use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\ConstraintViolation; +use Lcobucci\JWT\Validation\ValidAt as ValidAtInterface; -final class StrictValidAt implements Constraint +final class StrictValidAt implements ValidAtInterface { private Clock $clock; private DateInterval $leeway; @@ -38,7 +38,7 @@ private function guardLeeway(?DateInterval $leeway): DateInterval public function assert(Token $token): void { if (! $token instanceof UnencryptedToken) { - throw new ConstraintViolation('You should pass a plain token'); + throw ConstraintViolation::error('You should pass a plain token', $this); } $now = $this->clock->now(); @@ -52,11 +52,11 @@ public function assert(Token $token): void private function assertExpiration(UnencryptedToken $token, DateTimeInterface $now): void { if (! $token->claims()->has(Token\RegisteredClaims::EXPIRATION_TIME)) { - throw new ConstraintViolation('"Expiration Time" claim missing'); + throw ConstraintViolation::error('"Expiration Time" claim missing', $this); } if ($token->isExpired($now)) { - throw new ConstraintViolation('The token is expired'); + throw ConstraintViolation::error('The token is expired', $this); } } @@ -64,11 +64,11 @@ private function assertExpiration(UnencryptedToken $token, DateTimeInterface $no private function assertMinimumTime(UnencryptedToken $token, DateTimeInterface $now): void { if (! $token->claims()->has(Token\RegisteredClaims::NOT_BEFORE)) { - throw new ConstraintViolation('"Not Before" claim missing'); + throw ConstraintViolation::error('"Not Before" claim missing', $this); } if (! $token->isMinimumTimeBefore($now)) { - throw new ConstraintViolation('The token cannot be used yet'); + throw ConstraintViolation::error('The token cannot be used yet', $this); } } @@ -76,11 +76,11 @@ private function assertMinimumTime(UnencryptedToken $token, DateTimeInterface $n private function assertIssueTime(UnencryptedToken $token, DateTimeInterface $now): void { if (! $token->claims()->has(Token\RegisteredClaims::ISSUED_AT)) { - throw new ConstraintViolation('"Issued At" claim missing'); + throw ConstraintViolation::error('"Issued At" claim missing', $this); } if (! $token->hasBeenIssuedBefore($now)) { - throw new ConstraintViolation('The token was issued in the future'); + throw ConstraintViolation::error('The token was issued in the future', $this); } } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/ConstraintViolation.php b/dist/vendor/lcobucci/jwt/src/Validation/ConstraintViolation.php index 39a56edcc..cb1abeb74 100644 --- a/dist/vendor/lcobucci/jwt/src/Validation/ConstraintViolation.php +++ b/dist/vendor/lcobucci/jwt/src/Validation/ConstraintViolation.php @@ -6,6 +6,21 @@ use Lcobucci\JWT\Exception; use RuntimeException; +use function get_class; + final class ConstraintViolation extends RuntimeException implements Exception { + /** + * @readonly + * @var class-string|null + */ + public ?string $constraint = null; + + public static function error(string $message, Constraint $constraint): self + { + $exception = new self($message); + $exception->constraint = get_class($constraint); + + return $exception; + } } diff --git a/dist/vendor/lcobucci/jwt/src/Validation/SignedWith.php b/dist/vendor/lcobucci/jwt/src/Validation/SignedWith.php new file mode 100644 index 000000000..e721095f3 --- /dev/null +++ b/dist/vendor/lcobucci/jwt/src/Validation/SignedWith.php @@ -0,0 +1,8 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; + +interface AuthorityInterface extends UriComponentInterface +{ + /** + * Returns the host component of the authority. + */ + public function getHost(): ?string; + + /** + * Returns the port component of the authority. + */ + public function getPort(): ?int; + + /** + * Returns the user information component of the authority. + */ + public function getUserInfo(): ?string; + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * A null value provided for the host is equivalent to removing the host + * information. + * + * @param ?string $host + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + * @throws IdnSupportMissing for component or transformations + * requiring IDN support when IDN support is not present + * or misconfigured. + */ + public function withHost(?string $host): self; + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param ?int $port + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withPort(?int $port): self; + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; a null value for the user is equivalent to removing user + * information. + * + * @param ?string $user + * @param ?string $password + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withUserInfo(?string $user, ?string $password = null): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php new file mode 100644 index 000000000..1e4f38566 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface DataPathInterface extends PathInterface +{ + /** + * Retrieve the data mime type associated to the URI. + * + * If no mimetype is present, this method MUST return the default mimetype 'text/plain'. + * + * @see http://tools.ietf.org/html/rfc2397#section-2 + */ + public function getMimeType(): string; + + /** + * Retrieve the parameters associated with the Mime Type of the URI. + * + * If no parameters is present, this method MUST return the default parameter 'charset=US-ASCII'. + * + * @see http://tools.ietf.org/html/rfc2397#section-2 + */ + public function getParameters(): string; + + /** + * Retrieve the mediatype associated with the URI. + * + * If no mediatype is present, this method MUST return the default parameter 'text/plain;charset=US-ASCII'. + * + * @see http://tools.ietf.org/html/rfc2397#section-3 + * + * @return string The URI scheme. + */ + public function getMediaType(): string; + + /** + * Retrieves the data string. + * + * Retrieves the data part of the path. If no data part is provided return + * a empty string + */ + public function getData(): string; + + /** + * Tells whether the data is binary safe encoded. + */ + public function isBinaryData(): bool; + + /** + * Save the data to a specific file. + */ + public function save(string $path, string $mode = 'w'): \SplFileObject; + + /** + * Returns an instance where the data part is base64 encoded. + * + * This method MUST retain the state of the current instance, and return + * an instance where the data part is base64 encoded + */ + public function toBinary(): self; + + /** + * Returns an instance where the data part is url encoded following RFC3986 rules. + * + * This method MUST retain the state of the current instance, and return + * an instance where the data part is url encoded + */ + public function toAscii(): self; + + /** + * Return an instance with the specified mediatype parameters. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified mediatype parameters. + * + * Users must provide encoded characters. + * + * An empty parameters value is equivalent to removing the parameter. + */ + public function withParameters(string $parameters): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php new file mode 100644 index 000000000..2490310f1 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\SyntaxError; + +/** + * @extends \IteratorAggregate + */ +interface DomainHostInterface extends \Countable, HostInterface, \IteratorAggregate +{ + /** + * Returns the labels total number. + */ + public function count(): int; + + /** + * Iterate over the Domain labels. + * + * @return \Iterator + */ + public function getIterator(): \Iterator; + + /** + * Retrieves a single host label. + * + * If the label offset has not been set, returns the null value. + */ + public function get(int $offset): ?string; + + /** + * Returns the associated key for a specific label or all the keys. + * + * @param ?string $label + * + * @return int[] + */ + public function keys(?string $label = null): array; + + /** + * Tells whether the domain is absolute. + */ + public function isAbsolute(): bool; + + /** + * Prepends a label to the host. + */ + public function prepend(string $label): self; + + /** + * Appends a label to the host. + */ + public function append(string $label): self; + + /** + * Returns an instance with its Root label. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + public function withRootLabel(): self; + + /** + * Returns an instance without its Root label. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + public function withoutRootLabel(): self; + + /** + * Returns an instance with the modified label. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the new label + * + * If $key is non-negative, the added label will be the label at $key position from the start. + * If $key is negative, the added label will be the label at $key position from the end. + * + * @throws SyntaxError If the key is invalid + */ + public function withLabel(int $key, string $label): self; + + /** + * Returns an instance without the specified label. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified component + * + * If $key is non-negative, the removed label will be the label at $key position from the start. + * If $key is negative, the removed label will be the label at $key position from the end. + * + * @param int ...$keys + * + * @throws SyntaxError If the key is invalid + */ + public function withoutLabel(int ...$keys): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php new file mode 100644 index 000000000..3d80f0661 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface FragmentInterface extends UriComponentInterface +{ + /** + * Returns the decoded fragment. + */ + public function decoded(): ?string; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/HostInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/HostInterface.php new file mode 100644 index 000000000..a8b8bb350 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/HostInterface.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface HostInterface extends UriComponentInterface +{ + /** + * Returns the ascii representation. + */ + public function toAscii(): ?string; + + /** + * Returns the unicode representation. + */ + public function toUnicode(): ?string; + + /** + * Returns the IP version. + * + * If the host is a not an IP this method will return null + */ + public function getIpVersion(): ?string; + + /** + * Returns the IP component If the Host is an IP address. + * + * If the host is a not an IP this method will return null + */ + public function getIp(): ?string; + + /** + * Tells whether the host is a domain name. + */ + public function isDomain(): bool; + + /** + * Tells whether the host is an IP Address. + */ + public function isIp(): bool; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php new file mode 100644 index 000000000..1e2242ab5 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface IpHostInterface extends HostInterface +{ + /** + * Returns whether or not the host is an IPv4 address. + */ + public function isIpv4(): bool; + /** + * Returns whether or not the host is an IPv6 address. + */ + public function isIpv6(): bool; + + /** + * Returns whether or not the host is an IPv6 address. + */ + public function isIpFuture(): bool; + + /** + * Returns whether or not the host has a ZoneIdentifier. + * + * @see http://tools.ietf.org/html/rfc6874#section-4 + */ + public function hasZoneIdentifier(): bool; + + /** + * Returns an host without its zone identifier according to RFC6874. + * + * This method MUST retain the state of the current instance, and return + * an instance without the host zone identifier according to RFC6874 + * + * @see http://tools.ietf.org/html/rfc6874#section-4 + */ + public function withoutZoneIdentifier(): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/PathInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/PathInterface.php new file mode 100644 index 000000000..389c0ff0d --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/PathInterface.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\SyntaxError; + +interface PathInterface extends UriComponentInterface +{ + /** + * Returns the decoded path. + */ + public function decoded(): string; + + /** + * Returns whether or not the path is absolute or relative. + */ + public function isAbsolute(): bool; + + /** + * Returns whether or not the path has a trailing delimiter. + */ + public function hasTrailingSlash(): bool; + + /** + * Returns an instance without dot segments. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component normalized by removing + * the dot segment. + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withoutDotSegments(): self; + + /** + * Returns an instance with a leading slash. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component with a leading slash + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withLeadingSlash(): self; + + /** + * Returns an instance without a leading slash. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component without a leading slash + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withoutLeadingSlash(): self; + + /** + * Returns an instance with a trailing slash. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component with a trailing slash + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withTrailingSlash(): self; + + /** + * Returns an instance without a trailing slash. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component without a trailing slash + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withoutTrailingSlash(): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/PortInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/PortInterface.php new file mode 100644 index 000000000..7230c4ad1 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/PortInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface PortInterface extends UriComponentInterface +{ + /** + * Returns the integer representation of the Port. + */ + public function toInt(): ?int; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php new file mode 100644 index 000000000..f7081ea25 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +/** + * @extends \IteratorAggregate + */ +interface QueryInterface extends \Countable, \IteratorAggregate, UriComponentInterface +{ + /** + * Returns the query separator. + */ + public function getSeparator(): string; + + /** + * Returns the number of key/value pairs present in the object. + */ + public function count(): int; + + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + * + * The pair is represented as an array where the first value is the pair key + * and the second value the pair value. + * + * The key of each pair is a string + * The value of each pair is a scalar or the null value + * + * @return \Iterator + */ + public function getIterator(): \Iterator; + + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + * + * The return type is as a Iterator where its offset is the pair key and its value the pair value. + * + * The key of each pair is a string + * The value of each pair is a scalar or the null value + * + * @return iterable + */ + public function pairs(): iterable; + + /** + * Tells whether a pair with a specific name exists. + * + * @see https://url.spec.whatwg.org/#dom-urlsearchparams-has + */ + public function has(string $key): bool; + + /** + * Returns the first value associated to the given pair name. + * + * If no value is found null is returned + * + * @see https://url.spec.whatwg.org/#dom-urlsearchparams-get + */ + public function get(string $key): ?string; + + /** + * Returns all the values associated to the given pair name as an array or all + * the instance pairs. + * + * If no value is found an empty array is returned + * + * @see https://url.spec.whatwg.org/#dom-urlsearchparams-getall + * + * @return array + */ + public function getAll(string $key): array; + + /** + * Returns the store PHP variables as elements of an array. + * + * The result is similar as PHP parse_str when used with its + * second argument with the difference that variable names are + * not mangled. + * + * If a key is submitted it will returns the value attached to it or null + * + * @see http://php.net/parse_str + * @see https://wiki.php.net/rfc/on_demand_name_mangling + * + * @param ?string $key + * @return mixed the collection of stored PHP variables or the empty array if no input is given, + * the single value of a stored PHP variable or null if the variable is not present in the collection + */ + public function params(?string $key = null); + + /** + * Returns the RFC1738 encoded query. + */ + public function toRFC1738(): ?string; + + /** + * Returns the RFC3986 encoded query. + * + * @see ::getContent + */ + public function toRFC3986(): ?string; + + /** + * Returns an instance with a different separator. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the query component with a different separator + */ + public function withSeparator(string $separator): self; + + /** + * Sorts the query string by offset, maintaining offset to data correlations. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified query + * + * @see https://url.spec.whatwg.org/#dom-urlsearchparams-sort + */ + public function sort(): self; + + /** + * Returns an instance without duplicate key/value pair. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the query component normalized by removing + * duplicate pairs whose key/value are the same. + */ + public function withoutDuplicates(): self; + + /** + * Returns an instance without empty key/value where the value is the null value. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the query component normalized by removing + * empty pairs. + * + * A pair is considered empty if its value is equal to the null value + */ + public function withoutEmptyPairs(): self; + + /** + * Returns an instance where numeric indices associated to PHP's array like key are removed. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the query component normalized so that numeric indexes + * are removed from the pair key value. + * + * ie.: toto[3]=bar[3]&foo=bar becomes toto[]=bar[3]&foo=bar + */ + public function withoutNumericIndices(): self; + + /** + * Returns an instance with the a new key/value pair added to it. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified query + * + * If the pair already exists the value will replace the existing value. + * + * @see https://url.spec.whatwg.org/#dom-urlsearchparams-set + * + * @param ?string $value + */ + public function withPair(string $key, ?string $value): self; + + /** + * Returns an instance with the new pairs set to it. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified query + * + * @see ::withPair + */ + public function merge(string $query): self; + + /** + * Returns an instance without the specified keys. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified component + * + * @param string ...$keys + */ + public function withoutPair(string ...$keys): self; + + /** + * Returns a new instance with a specified key/value pair appended as a new pair. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified query + * + * @param ?string $value + */ + public function appendTo(string $key, ?string $value): self; + + /** + * Returns an instance with the new pairs appended to it. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified query + * + * If the pair already exists the value will be added to it. + */ + public function append(string $query): self; + + /** + * Returns an instance without the specified params. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified component without PHP's value. + * PHP's mangled is not taken into account. + * + * @param string ...$keys + */ + public function withoutParam(string ...$keys): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php new file mode 100644 index 000000000..53065fffb --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\SyntaxError; + +/** + * @extends \IteratorAggregate + */ +interface SegmentedPathInterface extends \Countable, \IteratorAggregate, PathInterface +{ + /** + * Returns the total number of segments in the path. + */ + public function count(): int; + + /** + * Iterate over the path segment. + * + * @return \Iterator + */ + public function getIterator(): \Iterator; + + /** + * Returns parent directory's path. + */ + public function getDirname(): string; + + /** + * Returns the path basename. + */ + public function getBasename(): string; + + /** + * Returns the basename extension. + */ + public function getExtension(): string; + + /** + * Retrieves a single path segment. + * + * If the segment offset has not been set, returns null. + */ + public function get(int $offset): ?string; + + /** + * Returns the associated key for a specific segment. + * + * If a value is specified only the keys associated with + * the given value will be returned + * + * @param ?string $segment + * + * @return int[] + */ + public function keys(?string $segment = null): array; + + /** + * Appends a segment to the path. + */ + public function append(string $segment): self; + + /** + * Prepends a segment to the path. + */ + public function prepend(string $segment): self; + + /** + * Returns an instance with the modified segment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the new segment + * + * If $key is non-negative, the added segment will be the segment at $key position from the start. + * If $key is negative, the added segment will be the segment at $key position from the end. + * + * @param ?string $segment + * + * @throws SyntaxError If the key is invalid + */ + public function withSegment(int $key, ?string $segment): self; + + /** + * Returns an instance without the specified segment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified component + * + * If $key is non-negative, the removed segment will be the segment at $key position from the start. + * If $key is negative, the removed segment will be the segment at $key position from the end. + * + * @param int ...$keys remaining keys to remove + * + * @throws SyntaxError If the key is invalid + */ + public function withoutSegment(int ...$keys): self; + + /** + * Returns an instance without duplicate delimiters. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the path component normalized by removing + * multiple consecutive empty segment + */ + public function withoutEmptySegments(): self; + + /** + * Returns an instance with the specified parent directory's path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the extension basename modified. + * + * @param ?string $path + */ + public function withDirname(?string $path): self; + + /** + * Returns an instance with the specified basename. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the extension basename modified. + * + * @param ?string $basename + */ + public function withBasename(?string $basename): self; + + /** + * Returns an instance with the specified basename extension. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the extension basename modified. + * + * @param ?string $extension + */ + public function withExtension(?string $extension): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php new file mode 100644 index 000000000..c7b39bb50 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; + +interface UriComponentInterface extends \JsonSerializable +{ + /** + * Returns the instance content. + * + * If the instance is defined, the value returned MUST be encoded according to the + * selected encoding algorithm. In any case, the value MUST NOT double-encode any character + * depending on the selected encoding algorithm. + * + * To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3. + * or RFC 3987 Section 3. By default the content is encoded according to RFC3986 + * + * If the instance is not defined null is returned + */ + public function getContent(): ?string; + + /** + * Returns the instance string representation. + * + * If the instance is defined, the value returned MUST be percent-encoded, + * but MUST NOT double-encode any characters. To determine what characters + * to encode, please refer to RFC 3986, Sections 2 and 3. + * + * If the instance is not defined an empty string is returned + */ + public function __toString(): string; + + /** + * Returns the instance json representation. + * + * If the instance is defined, the value returned MUST be percent-encoded, + * but MUST NOT double-encode any characters. To determine what characters + * to encode, please refer to RFC 3986 or RFC 1738. + * + * If the instance is not defined null is returned + */ + public function jsonSerialize(): ?string; + + /** + * Returns the instance string representation with its optional URI delimiters. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode any + * characters. To determine what characters to encode, please refer to RFC 3986, + * Sections 2 and 3. + * + * If the instance is not defined an empty string is returned + */ + public function getUriComponent(): string; + + /** + * Returns an instance with the specified content. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified content. + * + * Users can provide both encoded and decoded content characters. + * + * A null value is equivalent to removing the component content. + * + * + * @param ?string $content + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + * @throws IdnSupportMissing for component or transformations + * requiring IDN support when IDN support is not present + * or misconfigured. + */ + public function withContent(?string $content): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/UriException.php b/dist/vendor/league/uri-interfaces/src/Contracts/UriException.php new file mode 100644 index 000000000..c0fec2a12 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/UriException.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use Throwable; + +interface UriException extends Throwable +{ +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/UriInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/UriInterface.php new file mode 100644 index 000000000..b6eb6a1f8 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/UriInterface.php @@ -0,0 +1,292 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; + +interface UriInterface extends \JsonSerializable +{ + /** + * Returns the string representation as a URI reference. + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + */ + public function __toString(): string; + + /** + * Returns the string representation as a URI reference. + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @see ::__toString + */ + public function jsonSerialize(): string; + + /** + * Retrieve the scheme component of the URI. + * + * If no scheme is present, this method MUST return a null value. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.1. + * + * The trailing ":" character is not part of the scheme and MUST NOT be + * added. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.1 + */ + public function getScheme(): ?string; + + /** + * Retrieve the authority component of the URI. + * + * If no scheme is present, this method MUST return a null value. + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + */ + public function getAuthority(): ?string; + + /** + * Retrieve the user information component of the URI. + * + * If no scheme is present, this method MUST return a null value. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + */ + public function getUserInfo(): ?string; + + /** + * Retrieve the host component of the URI. + * + * If no host is present this method MUST return a null value. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + public function getHost(): ?string; + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + */ + public function getPort(): ?int; + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + */ + public function getPath(): string; + + /** + * Retrieve the query string of the URI. + * + * If no host is present this method MUST return a null value. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + */ + public function getQuery(): ?string; + + /** + * Retrieve the fragment component of the URI. + * + * If no host is present this method MUST return a null value. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + */ + public function getFragment(): ?string; + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * A null value provided for the scheme is equivalent to removing the scheme + * information. + * + * @param ?string $scheme + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withScheme(?string $scheme): self; + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; a null value for the user is equivalent to removing user + * information. + * + * @param ?string $user + * @param ?string $password + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withUserInfo(?string $user, ?string $password = null): self; + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * A null value provided for the host is equivalent to removing the host + * information. + * + * @param ?string $host + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + * @throws IdnSupportMissing for component or transformations + * requiring IDN support when IDN support is not present + * or misconfigured. + */ + public function withHost(?string $host): self; + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param ?int $port + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withPort(?int $port): self; + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withPath(string $path): self; + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * A null value provided for the query is equivalent to removing the query + * information. + * + * @param ?string $query + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withQuery(?string $query): self; + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * A null value provided for the fragment is equivalent to removing the fragment + * information. + * + * @param ?string $fragment + * + * @throws SyntaxError for invalid component or transformations + * that would result in a object in invalid state. + */ + public function withFragment(?string $fragment): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php b/dist/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php new file mode 100644 index 000000000..6411f9b6d --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Contracts; + +interface UserInfoInterface extends UriComponentInterface +{ + /** + * Returns the user component part. + */ + public function getUser(): ?string; + + /** + * Returns the pass component part. + */ + public function getPass(): ?string; + + /** + * Returns an instance with the specified user and/or pass. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user. + * + * An empty user is equivalent to removing the user information. + * + * @param ?string $user + * @param ?string $pass + */ + public function withUserInfo(?string $user, ?string $pass = null): self; +} diff --git a/dist/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php b/dist/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php new file mode 100644 index 000000000..0105b2dad --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class FileinfoSupportMissing extends \RuntimeException implements UriException +{ +} diff --git a/dist/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php b/dist/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php new file mode 100644 index 000000000..8ff3b538c --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class IdnSupportMissing extends \RuntimeException implements UriException +{ +} diff --git a/dist/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php b/dist/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php new file mode 100644 index 000000000..80259f3ba --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Idna\IdnaInfo; + +final class IdnaConversionFailed extends SyntaxError +{ + /** @var IdnaInfo|null */ + private $idnaInfo; + + private function __construct(string $message, IdnaInfo $idnaInfo = null) + { + parent::__construct($message); + $this->idnaInfo = $idnaInfo; + } + + public static function dueToIDNAError(string $domain, IdnaInfo $idnaInfo): self + { + return new self( + 'The host `'.$domain.'` is invalid : '.implode(', ', $idnaInfo->errorList()).' .', + $idnaInfo + ); + } + + public static function dueToInvalidHost(string $domain): self + { + return new self('The host `'.$domain.'` is not a valid IDN host'); + } + + public function idnaInfo(): ?IdnaInfo + { + return $this->idnaInfo; + } +} diff --git a/dist/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php b/dist/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php new file mode 100644 index 000000000..1b5e4cbd8 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class SyntaxError extends \InvalidArgumentException implements UriException +{ +} diff --git a/dist/vendor/league/uri-interfaces/src/Idna/Idna.php b/dist/vendor/league/uri-interfaces/src/Idna/Idna.php new file mode 100644 index 000000000..593068742 --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Idna/Idna.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Idna; + +use League\Uri\Exceptions\IdnaConversionFailed; +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; +use function defined; +use function function_exists; +use function idn_to_ascii; +use function idn_to_utf8; +use function rawurldecode; +use const INTL_IDNA_VARIANT_UTS46; + +/** + * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/uidna_8h.html + */ +final class Idna +{ + private const REGEXP_IDNA_PATTERN = '/[^\x20-\x7f]/'; + private const MAX_DOMAIN_LENGTH = 253; + private const MAX_LABEL_LENGTH = 63; + + /** + * General registered name regular expression. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2.2 + * @see https://regex101.com/r/fptU8V/1 + */ + private const REGEXP_REGISTERED_NAME = '/ + (?(DEFINE) + (?[a-z0-9_~\-]) # . is missing as it is used to separate labels + (?[!$&\'()*+,;=]) + (?%[A-F0-9]{2}) + (?(?:(?&unreserved)|(?&sub_delims)|(?&encoded))*) + ) + ^(?:(?®_name)\.)*(?®_name)\.?$ + /ix'; + + /** + * IDNA options. + */ + public const IDNA_DEFAULT = 0; + public const IDNA_ALLOW_UNASSIGNED = 1; + public const IDNA_USE_STD3_RULES = 2; + public const IDNA_CHECK_BIDI = 4; + public const IDNA_CHECK_CONTEXTJ = 8; + public const IDNA_NONTRANSITIONAL_TO_ASCII = 0x10; + public const IDNA_NONTRANSITIONAL_TO_UNICODE = 0x20; + public const IDNA_CHECK_CONTEXTO = 0x40; + + /** + * IDNA errors. + */ + public const ERROR_NONE = 0; + public const ERROR_EMPTY_LABEL = 1; + public const ERROR_LABEL_TOO_LONG = 2; + public const ERROR_DOMAIN_NAME_TOO_LONG = 4; + public const ERROR_LEADING_HYPHEN = 8; + public const ERROR_TRAILING_HYPHEN = 0x10; + public const ERROR_HYPHEN_3_4 = 0x20; + public const ERROR_LEADING_COMBINING_MARK = 0x40; + public const ERROR_DISALLOWED = 0x80; + public const ERROR_PUNYCODE = 0x100; + public const ERROR_LABEL_HAS_DOT = 0x200; + public const ERROR_INVALID_ACE_LABEL = 0x400; + public const ERROR_BIDI = 0x800; + public const ERROR_CONTEXTJ = 0x1000; + public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; + public const ERROR_CONTEXTO_DIGITS = 0x4000; + + /** + * IDNA default options. + */ + public const IDNA2008_ASCII = self::IDNA_NONTRANSITIONAL_TO_ASCII + | self::IDNA_CHECK_BIDI + | self::IDNA_USE_STD3_RULES + | self::IDNA_CHECK_CONTEXTJ; + public const IDNA2008_UNICODE = self::IDNA_NONTRANSITIONAL_TO_UNICODE + | self::IDNA_CHECK_BIDI + | self::IDNA_USE_STD3_RULES + | self::IDNA_CHECK_CONTEXTJ; + + /** + * @codeCoverageIgnore + */ + private static function supportsIdna(): void + { + static $idnSupport; + if (null === $idnSupport) { + $idnSupport = function_exists('\idn_to_ascii') && defined('\INTL_IDNA_VARIANT_UTS46'); + } + + if (!$idnSupport) { + throw new IdnSupportMissing('IDN host can not be processed. Verify that ext/intl is installed for IDN support and that ICU is at least version 4.6.'); + } + } + + /** + * Converts the input to its IDNA ASCII form. + * + * This method returns the string converted to IDN ASCII form + * + * @throws SyntaxError if the string can not be converted to ASCII using IDN UTS46 algorithm + */ + public static function toAscii(string $domain, int $options): IdnaInfo + { + $domain = rawurldecode($domain); + + if (1 === preg_match(self::REGEXP_IDNA_PATTERN, $domain)) { + self::supportsIdna(); + + /* @param-out array{errors: int, isTransitionalDifferent: bool, result: string} $idnaInfo */ + idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $idnaInfo); + if ([] === $idnaInfo) { + return IdnaInfo::fromIntl([ + 'result' => strtolower($domain), + 'isTransitionalDifferent' => false, + 'errors' => self::validateDomainAndLabelLength($domain), + ]); + } + + /* @var array{errors: int, isTransitionalDifferent: bool, result: string} $idnaInfo */ + return IdnaInfo::fromIntl($idnaInfo); + } + + $error = self::ERROR_NONE; + if (1 !== preg_match(self::REGEXP_REGISTERED_NAME, $domain)) { + $error |= self::ERROR_DISALLOWED; + } + + return IdnaInfo::fromIntl([ + 'result' => strtolower($domain), + 'isTransitionalDifferent' => false, + 'errors' => self::validateDomainAndLabelLength($domain) | $error, + ]); + } + + /** + * Converts the input to its IDNA UNICODE form. + * + * This method returns the string converted to IDN UNICODE form + * + * @throws SyntaxError if the string can not be converted to UNICODE using IDN UTS46 algorithm + */ + public static function toUnicode(string $domain, int $options): IdnaInfo + { + $domain = rawurldecode($domain); + + if (false === stripos($domain, 'xn--')) { + return IdnaInfo::fromIntl(['result' => $domain, 'isTransitionalDifferent' => false, 'errors' => self::ERROR_NONE]); + } + + self::supportsIdna(); + + /* @param-out array{errors: int, isTransitionalDifferent: bool, result: string} $idnaInfo */ + idn_to_utf8($domain, $options, INTL_IDNA_VARIANT_UTS46, $idnaInfo); + if ([] === $idnaInfo) { + throw IdnaConversionFailed::dueToInvalidHost($domain); + } + + /* @var array{errors: int, isTransitionalDifferent: bool, result: string} $idnaInfo */ + return IdnaInfo::fromIntl($idnaInfo); + } + + /** + * Adapted from https://github.com/TRowbotham/idna. + * + * @see https://github.com/TRowbotham/idna/blob/master/src/Idna.php#L236 + */ + private static function validateDomainAndLabelLength(string $domain): int + { + $error = self::ERROR_NONE; + $labels = explode('.', $domain); + $maxDomainSize = self::MAX_DOMAIN_LENGTH; + $length = count($labels); + + // If the last label is empty and it is not the first label, then it is the root label. + // Increase the max size by 1, making it 254, to account for the root label's "." + // delimiter. This also means we don't need to check the last label's length for being too + // long. + if ($length > 1 && $labels[$length - 1] === '') { + ++$maxDomainSize; + array_pop($labels); + } + + if (strlen($domain) > $maxDomainSize) { + $error |= self::ERROR_DOMAIN_NAME_TOO_LONG; + } + + foreach ($labels as $label) { + if (strlen($label) > self::MAX_LABEL_LENGTH) { + $error |= self::ERROR_LABEL_TOO_LONG; + + break; + } + } + + return $error; + } +} diff --git a/dist/vendor/league/uri-interfaces/src/Idna/IdnaInfo.php b/dist/vendor/league/uri-interfaces/src/Idna/IdnaInfo.php new file mode 100644 index 000000000..73610a28d --- /dev/null +++ b/dist/vendor/league/uri-interfaces/src/Idna/IdnaInfo.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Idna; + +use function array_filter; +use const ARRAY_FILTER_USE_KEY; + +/** + * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/uidna_8h.html + */ +final class IdnaInfo +{ + private const ERRORS = [ + Idna::ERROR_EMPTY_LABEL => 'a non-final domain name label (or the whole domain name) is empty', + Idna::ERROR_LABEL_TOO_LONG => 'a domain name label is longer than 63 bytes', + Idna::ERROR_DOMAIN_NAME_TOO_LONG => 'a domain name is longer than 255 bytes in its storage form', + Idna::ERROR_LEADING_HYPHEN => 'a label starts with a hyphen-minus ("-")', + Idna::ERROR_TRAILING_HYPHEN => 'a label ends with a hyphen-minus ("-")', + Idna::ERROR_HYPHEN_3_4 => 'a label contains hyphen-minus ("-") in the third and fourth positions', + Idna::ERROR_LEADING_COMBINING_MARK => 'a label starts with a combining mark', + Idna::ERROR_DISALLOWED => 'a label or domain name contains disallowed characters', + Idna::ERROR_PUNYCODE => 'a label starts with "xn--" but does not contain valid Punycode', + Idna::ERROR_LABEL_HAS_DOT => 'a label contains a dot=full stop', + Idna::ERROR_INVALID_ACE_LABEL => 'An ACE label does not contain a valid label string', + Idna::ERROR_BIDI => 'a label does not meet the IDNA BiDi requirements (for right-to-left characters)', + Idna::ERROR_CONTEXTJ => 'a label does not meet the IDNA CONTEXTJ requirements', + Idna::ERROR_CONTEXTO_DIGITS => 'a label does not meet the IDNA CONTEXTO requirements for digits', + Idna::ERROR_CONTEXTO_PUNCTUATION => 'a label does not meet the IDNA CONTEXTO requirements for punctuation characters. Some punctuation characters "Would otherwise have been DISALLOWED" but are allowed in certain contexts', + ]; + + /** @var string */ + private $result; + + /** @var bool */ + private $isTransitionalDifferent; + + /** @var int */ + private $errors; + + /** + * @var array + */ + private $errorList; + + private function __construct(string $result, bool $isTransitionalDifferent, int $errors) + { + $this->result = $result; + $this->errors = $errors; + $this->isTransitionalDifferent = $isTransitionalDifferent; + $this->errorList = array_filter( + self::ERRORS, + function (int $error): bool { + return 0 !== ($error & $this->errors); + }, + ARRAY_FILTER_USE_KEY + ); + } + + /** + * @param array{result:string, isTransitionalDifferent:bool, errors:int} $infos + */ + public static function fromIntl(array $infos): self + { + return new self($infos['result'], $infos['isTransitionalDifferent'], $infos['errors']); + } + + /** + * @param array{result:string, isTransitionalDifferent:bool, errors:int} $properties + */ + public static function __set_state(array $properties): self + { + return self::fromIntl($properties); + } + + public function result(): string + { + return $this->result; + } + + public function isTransitionalDifferent(): bool + { + return $this->isTransitionalDifferent; + } + + public function errors(): int + { + return $this->errors; + } + + public function error(int $error): ?string + { + return $this->errorList[$error] ?? null; + } + + /** + * @return array + */ + public function errorList(): array + { + return $this->errorList; + } +} diff --git a/dist/vendor/league/uri/LICENSE b/dist/vendor/league/uri/LICENSE new file mode 100644 index 000000000..3b52528f2 --- /dev/null +++ b/dist/vendor/league/uri/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 ignace nyamagana butera + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dist/vendor/league/uri/composer.json b/dist/vendor/league/uri/composer.json new file mode 100644 index 000000000..28edbd845 --- /dev/null +++ b/dist/vendor/league/uri/composer.json @@ -0,0 +1,107 @@ +{ + "name": "league/uri", + "type": "library", + "description" : "URI manipulation library", + "keywords": [ + "url", + "uri", + "rfc3986", + "rfc3987", + "rfc6570", + "psr-7", + "parse_url", + "http", + "https", + "ws", + "ftp", + "data-uri", + "file-uri", + "middleware", + "parse_str", + "query-string", + "querystring", + "hostname", + "uri-template" + ], + "license": "MIT", + "homepage": "https://uri.thephpleague.com", + "authors": [ + { + "name" : "Ignace Nyamagana Butera", + "email" : "nyamsprod@gmail.com", + "homepage" : "https://nyamsprod.com" + } + ], + "support": { + "forum": "https://thephpleague.slack.com", + "docs": "https://uri.thephpleague.com", + "issues": "https://github.com/thephpleague/uri/issues" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nyamsprod" + } + ], + "require": { + "php": "^7.4 || ^8.0", + "ext-json": "*", + "psr/http-message": "^1.0", + "league/uri-interfaces": "^2.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "LeagueTest\\Uri\\": "tests" + } + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "scripts": { + "phpcs": "php-cs-fixer fix -v --diff --dry-run --allow-risky=yes --ansi", + "phpcs:fix": "php-cs-fixer fix -vvv --allow-risky=yes --ansi", + "phpstan": "phpstan analyse -l max -c phpstan.neon src --ansi --memory-limit=256M", + "phpunit": "XDEBUG_MODE=coverage phpunit --coverage-text", + "test": [ + "@phpunit", + "@phpstan", + "@phpcs" + ] + }, + "scripts-descriptions": { + "phpcs": "Runs coding style test suite", + "phpstan": "Runs complete codebase static analysis", + "phpunit": "Runs unit and functional testing", + "test": "Runs full test suite" + }, + "suggest": { + "league/uri-components" : "Needed to easily manipulate URI objects", + "ext-intl" : "Needed to improve host validation", + "ext-fileinfo": "Needed to create Data URI from a filepath", + "psr/http-factory": "Needed to use the URI factory" + }, + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "config": { + "sort-packages": true + } +} diff --git a/dist/vendor/league/uri/src/Exceptions/TemplateCanNotBeExpanded.php b/dist/vendor/league/uri/src/Exceptions/TemplateCanNotBeExpanded.php new file mode 100644 index 000000000..7c24b94c5 --- /dev/null +++ b/dist/vendor/league/uri/src/Exceptions/TemplateCanNotBeExpanded.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use InvalidArgumentException; +use League\Uri\Contracts\UriException; + +class TemplateCanNotBeExpanded extends InvalidArgumentException implements UriException +{ + public static function dueToUnableToProcessValueListWithPrefix(string $variableName): self + { + return new self('The ":" modifier can not be applied on "'.$variableName.'" since it is a list of values.'); + } + + public static function dueToNestedListOfValue(string $variableName): self + { + return new self('The "'.$variableName.'" can not be a nested list.'); + } +} diff --git a/dist/vendor/league/uri/src/Http.php b/dist/vendor/league/uri/src/Http.php new file mode 100644 index 000000000..b3b8cea88 --- /dev/null +++ b/dist/vendor/league/uri/src/Http.php @@ -0,0 +1,335 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use JsonSerializable; +use League\Uri\Contracts\UriInterface; +use League\Uri\Exceptions\SyntaxError; +use Psr\Http\Message\UriInterface as Psr7UriInterface; +use function is_object; +use function is_scalar; +use function method_exists; +use function sprintf; + +final class Http implements Psr7UriInterface, JsonSerializable +{ + private UriInterface $uri; + + private function __construct(UriInterface $uri) + { + $this->validate($uri); + $this->uri = $uri; + } + + /** + * Validate the submitted uri against PSR-7 UriInterface. + * + * @throws SyntaxError if the given URI does not follow PSR-7 UriInterface rules + */ + private function validate(UriInterface $uri): void + { + $scheme = $uri->getScheme(); + if (null === $scheme && '' === $uri->getHost()) { + throw new SyntaxError(sprintf('an URI without scheme can not contains a empty host string according to PSR-7: %s', (string) $uri)); + } + + $port = $uri->getPort(); + if (null !== $port && ($port < 0 || $port > 65535)) { + throw new SyntaxError(sprintf('The URI port is outside the established TCP and UDP port ranges: %s', (string) $uri->getPort())); + } + } + + /** + * Static method called by PHP's var export. + */ + public static function __set_state(array $components): self + { + return new self($components['uri']); + } + + /** + * Create a new instance from a string. + * + * @param string|mixed $uri + */ + public static function createFromString($uri = ''): self + { + return new self(Uri::createFromString($uri)); + } + + /** + * Create a new instance from a hash of parse_url parts. + * + * @param array $components a hash representation of the URI similar + * to PHP parse_url function result + */ + public static function createFromComponents(array $components): self + { + return new self(Uri::createFromComponents($components)); + } + + /** + * Create a new instance from the environment. + */ + public static function createFromServer(array $server): self + { + return new self(Uri::createFromServer($server)); + } + + /** + * Create a new instance from a URI and a Base URI. + * + * The returned URI must be absolute. + * + * @param mixed $uri the input URI to create + * @param mixed $base_uri the base URI used for reference + */ + public static function createFromBaseUri($uri, $base_uri = null): self + { + return new self(Uri::createFromBaseUri($uri, $base_uri)); + } + + /** + * Create a new instance from a URI object. + * + * @param Psr7UriInterface|UriInterface $uri the input URI to create + */ + public static function createFromUri($uri): self + { + if ($uri instanceof UriInterface) { + return new self($uri); + } + + return new self(Uri::createFromUri($uri)); + } + + /** + * {@inheritDoc} + */ + public function getScheme(): string + { + return (string) $this->uri->getScheme(); + } + + /** + * {@inheritDoc} + */ + public function getAuthority(): string + { + return (string) $this->uri->getAuthority(); + } + + /** + * {@inheritDoc} + */ + public function getUserInfo(): string + { + return (string) $this->uri->getUserInfo(); + } + + /** + * {@inheritDoc} + */ + public function getHost(): string + { + return (string) $this->uri->getHost(); + } + + /** + * {@inheritDoc} + */ + public function getPort(): ?int + { + return $this->uri->getPort(); + } + + /** + * {@inheritDoc} + */ + public function getPath(): string + { + return $this->uri->getPath(); + } + + /** + * {@inheritDoc} + */ + public function getQuery(): string + { + return (string) $this->uri->getQuery(); + } + + /** + * {@inheritDoc} + */ + public function getFragment(): string + { + return (string) $this->uri->getFragment(); + } + + /** + * {@inheritDoc} + */ + public function withScheme($scheme): self + { + /** @var string $scheme */ + $scheme = $this->filterInput($scheme); + if ('' === $scheme) { + $scheme = null; + } + + $uri = $this->uri->withScheme($scheme); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * Safely stringify input when possible. + * + * @param mixed $str the value to evaluate as a string + * + * @throws SyntaxError if the submitted data can not be converted to string + * + * @return string|mixed + */ + private function filterInput($str) + { + if (is_scalar($str) || (is_object($str) && method_exists($str, '__toString'))) { + return (string) $str; + } + + return $str; + } + + /** + * {@inheritDoc} + */ + public function withUserInfo($user, $password = null): self + { + /** @var string $user */ + $user = $this->filterInput($user); + if ('' === $user) { + $user = null; + } + + $uri = $this->uri->withUserInfo($user, $password); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function withHost($host): self + { + /** @var string $host */ + $host = $this->filterInput($host); + if ('' === $host) { + $host = null; + } + + $uri = $this->uri->withHost($host); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function withPort($port): self + { + $uri = $this->uri->withPort($port); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function withPath($path): self + { + $uri = $this->uri->withPath($path); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function withQuery($query): self + { + /** @var string $query */ + $query = $this->filterInput($query); + if ('' === $query) { + $query = null; + } + + $uri = $this->uri->withQuery($query); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function withFragment($fragment): self + { + /** @var string $fragment */ + $fragment = $this->filterInput($fragment); + if ('' === $fragment) { + $fragment = null; + } + + $uri = $this->uri->withFragment($fragment); + if ((string) $uri === (string) $this->uri) { + return $this; + } + + return new self($uri); + } + + /** + * {@inheritDoc} + */ + public function __toString(): string + { + return $this->uri->__toString(); + } + + /** + * {@inheritDoc} + */ + public function jsonSerialize(): string + { + return $this->uri->__toString(); + } +} diff --git a/dist/vendor/league/uri/src/HttpFactory.php b/dist/vendor/league/uri/src/HttpFactory.php new file mode 100644 index 000000000..fc3bcfab4 --- /dev/null +++ b/dist/vendor/league/uri/src/HttpFactory.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use Psr\Http\Message\UriFactoryInterface; +use Psr\Http\Message\UriInterface; + +final class HttpFactory implements UriFactoryInterface +{ + public function createUri(string $uri = ''): UriInterface + { + return Http::createFromString($uri); + } +} diff --git a/dist/vendor/league/uri/src/Uri.php b/dist/vendor/league/uri/src/Uri.php new file mode 100644 index 000000000..77cb54bb5 --- /dev/null +++ b/dist/vendor/league/uri/src/Uri.php @@ -0,0 +1,1337 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use finfo; +use League\Uri\Contracts\UriInterface; +use League\Uri\Exceptions\FileinfoSupportMissing; +use League\Uri\Exceptions\IdnaConversionFailed; +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; +use League\Uri\Idna\Idna; +use Psr\Http\Message\UriInterface as Psr7UriInterface; +use TypeError; +use function array_filter; +use function array_map; +use function base64_decode; +use function base64_encode; +use function count; +use function explode; +use function file_get_contents; +use function filter_var; +use function implode; +use function in_array; +use function inet_pton; +use function is_object; +use function is_scalar; +use function method_exists; +use function preg_match; +use function preg_replace; +use function preg_replace_callback; +use function rawurlencode; +use function sprintf; +use function str_replace; +use function strlen; +use function strpos; +use function strspn; +use function strtolower; +use function substr; +use const FILEINFO_MIME; +use const FILTER_FLAG_IPV4; +use const FILTER_FLAG_IPV6; +use const FILTER_NULL_ON_FAILURE; +use const FILTER_VALIDATE_BOOLEAN; +use const FILTER_VALIDATE_IP; + +final class Uri implements UriInterface +{ + /** + * RFC3986 invalid characters. + * + * @link https://tools.ietf.org/html/rfc3986#section-2.2 + * + * @var string + */ + private const REGEXP_INVALID_CHARS = '/[\x00-\x1f\x7f]/'; + + /** + * RFC3986 Sub delimiter characters regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-2.2 + * + * @var string + */ + private const REGEXP_CHARS_SUBDELIM = "\!\$&'\(\)\*\+,;\=%"; + + /** + * RFC3986 unreserved characters regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-2.3 + * + * @var string + */ + private const REGEXP_CHARS_UNRESERVED = 'A-Za-z0-9_\-\.~'; + + /** + * RFC3986 schema regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.1 + */ + private const REGEXP_SCHEME = ',^[a-z]([-a-z0-9+.]+)?$,i'; + + /** + * RFC3986 host identified by a registered name regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + private const REGEXP_HOST_REGNAME = '/^( + (?[a-z0-9_~\-\.])| + (?[!$&\'()*+,;=])| + (?%[A-F0-9]{2}) + )+$/x'; + + /** + * RFC3986 delimiters of the generic URI components regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-2.2 + */ + private const REGEXP_HOST_GEN_DELIMS = '/[:\/?#\[\]@ ]/'; // Also includes space. + + /** + * RFC3986 IPvFuture regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + private const REGEXP_HOST_IPFUTURE = '/^ + v(?[A-F0-9])+\. + (?: + (?[a-z0-9_~\-\.])| + (?[!$&\'()*+,;=:]) # also include the : character + )+ + $/ix'; + + /** + * RFC3986 IPvFuture host and port component. + */ + private const REGEXP_HOST_PORT = ',^(?(\[.*]|[^:])*)(:(?[^/?#]*))?$,x'; + + /** + * Significant 10 bits of IP to detect Zone ID regular expression pattern. + */ + private const HOST_ADDRESS_BLOCK = "\xfe\x80"; + + /** + * Regular expression pattern to for file URI. + * contains the volume but not the volume separator. + * The volume separator may be URL-encoded (`|` as `%7C`) by ::formatPath(), + * so we account for that here. + */ + private const REGEXP_FILE_PATH = ',^(?/)?(?[a-zA-Z])(?:[:|\|]|%7C)(?.*)?,'; + + /** + * Mimetype regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc2397 + */ + private const REGEXP_MIMETYPE = ',^\w+/[-.\w]+(?:\+[-.\w]+)?$,'; + + /** + * Base64 content regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc2397 + */ + private const REGEXP_BINARY = ',(;|^)base64$,'; + + /** + * Windows file path string regular expression pattern. + * contains both the volume and volume separator. + */ + private const REGEXP_WINDOW_PATH = ',^(?[a-zA-Z][:|\|]),'; + + /** + * Supported schemes and corresponding default port. + * + * @var array + */ + private const SCHEME_DEFAULT_PORT = [ + 'data' => null, + 'file' => null, + 'ftp' => 21, + 'gopher' => 70, + 'http' => 80, + 'https' => 443, + 'ws' => 80, + 'wss' => 443, + ]; + + /** + * URI validation methods per scheme. + * + * @var array + */ + private const SCHEME_VALIDATION_METHOD = [ + 'data' => 'isUriWithSchemeAndPathOnly', + 'file' => 'isUriWithSchemeHostAndPathOnly', + 'ftp' => 'isNonEmptyHostUriWithoutFragmentAndQuery', + 'gopher' => 'isNonEmptyHostUriWithoutFragmentAndQuery', + 'http' => 'isNonEmptyHostUri', + 'https' => 'isNonEmptyHostUri', + 'ws' => 'isNonEmptyHostUriWithoutFragment', + 'wss' => 'isNonEmptyHostUriWithoutFragment', + ]; + + /** + * All ASCII letters sorted by typical frequency of occurrence. + * + * @var string + */ + private const ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; + + private ?string $scheme; + private ?string $user_info; + private ?string $host; + private ?int $port; + private ?string $authority; + private string $path = ''; + private ?string $query; + private ?string $fragment; + private ?string $uri; + + private function __construct( + ?string $scheme, + ?string $user, + ?string $pass, + ?string $host, + ?int $port, + string $path, + ?string $query, + ?string $fragment + ) { + $this->scheme = $this->formatScheme($scheme); + $this->user_info = $this->formatUserInfo($user, $pass); + $this->host = $this->formatHost($host); + $this->port = $this->formatPort($port); + $this->authority = $this->setAuthority(); + $this->path = $this->formatPath($path); + $this->query = $this->formatQueryAndFragment($query); + $this->fragment = $this->formatQueryAndFragment($fragment); + $this->assertValidState(); + } + + /** + * Format the Scheme and Host component. + * + * @param ?string $scheme + * @throws SyntaxError if the scheme is invalid + */ + private function formatScheme(?string $scheme): ?string + { + if (null === $scheme) { + return $scheme; + } + + $formatted_scheme = strtolower($scheme); + if (1 === preg_match(self::REGEXP_SCHEME, $formatted_scheme)) { + return $formatted_scheme; + } + + throw new SyntaxError(sprintf('The scheme `%s` is invalid.', $scheme)); + } + + /** + * Set the UserInfo component. + * @param ?string $user + * @param ?string $password + */ + private function formatUserInfo(?string $user, ?string $password): ?string + { + if (null === $user) { + return $user; + } + + static $user_pattern = '/(?:[^%'.self::REGEXP_CHARS_UNRESERVED.self::REGEXP_CHARS_SUBDELIM.']++|%(?![A-Fa-f0-9]{2}))/'; + $user = preg_replace_callback($user_pattern, [Uri::class, 'urlEncodeMatch'], $user); + if (null === $password) { + return $user; + } + + static $password_pattern = '/(?:[^%:'.self::REGEXP_CHARS_UNRESERVED.self::REGEXP_CHARS_SUBDELIM.']++|%(?![A-Fa-f0-9]{2}))/'; + + return $user.':'.preg_replace_callback($password_pattern, [Uri::class, 'urlEncodeMatch'], $password); + } + + /** + * Returns the RFC3986 encoded string matched. + */ + private static function urlEncodeMatch(array $matches): string + { + return rawurlencode($matches[0]); + } + + /** + * Validate and Format the Host component. + * @param ?string $host + */ + private function formatHost(?string $host): ?string + { + if (null === $host || '' === $host) { + return $host; + } + + if ('[' !== $host[0]) { + return $this->formatRegisteredName($host); + } + + return $this->formatIp($host); + } + + /** + * Validate and format a registered name. + * + * The host is converted to its ascii representation if needed + * + * @throws IdnSupportMissing if the submitted host required missing or misconfigured IDN support + * @throws SyntaxError if the submitted host is not a valid registered name + */ + private function formatRegisteredName(string $host): string + { + $formatted_host = rawurldecode($host); + if (1 === preg_match(self::REGEXP_HOST_REGNAME, $formatted_host)) { + return $formatted_host; + } + + if (1 === preg_match(self::REGEXP_HOST_GEN_DELIMS, $formatted_host)) { + throw new SyntaxError(sprintf('The host `%s` is invalid : a registered name can not contain URI delimiters or spaces', $host)); + } + + $info = Idna::toAscii($host, Idna::IDNA2008_ASCII); + if (0 !== $info->errors()) { + throw IdnaConversionFailed::dueToIDNAError($host, $info); + } + + return $info->result(); + } + + /** + * Validate and Format the IPv6/IPvfuture host. + * + * @throws SyntaxError if the submitted host is not a valid IP host + */ + private function formatIp(string $host): string + { + $ip = substr($host, 1, -1); + if (false !== filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + return $host; + } + + if (1 === preg_match(self::REGEXP_HOST_IPFUTURE, $ip, $matches) && !in_array($matches['version'], ['4', '6'], true)) { + return $host; + } + + $pos = strpos($ip, '%'); + if (false === $pos) { + throw new SyntaxError(sprintf('The host `%s` is invalid : the IP host is malformed', $host)); + } + + if (1 === preg_match(self::REGEXP_HOST_GEN_DELIMS, rawurldecode(substr($ip, $pos)))) { + throw new SyntaxError(sprintf('The host `%s` is invalid : the IP host is malformed', $host)); + } + + $ip = substr($ip, 0, $pos); + if (false === filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + throw new SyntaxError(sprintf('The host `%s` is invalid : the IP host is malformed', $host)); + } + + //Only the address block fe80::/10 can have a Zone ID attach to + //let's detect the link local significant 10 bits + if (0 === strpos((string) inet_pton($ip), self::HOST_ADDRESS_BLOCK)) { + return $host; + } + + throw new SyntaxError(sprintf('The host `%s` is invalid : the IP host is malformed', $host)); + } + + /** + * Format the Port component. + * + * @param object|null|int|string $port + * + * @throws SyntaxError + */ + private function formatPort($port = null): ?int + { + if (null === $port || '' === $port) { + return null; + } + + if (!is_int($port) && !(is_string($port) && 1 === preg_match('/^\d*$/', $port))) { + throw new SyntaxError('The port is expected to be an integer or a string representing an integer; '.gettype($port).' given.'); + } + + $port = (int) $port; + if (0 > $port) { + throw new SyntaxError(sprintf('The port `%s` is invalid', $port)); + } + + $defaultPort = self::SCHEME_DEFAULT_PORT[$this->scheme] ?? null; + if ($defaultPort === $port) { + return null; + } + + return $port; + } + + /** + * {@inheritDoc} + */ + public static function __set_state(array $components): self + { + $components['user'] = null; + $components['pass'] = null; + if (null !== $components['user_info']) { + [$components['user'], $components['pass']] = explode(':', $components['user_info'], 2) + [1 => null]; + } + + return new self( + $components['scheme'], + $components['user'], + $components['pass'], + $components['host'], + $components['port'], + $components['path'], + $components['query'], + $components['fragment'] + ); + } + + /** + * Create a new instance from a URI and a Base URI. + * + * The returned URI must be absolute. + * + * @param mixed $uri the input URI to create + * @param null|mixed $base_uri the base URI used for reference + */ + public static function createFromBaseUri($uri, $base_uri = null): UriInterface + { + if (!$uri instanceof UriInterface) { + $uri = self::createFromString($uri); + } + + if (null === $base_uri) { + if (null === $uri->getScheme()) { + throw new SyntaxError(sprintf('the URI `%s` must be absolute', (string) $uri)); + } + + if (null === $uri->getAuthority()) { + return $uri; + } + + /** @var UriInterface $uri */ + $uri = UriResolver::resolve($uri, $uri->withFragment(null)->withQuery(null)->withPath('')); + + return $uri; + } + + if (!$base_uri instanceof UriInterface) { + $base_uri = self::createFromString($base_uri); + } + + if (null === $base_uri->getScheme()) { + throw new SyntaxError(sprintf('the base URI `%s` must be absolute', (string) $base_uri)); + } + + /** @var UriInterface $uri */ + $uri = UriResolver::resolve($uri, $base_uri); + + return $uri; + } + + /** + * Create a new instance from a string. + * + * @param string|mixed $uri + */ + public static function createFromString($uri = ''): self + { + $components = UriString::parse($uri); + + return new self( + $components['scheme'], + $components['user'], + $components['pass'], + $components['host'], + $components['port'], + $components['path'], + $components['query'], + $components['fragment'] + ); + } + + /** + * Create a new instance from a hash representation of the URI similar + * to PHP parse_url function result. + */ + public static function createFromComponents(array $components = []): self + { + $components += [ + 'scheme' => null, 'user' => null, 'pass' => null, 'host' => null, + 'port' => null, 'path' => '', 'query' => null, 'fragment' => null, + ]; + + return new self( + $components['scheme'], + $components['user'], + $components['pass'], + $components['host'], + $components['port'], + $components['path'], + $components['query'], + $components['fragment'] + ); + } + + /** + * Create a new instance from a data file path. + * + * @param resource|null $context + * + * @throws FileinfoSupportMissing If ext/fileinfo is not installed + * @throws SyntaxError If the file does not exist or is not readable + */ + public static function createFromDataPath(string $path, $context = null): self + { + static $finfo_support = null; + $finfo_support = $finfo_support ?? class_exists(finfo::class); + + // @codeCoverageIgnoreStart + if (!$finfo_support) { + throw new FileinfoSupportMissing(sprintf('Please install ext/fileinfo to use the %s() method.', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $file_args = [$path, false]; + $mime_args = [$path, FILEINFO_MIME]; + if (null !== $context) { + $file_args[] = $context; + $mime_args[] = $context; + } + + $raw = @file_get_contents(...$file_args); + if (false === $raw) { + throw new SyntaxError(sprintf('The file `%s` does not exist or is not readable', $path)); + } + + $mimetype = (string) (new finfo(FILEINFO_MIME))->file(...$mime_args); + + return Uri::createFromComponents([ + 'scheme' => 'data', + 'path' => str_replace(' ', '', $mimetype.';base64,'.base64_encode($raw)), + ]); + } + + /** + * Create a new instance from a Unix path string. + */ + public static function createFromUnixPath(string $uri = ''): self + { + $uri = implode('/', array_map('rawurlencode', explode('/', $uri))); + if ('/' !== ($uri[0] ?? '')) { + return Uri::createFromComponents(['path' => $uri]); + } + + return Uri::createFromComponents(['path' => $uri, 'scheme' => 'file', 'host' => '']); + } + + /** + * Create a new instance from a local Windows path string. + */ + public static function createFromWindowsPath(string $uri = ''): self + { + $root = ''; + if (1 === preg_match(self::REGEXP_WINDOW_PATH, $uri, $matches)) { + $root = substr($matches['root'], 0, -1).':'; + $uri = substr($uri, strlen($root)); + } + $uri = str_replace('\\', '/', $uri); + $uri = implode('/', array_map('rawurlencode', explode('/', $uri))); + + //Local Windows absolute path + if ('' !== $root) { + return Uri::createFromComponents(['path' => '/'.$root.$uri, 'scheme' => 'file', 'host' => '']); + } + + //UNC Windows Path + if ('//' !== substr($uri, 0, 2)) { + return Uri::createFromComponents(['path' => $uri]); + } + + $parts = explode('/', substr($uri, 2), 2) + [1 => null]; + + return Uri::createFromComponents(['host' => $parts[0], 'path' => '/'.$parts[1], 'scheme' => 'file']); + } + + /** + * Create a new instance from a URI object. + * + * @param Psr7UriInterface|UriInterface $uri the input URI to create + */ + public static function createFromUri($uri): self + { + if ($uri instanceof UriInterface) { + $user_info = $uri->getUserInfo(); + $user = null; + $pass = null; + if (null !== $user_info) { + [$user, $pass] = explode(':', $user_info, 2) + [1 => null]; + } + + return new self( + $uri->getScheme(), + $user, + $pass, + $uri->getHost(), + $uri->getPort(), + $uri->getPath(), + $uri->getQuery(), + $uri->getFragment() + ); + } + + if (!$uri instanceof Psr7UriInterface) { + throw new TypeError(sprintf('The object must implement the `%s` or the `%s`', Psr7UriInterface::class, UriInterface::class)); + } + + $scheme = $uri->getScheme(); + if ('' === $scheme) { + $scheme = null; + } + + $fragment = $uri->getFragment(); + if ('' === $fragment) { + $fragment = null; + } + + $query = $uri->getQuery(); + if ('' === $query) { + $query = null; + } + + $host = $uri->getHost(); + if ('' === $host) { + $host = null; + } + + $user_info = $uri->getUserInfo(); + $user = null; + $pass = null; + if ('' !== $user_info) { + [$user, $pass] = explode(':', $user_info, 2) + [1 => null]; + } + + return new self( + $scheme, + $user, + $pass, + $host, + $uri->getPort(), + $uri->getPath(), + $query, + $fragment + ); + } + + /** + * Create a new instance from the environment. + */ + public static function createFromServer(array $server): self + { + [$user, $pass] = self::fetchUserInfo($server); + [$host, $port] = self::fetchHostname($server); + [$path, $query] = self::fetchRequestUri($server); + + return Uri::createFromComponents([ + 'scheme' => self::fetchScheme($server), + 'user' => $user, + 'pass' => $pass, + 'host' => $host, + 'port' => $port, + 'path' => $path, + 'query' => $query, + ]); + } + + /** + * Returns the environment scheme. + */ + private static function fetchScheme(array $server): string + { + $server += ['HTTPS' => '']; + $res = filter_var($server['HTTPS'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); + + return false !== $res ? 'https' : 'http'; + } + + /** + * Returns the environment user info. + * + * @return array{0:?string, 1:?string} + */ + private static function fetchUserInfo(array $server): array + { + $server += ['PHP_AUTH_USER' => null, 'PHP_AUTH_PW' => null, 'HTTP_AUTHORIZATION' => '']; + $user = $server['PHP_AUTH_USER']; + $pass = $server['PHP_AUTH_PW']; + if (0 === strpos(strtolower($server['HTTP_AUTHORIZATION']), 'basic')) { + $userinfo = base64_decode(substr($server['HTTP_AUTHORIZATION'], 6), true); + if (false === $userinfo) { + throw new SyntaxError('The user info could not be detected'); + } + [$user, $pass] = explode(':', $userinfo, 2) + [1 => null]; + } + + if (null !== $user) { + $user = rawurlencode($user); + } + + if (null !== $pass) { + $pass = rawurlencode($pass); + } + + return [$user, $pass]; + } + + /** + * Returns the environment host. + * + * @throws SyntaxError If the host can not be detected + * + * @return array{0:string|null, 1:int|null} + */ + private static function fetchHostname(array $server): array + { + $server += ['SERVER_PORT' => null]; + if (null !== $server['SERVER_PORT']) { + $server['SERVER_PORT'] = (int) $server['SERVER_PORT']; + } + + if (isset($server['HTTP_HOST']) && 1 === preg_match(self::REGEXP_HOST_PORT, $server['HTTP_HOST'], $matches)) { + if (isset($matches['port'])) { + $matches['port'] = (int) $matches['port']; + } + + return [ + $matches['host'], + $matches['port'] ?? $server['SERVER_PORT'], + ]; + } + + if (!isset($server['SERVER_ADDR'])) { + throw new SyntaxError('The host could not be detected'); + } + + if (false === filter_var($server['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + $server['SERVER_ADDR'] = '['.$server['SERVER_ADDR'].']'; + } + + return [$server['SERVER_ADDR'], $server['SERVER_PORT']]; + } + + /** + * Returns the environment path. + * + * @return array{0:?string, 1:?string} + */ + private static function fetchRequestUri(array $server): array + { + $server += ['IIS_WasUrlRewritten' => null, 'UNENCODED_URL' => '', 'PHP_SELF' => '', 'QUERY_STRING' => null]; + if ('1' === $server['IIS_WasUrlRewritten'] && '' !== $server['UNENCODED_URL']) { + /** @var array{0:?string, 1:?string} $retval */ + $retval = explode('?', $server['UNENCODED_URL'], 2) + [1 => null]; + + return $retval; + } + + if (isset($server['REQUEST_URI'])) { + [$path, ] = explode('?', $server['REQUEST_URI'], 2); + $query = ('' !== $server['QUERY_STRING']) ? $server['QUERY_STRING'] : null; + + return [$path, $query]; + } + + return [$server['PHP_SELF'], $server['QUERY_STRING']]; + } + + /** + * Generate the URI authority part. + */ + private function setAuthority(): ?string + { + $authority = null; + if (null !== $this->user_info) { + $authority = $this->user_info.'@'; + } + + if (null !== $this->host) { + $authority .= $this->host; + } + + if (null !== $this->port) { + $authority .= ':'.$this->port; + } + + return $authority; + } + + /** + * Format the Path component. + */ + private function formatPath(string $path): string + { + $path = $this->formatDataPath($path); + + static $pattern = '/(?:[^'.self::REGEXP_CHARS_UNRESERVED.self::REGEXP_CHARS_SUBDELIM.'%:@\/}{]++|%(?![A-Fa-f0-9]{2}))/'; + + $path = (string) preg_replace_callback($pattern, [Uri::class, 'urlEncodeMatch'], $path); + + return $this->formatFilePath($path); + } + + /** + * Filter the Path component. + * + * @link https://tools.ietf.org/html/rfc2397 + * + * @throws SyntaxError If the path is not compliant with RFC2397 + */ + private function formatDataPath(string $path): string + { + if ('data' !== $this->scheme) { + return $path; + } + + if ('' == $path) { + return 'text/plain;charset=us-ascii,'; + } + + if (strlen($path) !== strspn($path, self::ASCII) || false === strpos($path, ',')) { + throw new SyntaxError(sprintf('The path `%s` is invalid according to RFC2937', $path)); + } + + $parts = explode(',', $path, 2) + [1 => null]; + $mediatype = explode(';', (string) $parts[0], 2) + [1 => null]; + $data = (string) $parts[1]; + $mimetype = $mediatype[0]; + if (null === $mimetype || '' === $mimetype) { + $mimetype = 'text/plain'; + } + + $parameters = $mediatype[1]; + if (null === $parameters || '' === $parameters) { + $parameters = 'charset=us-ascii'; + } + + $this->assertValidPath($mimetype, $parameters, $data); + + return $mimetype.';'.$parameters.','.$data; + } + + /** + * Assert the path is a compliant with RFC2397. + * + * @link https://tools.ietf.org/html/rfc2397 + * + * @throws SyntaxError If the mediatype or the data are not compliant with the RFC2397 + */ + private function assertValidPath(string $mimetype, string $parameters, string $data): void + { + if (1 !== preg_match(self::REGEXP_MIMETYPE, $mimetype)) { + throw new SyntaxError(sprintf('The path mimetype `%s` is invalid', $mimetype)); + } + + $is_binary = 1 === preg_match(self::REGEXP_BINARY, $parameters, $matches); + if ($is_binary) { + $parameters = substr($parameters, 0, - strlen($matches[0])); + } + + $res = array_filter(array_filter(explode(';', $parameters), [$this, 'validateParameter'])); + if ([] !== $res) { + throw new SyntaxError(sprintf('The path paremeters `%s` is invalid', $parameters)); + } + + if (!$is_binary) { + return; + } + + $res = base64_decode($data, true); + if (false === $res || $data !== base64_encode($res)) { + throw new SyntaxError(sprintf('The path data `%s` is invalid', $data)); + } + } + + /** + * Validate mediatype parameter. + */ + private function validateParameter(string $parameter): bool + { + $properties = explode('=', $parameter); + + return 2 != count($properties) || 'base64' === strtolower($properties[0]); + } + + /** + * Format path component for file scheme. + */ + private function formatFilePath(string $path): string + { + if ('file' !== $this->scheme) { + return $path; + } + + $replace = static function (array $matches): string { + return $matches['delim'].$matches['volume'].':'.$matches['rest']; + }; + + return (string) preg_replace_callback(self::REGEXP_FILE_PATH, $replace, $path); + } + + /** + * Format the Query or the Fragment component. + * + * Returns a array containing: + *
    + *
  • the formatted component (a string or null)
  • + *
  • a boolean flag telling wether the delimiter is to be added to the component + * when building the URI string representation
  • + *
+ * + * @param ?string $component + */ + private function formatQueryAndFragment(?string $component): ?string + { + if (null === $component || '' === $component) { + return $component; + } + + static $pattern = '/(?:[^'.self::REGEXP_CHARS_UNRESERVED.self::REGEXP_CHARS_SUBDELIM.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/'; + return preg_replace_callback($pattern, [Uri::class, 'urlEncodeMatch'], $component); + } + + /** + * assert the URI internal state is valid. + * + * @link https://tools.ietf.org/html/rfc3986#section-3 + * @link https://tools.ietf.org/html/rfc3986#section-3.3 + * + * @throws SyntaxError if the URI is in an invalid state according to RFC3986 + * @throws SyntaxError if the URI is in an invalid state according to scheme specific rules + */ + private function assertValidState(): void + { + if (null !== $this->authority && ('' !== $this->path && '/' !== $this->path[0])) { + throw new SyntaxError('If an authority is present the path must be empty or start with a `/`.'); + } + + if (null === $this->authority && 0 === strpos($this->path, '//')) { + throw new SyntaxError(sprintf('If there is no authority the path `%s` can not start with a `//`.', $this->path)); + } + + $pos = strpos($this->path, ':'); + if (null === $this->authority + && null === $this->scheme + && false !== $pos + && false === strpos(substr($this->path, 0, $pos), '/') + ) { + throw new SyntaxError('In absence of a scheme and an authority the first path segment cannot contain a colon (":") character.'); + } + + $validationMethod = self::SCHEME_VALIDATION_METHOD[$this->scheme] ?? null; + if (null === $validationMethod || true === $this->$validationMethod()) { + $this->uri = null; + + return; + } + + throw new SyntaxError(sprintf('The uri `%s` is invalid for the `%s` scheme.', (string) $this, $this->scheme)); + } + + /** + * URI validation for URI schemes which allows only scheme and path components. + */ + private function isUriWithSchemeAndPathOnly(): bool + { + return null === $this->authority + && null === $this->query + && null === $this->fragment; + } + + /** + * URI validation for URI schemes which allows only scheme, host and path components. + */ + private function isUriWithSchemeHostAndPathOnly(): bool + { + return null === $this->user_info + && null === $this->port + && null === $this->query + && null === $this->fragment + && !('' != $this->scheme && null === $this->host); + } + + /** + * URI validation for URI schemes which disallow the empty '' host. + */ + private function isNonEmptyHostUri(): bool + { + return '' !== $this->host + && !(null !== $this->scheme && null === $this->host); + } + + /** + * URI validation for URIs schemes which disallow the empty '' host + * and forbids the fragment component. + */ + private function isNonEmptyHostUriWithoutFragment(): bool + { + return $this->isNonEmptyHostUri() && null === $this->fragment; + } + + /** + * URI validation for URIs schemes which disallow the empty '' host + * and forbids fragment and query components. + */ + private function isNonEmptyHostUriWithoutFragmentAndQuery(): bool + { + return $this->isNonEmptyHostUri() && null === $this->fragment && null === $this->query; + } + + /** + * Generate the URI string representation from its components. + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + * + * @param ?string $scheme + * @param ?string $authority + * @param ?string $query + * @param ?string $fragment + */ + private function getUriString( + ?string $scheme, + ?string $authority, + string $path, + ?string $query, + ?string $fragment + ): string { + if (null !== $scheme) { + $scheme = $scheme.':'; + } + + if (null !== $authority) { + $authority = '//'.$authority; + } + + if (null !== $query) { + $query = '?'.$query; + } + + if (null !== $fragment) { + $fragment = '#'.$fragment; + } + + return $scheme.$authority.$path.$query.$fragment; + } + + public function toString(): string + { + $this->uri = $this->uri ?? $this->getUriString( + $this->scheme, + $this->authority, + $this->path, + $this->query, + $this->fragment + ); + + return $this->uri; + } + + /** + * {@inheritDoc} + */ + public function __toString(): string + { + return $this->toString(); + } + + /** + * {@inheritDoc} + */ + public function jsonSerialize(): string + { + return $this->toString(); + } + + /** + * {@inheritDoc} + * + * @return array{scheme:?string, user_info:?string, host:?string, port:?int, path:string, query:?string, fragment:?string} + */ + public function __debugInfo(): array + { + return [ + 'scheme' => $this->scheme, + 'user_info' => isset($this->user_info) ? preg_replace(',:(.*).?$,', ':***', $this->user_info) : null, + 'host' => $this->host, + 'port' => $this->port, + 'path' => $this->path, + 'query' => $this->query, + 'fragment' => $this->fragment, + ]; + } + + /** + * {@inheritDoc} + */ + public function getScheme(): ?string + { + return $this->scheme; + } + + /** + * {@inheritDoc} + */ + public function getAuthority(): ?string + { + return $this->authority; + } + + /** + * {@inheritDoc} + */ + public function getUserInfo(): ?string + { + return $this->user_info; + } + + /** + * {@inheritDoc} + */ + public function getHost(): ?string + { + return $this->host; + } + + /** + * {@inheritDoc} + */ + public function getPort(): ?int + { + return $this->port; + } + + /** + * {@inheritDoc} + */ + public function getPath(): string + { + if (0 === strpos($this->path, '//')) { + return '/'.ltrim($this->path, '/'); + } + + return $this->path; + } + + /** + * {@inheritDoc} + */ + public function getQuery(): ?string + { + return $this->query; + } + + /** + * {@inheritDoc} + */ + public function getFragment(): ?string + { + return $this->fragment; + } + + /** + * {@inheritDoc} + */ + public function withScheme($scheme): UriInterface + { + $scheme = $this->formatScheme($this->filterString($scheme)); + if ($scheme === $this->scheme) { + return $this; + } + + $clone = clone $this; + $clone->scheme = $scheme; + $clone->port = $clone->formatPort($clone->port); + $clone->authority = $clone->setAuthority(); + $clone->assertValidState(); + + return $clone; + } + + /** + * Filter a string. + * + * @param mixed $str the value to evaluate as a string + * + * @throws SyntaxError if the submitted data can not be converted to string + */ + private function filterString($str): ?string + { + if (null === $str) { + return $str; + } + + if (is_object($str) && method_exists($str, '__toString')) { + $str = (string) $str; + } + + if (!is_scalar($str)) { + throw new SyntaxError(sprintf('The component must be a string, a scalar or a stringable object; `%s` given.', gettype($str))); + } + + $str = (string) $str; + if (1 !== preg_match(self::REGEXP_INVALID_CHARS, $str)) { + return $str; + } + + throw new SyntaxError(sprintf('The component `%s` contains invalid characters.', $str)); + } + + /** + * {@inheritDoc} + */ + public function withUserInfo($user, $password = null): UriInterface + { + $user_info = null; + $user = $this->filterString($user); + if (null !== $password) { + $password = $this->filterString($password); + } + + if ('' !== $user) { + $user_info = $this->formatUserInfo($user, $password); + } + + if ($user_info === $this->user_info) { + return $this; + } + + $clone = clone $this; + $clone->user_info = $user_info; + $clone->authority = $clone->setAuthority(); + $clone->assertValidState(); + + return $clone; + } + + /** + * {@inheritDoc} + */ + public function withHost($host): UriInterface + { + $host = $this->formatHost($this->filterString($host)); + if ($host === $this->host) { + return $this; + } + + $clone = clone $this; + $clone->host = $host; + $clone->authority = $clone->setAuthority(); + $clone->assertValidState(); + + return $clone; + } + + /** + * {@inheritDoc} + */ + public function withPort($port): UriInterface + { + $port = $this->formatPort($port); + if ($port === $this->port) { + return $this; + } + + $clone = clone $this; + $clone->port = $port; + $clone->authority = $clone->setAuthority(); + $clone->assertValidState(); + + return $clone; + } + + /** + * {@inheritDoc} + * + * @param string|object $path + */ + public function withPath($path): UriInterface + { + $path = $this->filterString($path); + if (null === $path) { + throw new TypeError('A path must be a string NULL given.'); + } + + $path = $this->formatPath($path); + if ($path === $this->path) { + return $this; + } + + $clone = clone $this; + $clone->path = $path; + $clone->assertValidState(); + + return $clone; + } + + /** + * {@inheritDoc} + */ + public function withQuery($query): UriInterface + { + $query = $this->formatQueryAndFragment($this->filterString($query)); + if ($query === $this->query) { + return $this; + } + + $clone = clone $this; + $clone->query = $query; + $clone->assertValidState(); + + return $clone; + } + + /** + * {@inheritDoc} + */ + public function withFragment($fragment): UriInterface + { + $fragment = $this->formatQueryAndFragment($this->filterString($fragment)); + if ($fragment === $this->fragment) { + return $this; + } + + $clone = clone $this; + $clone->fragment = $fragment; + $clone->assertValidState(); + + return $clone; + } +} diff --git a/dist/vendor/league/uri/src/UriInfo.php b/dist/vendor/league/uri/src/UriInfo.php new file mode 100644 index 000000000..ec8473c54 --- /dev/null +++ b/dist/vendor/league/uri/src/UriInfo.php @@ -0,0 +1,215 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use League\Uri\Contracts\UriInterface; +use Psr\Http\Message\UriInterface as Psr7UriInterface; +use TypeError; +use function explode; +use function implode; +use function preg_replace_callback; +use function rawurldecode; +use function sprintf; + +final class UriInfo +{ + private const REGEXP_ENCODED_CHARS = ',%(2[D|E]|3[0-9]|4[1-9|A-F]|5[0-9|AF]|6[1-9|A-F]|7[0-9|E]),i'; + + private const WHATWG_SPECIAL_SCHEMES = ['ftp' => 21, 'http' => 80, 'https' => 443, 'ws' => 80, 'wss' => 443]; + + /** + * @codeCoverageIgnore + */ + private function __construct() + { + } + + /** + * @param Psr7UriInterface|UriInterface $uri + */ + private static function emptyComponentValue($uri): ?string + { + return $uri instanceof Psr7UriInterface ? '' : null; + } + + /** + * Filter the URI object. + * + * To be valid an URI MUST implement at least one of the following interface: + * - League\Uri\UriInterface + * - Psr\Http\Message\UriInterface + * + * @param mixed $uri the URI to validate + * + * @throws TypeError if the URI object does not implements the supported interfaces. + * + * @return Psr7UriInterface|UriInterface + */ + private static function filterUri($uri) + { + if ($uri instanceof Psr7UriInterface || $uri instanceof UriInterface) { + return $uri; + } + + throw new TypeError(sprintf('The uri must be a valid URI object received `%s`', is_object($uri) ? get_class($uri) : gettype($uri))); + } + + /** + * Normalize an URI for comparison. + * + * @param Psr7UriInterface|UriInterface $uri + * + * @return Psr7UriInterface|UriInterface + */ + private static function normalize($uri) + { + $uri = self::filterUri($uri); + $null = self::emptyComponentValue($uri); + + $path = $uri->getPath(); + if ('/' === ($path[0] ?? '') || '' !== $uri->getScheme().$uri->getAuthority()) { + $path = UriResolver::resolve($uri, $uri->withPath('')->withQuery($null))->getPath(); + } + + $query = $uri->getQuery(); + $fragment = $uri->getFragment(); + $fragmentOrig = $fragment; + $pairs = null === $query ? [] : explode('&', $query); + sort($pairs, SORT_REGULAR); + + $replace = static fn (array $matches): string => rawurldecode($matches[0]); + + $retval = preg_replace_callback(self::REGEXP_ENCODED_CHARS, $replace, [$path, implode('&', $pairs), $fragment]); + if (null !== $retval) { + [$path, $query, $fragment] = $retval + ['', $null, $null]; + } + + if ($null !== $uri->getAuthority() && '' === $path) { + $path = '/'; + } + + return $uri + ->withHost(Uri::createFromComponents(['host' => $uri->getHost()])->getHost()) + ->withPath($path) + ->withQuery([] === $pairs ? $null : $query) + ->withFragment($null === $fragmentOrig ? $fragmentOrig : $fragment); + } + + /** + * Tell whether the URI represents an absolute URI. + * + * @param Psr7UriInterface|UriInterface $uri + */ + public static function isAbsolute($uri): bool + { + return self::emptyComponentValue($uri) !== self::filterUri($uri)->getScheme(); + } + + /** + * Tell whether the URI represents a network path. + * + * @param Psr7UriInterface|UriInterface $uri + */ + public static function isNetworkPath($uri): bool + { + $uri = self::filterUri($uri); + $null = self::emptyComponentValue($uri); + + return $null === $uri->getScheme() && $null !== $uri->getAuthority(); + } + + /** + * Tell whether the URI represents an absolute path. + * + * @param Psr7UriInterface|UriInterface $uri + */ + public static function isAbsolutePath($uri): bool + { + $uri = self::filterUri($uri); + $null = self::emptyComponentValue($uri); + + return $null === $uri->getScheme() + && $null === $uri->getAuthority() + && '/' === ($uri->getPath()[0] ?? ''); + } + + /** + * Tell whether the URI represents a relative path. + * + * @param Psr7UriInterface|UriInterface $uri + */ + public static function isRelativePath($uri): bool + { + $uri = self::filterUri($uri); + $null = self::emptyComponentValue($uri); + + return $null === $uri->getScheme() + && $null === $uri->getAuthority() + && '/' !== ($uri->getPath()[0] ?? ''); + } + + /** + * Tell whether both URI refers to the same document. + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + */ + public static function isSameDocument($uri, $base_uri): bool + { + $uri = self::normalize($uri); + $base_uri = self::normalize($base_uri); + + return (string) $uri->withFragment($uri instanceof Psr7UriInterface ? '' : null) + === (string) $base_uri->withFragment($base_uri instanceof Psr7UriInterface ? '' : null); + } + + /** + * Returns the URI origin property as defined by WHATWG URL living standard. + * + * {@see https://url.spec.whatwg.org/#origin} + * + * For URI without a special scheme the method returns null + * For URI with the file scheme the method will return null (as this is left to the implementation decision) + * For URI with a special scheme the method returns the scheme followed by its authority (without the userinfo part) + * + * @param Psr7UriInterface|UriInterface $uri + */ + public static function getOrigin($uri): ?string + { + $scheme = self::filterUri($uri)->getScheme(); + if ('blob' === $scheme) { + $uri = Uri::createFromString($uri->getPath()); + $scheme = $uri->getScheme(); + } + + if (null === $scheme || !array_key_exists($scheme, self::WHATWG_SPECIAL_SCHEMES)) { + return null; + } + + $null = self::emptyComponentValue($uri); + + return (string) $uri->withFragment($null)->withQuery($null)->withPath('')->withUserInfo($null); + } + + /** + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + */ + public static function isCrossOrigin($uri, $base_uri): bool + { + return null === ($uriString = self::getOrigin(Uri::createFromUri($uri))) + || null === ($baseUriString = self::getOrigin(Uri::createFromUri($base_uri))) + || $uriString !== $baseUriString; + } +} diff --git a/dist/vendor/league/uri/src/UriResolver.php b/dist/vendor/league/uri/src/UriResolver.php new file mode 100644 index 000000000..1090383c8 --- /dev/null +++ b/dist/vendor/league/uri/src/UriResolver.php @@ -0,0 +1,376 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use League\Uri\Contracts\UriInterface; +use Psr\Http\Message\UriInterface as Psr7UriInterface; +use TypeError; +use function array_pop; +use function array_reduce; +use function count; +use function end; +use function explode; +use function gettype; +use function implode; +use function in_array; +use function sprintf; +use function str_repeat; +use function strpos; +use function substr; + +final class UriResolver +{ + /** + * @var array + */ + const DOT_SEGMENTS = ['.' => 1, '..' => 1]; + + /** + * @codeCoverageIgnore + */ + private function __construct() + { + } + + /** + * Resolve an URI against a base URI using RFC3986 rules. + * + * If the first argument is a UriInterface the method returns a UriInterface object + * If the first argument is a Psr7UriInterface the method returns a Psr7UriInterface object + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + * + * @return Psr7UriInterface|UriInterface + */ + public static function resolve($uri, $base_uri) + { + self::filterUri($uri); + self::filterUri($base_uri); + $null = $uri instanceof Psr7UriInterface ? '' : null; + + if ($null !== $uri->getScheme()) { + return $uri + ->withPath(self::removeDotSegments($uri->getPath())); + } + + if ($null !== $uri->getAuthority()) { + return $uri + ->withScheme($base_uri->getScheme()) + ->withPath(self::removeDotSegments($uri->getPath())); + } + + $user = $null; + $pass = null; + $userInfo = $base_uri->getUserInfo(); + if (null !== $userInfo) { + [$user, $pass] = explode(':', $userInfo, 2) + [1 => null]; + } + + [$uri_path, $uri_query] = self::resolvePathAndQuery($uri, $base_uri); + + return $uri + ->withPath(self::removeDotSegments($uri_path)) + ->withQuery($uri_query) + ->withHost($base_uri->getHost()) + ->withPort($base_uri->getPort()) + ->withUserInfo((string) $user, $pass) + ->withScheme($base_uri->getScheme()) + ; + } + + /** + * Filter the URI object. + * + * @param mixed $uri an URI object + * + * @throws TypeError if the URI object does not implements the supported interfaces. + */ + private static function filterUri($uri): void + { + if (!$uri instanceof UriInterface && !$uri instanceof Psr7UriInterface) { + throw new TypeError(sprintf('The uri must be a valid URI object received `%s`', gettype($uri))); + } + } + + /** + * Remove dot segments from the URI path. + */ + private static function removeDotSegments(string $path): string + { + if (false === strpos($path, '.')) { + return $path; + } + + $old_segments = explode('/', $path); + $new_path = implode('/', array_reduce($old_segments, [UriResolver::class, 'reducer'], [])); + if (isset(self::DOT_SEGMENTS[end($old_segments)])) { + $new_path .= '/'; + } + + // @codeCoverageIgnoreStart + // added because some PSR-7 implementations do not respect RFC3986 + if (0 === strpos($path, '/') && 0 !== strpos($new_path, '/')) { + return '/'.$new_path; + } + // @codeCoverageIgnoreEnd + + return $new_path; + } + + /** + * Remove dot segments. + * + * @return array + */ + private static function reducer(array $carry, string $segment): array + { + if ('..' === $segment) { + array_pop($carry); + + return $carry; + } + + if (!isset(self::DOT_SEGMENTS[$segment])) { + $carry[] = $segment; + } + + return $carry; + } + + /** + * Resolve an URI path and query component. + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + * + * @return array{0:string, 1:string|null} + */ + private static function resolvePathAndQuery($uri, $base_uri): array + { + $target_path = $uri->getPath(); + $target_query = $uri->getQuery(); + $null = $uri instanceof Psr7UriInterface ? '' : null; + $baseNull = $base_uri instanceof Psr7UriInterface ? '' : null; + + if (0 === strpos($target_path, '/')) { + return [$target_path, $target_query]; + } + + if ('' === $target_path) { + if ($null === $target_query) { + $target_query = $base_uri->getQuery(); + } + + $target_path = $base_uri->getPath(); + //@codeCoverageIgnoreStart + //because some PSR-7 Uri implementations allow this RFC3986 forbidden construction + if ($baseNull !== $base_uri->getAuthority() && 0 !== strpos($target_path, '/')) { + $target_path = '/'.$target_path; + } + //@codeCoverageIgnoreEnd + + return [$target_path, $target_query]; + } + + $base_path = $base_uri->getPath(); + if ($baseNull !== $base_uri->getAuthority() && '' === $base_path) { + $target_path = '/'.$target_path; + } + + if ('' !== $base_path) { + $segments = explode('/', $base_path); + array_pop($segments); + if ([] !== $segments) { + $target_path = implode('/', $segments).'/'.$target_path; + } + } + + return [$target_path, $target_query]; + } + + /** + * Relativize an URI according to a base URI. + * + * This method MUST retain the state of the submitted URI instance, and return + * an URI instance of the same type that contains the applied modifications. + * + * This method MUST be transparent when dealing with error and exceptions. + * It MUST not alter of silence them apart from validating its own parameters. + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + * + * @return Psr7UriInterface|UriInterface + */ + public static function relativize($uri, $base_uri) + { + self::filterUri($uri); + self::filterUri($base_uri); + $uri = self::formatHost($uri); + $base_uri = self::formatHost($base_uri); + if (!self::isRelativizable($uri, $base_uri)) { + return $uri; + } + + $null = $uri instanceof Psr7UriInterface ? '' : null; + $uri = $uri->withScheme($null)->withPort(null)->withUserInfo($null)->withHost($null); + $target_path = $uri->getPath(); + if ($target_path !== $base_uri->getPath()) { + return $uri->withPath(self::relativizePath($target_path, $base_uri->getPath())); + } + + if (self::componentEquals('getQuery', $uri, $base_uri)) { + return $uri->withPath('')->withQuery($null); + } + + if ($null === $uri->getQuery()) { + return $uri->withPath(self::formatPathWithEmptyBaseQuery($target_path)); + } + + return $uri->withPath(''); + } + + /** + * Tells whether the component value from both URI object equals. + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + */ + private static function componentEquals(string $method, $uri, $base_uri): bool + { + return self::getComponent($method, $uri) === self::getComponent($method, $base_uri); + } + + /** + * Returns the component value from the submitted URI object. + * + * @param Psr7UriInterface|UriInterface $uri + */ + private static function getComponent(string $method, $uri): ?string + { + $component = $uri->$method(); + if ($uri instanceof Psr7UriInterface && '' === $component) { + return null; + } + + return $component; + } + + /** + * Filter the URI object. + * + * @param Psr7UriInterface|UriInterface $uri + * + * @throws TypeError if the URI object does not implements the supported interfaces. + * + * @return Psr7UriInterface|UriInterface + */ + private static function formatHost($uri) + { + if (!$uri instanceof Psr7UriInterface) { + return $uri; + } + + $host = $uri->getHost(); + if ('' === $host) { + return $uri; + } + + return $uri->withHost((string) Uri::createFromComponents(['host' => $host])->getHost()); + } + + /** + * Tell whether the submitted URI object can be relativize. + * + * @param Psr7UriInterface|UriInterface $uri + * @param Psr7UriInterface|UriInterface $base_uri + */ + private static function isRelativizable($uri, $base_uri): bool + { + return !UriInfo::isRelativePath($uri) + && self::componentEquals('getScheme', $uri, $base_uri) + && self::componentEquals('getAuthority', $uri, $base_uri); + } + + /** + * Relative the URI for a authority-less target URI. + */ + private static function relativizePath(string $path, string $basepath): string + { + $base_segments = self::getSegments($basepath); + $target_segments = self::getSegments($path); + $target_basename = array_pop($target_segments); + array_pop($base_segments); + foreach ($base_segments as $offset => $segment) { + if (!isset($target_segments[$offset]) || $segment !== $target_segments[$offset]) { + break; + } + unset($base_segments[$offset], $target_segments[$offset]); + } + $target_segments[] = $target_basename; + + return self::formatPath( + str_repeat('../', count($base_segments)).implode('/', $target_segments), + $basepath + ); + } + + /** + * returns the path segments. + * + * @return string[] + */ + private static function getSegments(string $path): array + { + if ('' !== $path && '/' === $path[0]) { + $path = substr($path, 1); + } + + return explode('/', $path); + } + + /** + * Formatting the path to keep a valid URI. + */ + private static function formatPath(string $path, string $basepath): string + { + if ('' === $path) { + return in_array($basepath, ['', '/'], true) ? $basepath : './'; + } + + if (false === ($colon_pos = strpos($path, ':'))) { + return $path; + } + + $slash_pos = strpos($path, '/'); + if (false === $slash_pos || $colon_pos < $slash_pos) { + return "./$path"; + } + + return $path; + } + + /** + * Formatting the path to keep a resolvable URI. + */ + private static function formatPathWithEmptyBaseQuery(string $path): string + { + $target_segments = self::getSegments($path); + /** @var string $basename */ + $basename = end($target_segments); + + return '' === $basename ? './' : $basename; + } +} diff --git a/dist/vendor/league/uri/src/UriString.php b/dist/vendor/league/uri/src/UriString.php new file mode 100644 index 000000000..674e1a437 --- /dev/null +++ b/dist/vendor/league/uri/src/UriString.php @@ -0,0 +1,467 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use League\Uri\Exceptions\IdnaConversionFailed; +use League\Uri\Exceptions\IdnSupportMissing; +use League\Uri\Exceptions\SyntaxError; +use League\Uri\Idna\Idna; +use TypeError; +use function array_merge; +use function explode; +use function filter_var; +use function gettype; +use function inet_pton; +use function is_object; +use function is_scalar; +use function method_exists; +use function preg_match; +use function rawurldecode; +use function sprintf; +use function strpos; +use function substr; +use const FILTER_FLAG_IPV6; +use const FILTER_VALIDATE_IP; + +/** + * A class to parse a URI string according to RFC3986. + * + * @link https://tools.ietf.org/html/rfc3986 + * @package League\Uri + * @author Ignace Nyamagana Butera + * @since 6.0.0 + */ +final class UriString +{ + /** + * Default URI component values. + */ + private const URI_COMPONENTS = [ + 'scheme' => null, 'user' => null, 'pass' => null, 'host' => null, + 'port' => null, 'path' => '', 'query' => null, 'fragment' => null, + ]; + + /** + * Simple URI which do not need any parsing. + */ + private const URI_SCHORTCUTS = [ + '' => [], + '#' => ['fragment' => ''], + '?' => ['query' => ''], + '?#' => ['query' => '', 'fragment' => ''], + '/' => ['path' => '/'], + '//' => ['host' => ''], + ]; + + /** + * Range of invalid characters in URI string. + */ + private const REGEXP_INVALID_URI_CHARS = '/[\x00-\x1f\x7f]/'; + + /** + * RFC3986 regular expression URI splitter. + * + * @link https://tools.ietf.org/html/rfc3986#appendix-B + */ + private const REGEXP_URI_PARTS = ',^ + (?(?[^:/?\#]+):)? # URI scheme component + (?//(?[^/?\#]*))? # URI authority part + (?[^?\#]*) # URI path component + (?\?(?[^\#]*))? # URI query component + (?\#(?.*))? # URI fragment component + ,x'; + + /** + * URI scheme regular expresssion. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.1 + */ + private const REGEXP_URI_SCHEME = '/^([a-z][a-z\d\+\.\-]*)?$/i'; + + /** + * IPvFuture regular expression. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + private const REGEXP_IP_FUTURE = '/^ + v(?[A-F0-9])+\. + (?: + (?[a-z0-9_~\-\.])| + (?[!$&\'()*+,;=:]) # also include the : character + )+ + $/ix'; + + /** + * General registered name regular expression. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + private const REGEXP_REGISTERED_NAME = '/(?(DEFINE) + (?[a-z0-9_~\-]) # . is missing as it is used to separate labels + (?[!$&\'()*+,;=]) + (?%[A-F0-9]{2}) + (?(?:(?&unreserved)|(?&sub_delims)|(?&encoded))*) + ) + ^(?:(?®_name)\.)*(?®_name)\.?$/ix'; + + /** + * Invalid characters in host regular expression. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + */ + private const REGEXP_INVALID_HOST_CHARS = '/ + [:\/?#\[\]@ ] # gen-delims characters as well as the space character + /ix'; + + /** + * Invalid path for URI without scheme and authority regular expression. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.3 + */ + private const REGEXP_INVALID_PATH = ',^(([^/]*):)(.*)?/,'; + + /** + * Host and Port splitter regular expression. + */ + private const REGEXP_HOST_PORT = ',^(?\[.*\]|[^:]*)(:(?.*))?$,'; + + /** + * IDN Host detector regular expression. + */ + private const REGEXP_IDN_PATTERN = '/[^\x20-\x7f]/'; + + /** + * Only the address block fe80::/10 can have a Zone ID attach to + * let's detect the link local significant 10 bits. + */ + private const ZONE_ID_ADDRESS_BLOCK = "\xfe\x80"; + + /** + * Generate an URI string representation from its parsed representation + * returned by League\UriString::parse() or PHP's parse_url. + * + * If you supply your own array, you are responsible for providing + * valid components without their URI delimiters. + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + * @link https://tools.ietf.org/html/rfc3986#section-7.5 + * + * @param array{ + * scheme:?string, + * user:?string, + * pass:?string, + * host:?string, + * port:?int, + * path:?string, + * query:?string, + * fragment:?string + * } $components + */ + public static function build(array $components): string + { + $result = $components['path'] ?? ''; + if (isset($components['query'])) { + $result .= '?'.$components['query']; + } + + if (isset($components['fragment'])) { + $result .= '#'.$components['fragment']; + } + + $scheme = null; + if (isset($components['scheme'])) { + $scheme = $components['scheme'].':'; + } + + if (!isset($components['host'])) { + return $scheme.$result; + } + + $scheme .= '//'; + $authority = $components['host']; + if (isset($components['port'])) { + $authority .= ':'.$components['port']; + } + + if (!isset($components['user'])) { + return $scheme.$authority.$result; + } + + $authority = '@'.$authority; + if (!isset($components['pass'])) { + return $scheme.$components['user'].$authority.$result; + } + + return $scheme.$components['user'].':'.$components['pass'].$authority.$result; + } + + /** + * Parse an URI string into its components. + * + * This method parses a URI and returns an associative array containing any + * of the various components of the URI that are present. + * + * + * $components = (new Parser())->parse('http://foo@test.example.com:42?query#'); + * var_export($components); + * //will display + * array( + * 'scheme' => 'http', // the URI scheme component + * 'user' => 'foo', // the URI user component + * 'pass' => null, // the URI pass component + * 'host' => 'test.example.com', // the URI host component + * 'port' => 42, // the URI port component + * 'path' => '', // the URI path component + * 'query' => 'query', // the URI query component + * 'fragment' => '', // the URI fragment component + * ); + * + * + * The returned array is similar to PHP's parse_url return value with the following + * differences: + * + *
    + *
  • All components are always present in the returned array
  • + *
  • Empty and undefined component are treated differently. And empty component is + * set to the empty string while an undefined component is set to the `null` value.
  • + *
  • The path component is never undefined
  • + *
  • The method parses the URI following the RFC3986 rules but you are still + * required to validate the returned components against its related scheme specific rules.
  • + *
+ * + * @link https://tools.ietf.org/html/rfc3986 + * + * @param mixed $uri any scalar or stringable object + * + * @throws SyntaxError if the URI contains invalid characters + * @throws SyntaxError if the URI contains an invalid scheme + * @throws SyntaxError if the URI contains an invalid path + * + * @return array{ + * scheme:?string, + * user:?string, + * pass:?string, + * host:?string, + * port:?int, + * path:string, + * query:?string, + * fragment:?string + * } + */ + public static function parse($uri): array + { + if (is_object($uri) && method_exists($uri, '__toString')) { + $uri = (string) $uri; + } + + if (!is_scalar($uri)) { + throw new TypeError(sprintf('The uri must be a scalar or a stringable object `%s` given', gettype($uri))); + } + + $uri = (string) $uri; + + if (isset(self::URI_SCHORTCUTS[$uri])) { + /** @var array{scheme:?string, user:?string, pass:?string, host:?string, port:?int, path:string, query:?string, fragment:?string} $components */ + $components = array_merge(self::URI_COMPONENTS, self::URI_SCHORTCUTS[$uri]); + + return $components; + } + + if (1 === preg_match(self::REGEXP_INVALID_URI_CHARS, $uri)) { + throw new SyntaxError(sprintf('The uri `%s` contains invalid characters', $uri)); + } + + //if the first character is a known URI delimiter parsing can be simplified + $first_char = $uri[0]; + + //The URI is made of the fragment only + if ('#' === $first_char) { + [, $fragment] = explode('#', $uri, 2); + $components = self::URI_COMPONENTS; + $components['fragment'] = $fragment; + + return $components; + } + + //The URI is made of the query and fragment + if ('?' === $first_char) { + [, $partial] = explode('?', $uri, 2); + [$query, $fragment] = explode('#', $partial, 2) + [1 => null]; + $components = self::URI_COMPONENTS; + $components['query'] = $query; + $components['fragment'] = $fragment; + + return $components; + } + + //use RFC3986 URI regexp to split the URI + preg_match(self::REGEXP_URI_PARTS, $uri, $parts); + $parts += ['query' => '', 'fragment' => '']; + + if (':' === $parts['scheme'] || 1 !== preg_match(self::REGEXP_URI_SCHEME, $parts['scontent'])) { + throw new SyntaxError(sprintf('The uri `%s` contains an invalid scheme', $uri)); + } + + if ('' === $parts['scheme'].$parts['authority'] && 1 === preg_match(self::REGEXP_INVALID_PATH, $parts['path'])) { + throw new SyntaxError(sprintf('The uri `%s` contains an invalid path.', $uri)); + } + + /** @var array{scheme:?string, user:?string, pass:?string, host:?string, port:?int, path:string, query:?string, fragment:?string} $components */ + $components = array_merge( + self::URI_COMPONENTS, + '' === $parts['authority'] ? [] : self::parseAuthority($parts['acontent']), + [ + 'path' => $parts['path'], + 'scheme' => '' === $parts['scheme'] ? null : $parts['scontent'], + 'query' => '' === $parts['query'] ? null : $parts['qcontent'], + 'fragment' => '' === $parts['fragment'] ? null : $parts['fcontent'], + ] + ); + + return $components; + } + + /** + * Parses the URI authority part. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2 + * + * @throws SyntaxError If the port component is invalid + * + * @return array{user:?string, pass:?string, host:?string, port:?int} + */ + private static function parseAuthority(string $authority): array + { + $components = ['user' => null, 'pass' => null, 'host' => '', 'port' => null]; + if ('' === $authority) { + return $components; + } + + $parts = explode('@', $authority, 2); + if (isset($parts[1])) { + [$components['user'], $components['pass']] = explode(':', $parts[0], 2) + [1 => null]; + } + + preg_match(self::REGEXP_HOST_PORT, $parts[1] ?? $parts[0], $matches); + $matches += ['port' => '']; + + $components['port'] = self::filterPort($matches['port']); + $components['host'] = self::filterHost($matches['host']); + + return $components; + } + + /** + * Filter and format the port component. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + * + * @throws SyntaxError if the registered name is invalid + */ + private static function filterPort(string $port): ?int + { + if ('' === $port) { + return null; + } + + if (1 === preg_match('/^\d*$/', $port)) { + return (int) $port; + } + + throw new SyntaxError(sprintf('The port `%s` is invalid', $port)); + } + + /** + * Returns whether a hostname is valid. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + * + * @throws SyntaxError if the registered name is invalid + */ + private static function filterHost(string $host): string + { + if ('' === $host) { + return $host; + } + + if ('[' !== $host[0] || ']' !== substr($host, -1)) { + return self::filterRegisteredName($host); + } + + if (!self::isIpHost(substr($host, 1, -1))) { + throw new SyntaxError(sprintf('Host `%s` is invalid : the IP host is malformed', $host)); + } + + return $host; + } + + /** + * Returns whether the host is an IPv4 or a registered named. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + * + * @throws SyntaxError if the registered name is invalid + * @throws IdnSupportMissing if IDN support or ICU requirement are not available or met. + */ + private static function filterRegisteredName(string $host): string + { + $formatted_host = rawurldecode($host); + if (1 === preg_match(self::REGEXP_REGISTERED_NAME, $formatted_host)) { + return $host; + } + + //to test IDN host non-ascii characters must be present in the host + if (1 !== preg_match(self::REGEXP_IDN_PATTERN, $formatted_host)) { + throw new SyntaxError(sprintf('Host `%s` is invalid : the host is not a valid registered name', $host)); + } + + $info = Idna::toAscii($host, Idna::IDNA2008_ASCII); + if (0 !== $info->errors()) { + throw IdnaConversionFailed::dueToIDNAError($host, $info); + } + + return $host; + } + + /** + * Validates a IPv6/IPvfuture host. + * + * @link https://tools.ietf.org/html/rfc3986#section-3.2.2 + * @link https://tools.ietf.org/html/rfc6874#section-2 + * @link https://tools.ietf.org/html/rfc6874#section-4 + */ + private static function isIpHost(string $ip_host): bool + { + if (false !== filter_var($ip_host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + return true; + } + + if (1 === preg_match(self::REGEXP_IP_FUTURE, $ip_host, $matches)) { + return !in_array($matches['version'], ['4', '6'], true); + } + + $pos = strpos($ip_host, '%'); + if (false === $pos || 1 === preg_match( + self::REGEXP_INVALID_HOST_CHARS, + rawurldecode(substr($ip_host, $pos)) + )) { + return false; + } + + $ip_host = substr($ip_host, 0, $pos); + + return false !== filter_var($ip_host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) + && 0 === strpos((string) inet_pton($ip_host), self::ZONE_ID_ADDRESS_BLOCK); + } +} diff --git a/dist/vendor/league/uri/src/UriTemplate.php b/dist/vendor/league/uri/src/UriTemplate.php new file mode 100644 index 000000000..ba7a5a333 --- /dev/null +++ b/dist/vendor/league/uri/src/UriTemplate.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri; + +use League\Uri\Contracts\UriException; +use League\Uri\Contracts\UriInterface; +use League\Uri\Exceptions\SyntaxError; +use League\Uri\Exceptions\TemplateCanNotBeExpanded; +use League\Uri\UriTemplate\Template; +use League\Uri\UriTemplate\VariableBag; +use TypeError; + +/** + * Defines the URI Template syntax and the process for expanding a URI Template into a URI reference. + * + * @link https://tools.ietf.org/html/rfc6570 + * @package League\Uri + * @author Ignace Nyamagana Butera + * @since 6.1.0 + * + * Based on GuzzleHttp\UriTemplate class in Guzzle v6.5. + * @link https://github.com/guzzle/guzzle/blob/6.5/src/UriTemplate.php + */ +final class UriTemplate +{ + private Template $template; + private VariableBag $defaultVariables; + + /** + * @param object|string $template a string or an object with the __toString method + * + * @throws TypeError if the template is not a string or an object with the __toString method + * @throws SyntaxError if the template syntax is invalid + * @throws TemplateCanNotBeExpanded if the template variables are invalid + */ + public function __construct($template, array $defaultVariables = []) + { + $this->template = Template::createFromString($template); + $this->defaultVariables = $this->filterVariables($defaultVariables); + } + + public static function __set_state(array $properties): self + { + return new self($properties['template']->toString(), $properties['defaultVariables']->all()); + } + + /** + * Filters out variables for the given template. + * + * @param array> $variables + */ + private function filterVariables(array $variables): VariableBag + { + $output = new VariableBag(); + foreach ($this->template->variableNames() as $name) { + if (isset($variables[$name])) { + $output->assign($name, $variables[$name]); + } + } + + return $output; + } + + /** + * The template string. + */ + public function getTemplate(): string + { + return $this->template->toString(); + } + + /** + * Returns the names of the variables in the template, in order. + * + * @return string[] + */ + public function getVariableNames(): array + { + return $this->template->variableNames(); + } + + /** + * Returns the default values used to expand the template. + * + * The returned list only contains variables whose name is part of the current template. + * + * @return array + */ + public function getDefaultVariables(): array + { + return $this->defaultVariables->all(); + } + + /** + * Returns a new instance with the updated default variables. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the modified default variables. + * + * If present, variables whose name is not part of the current template + * possible variable names are removed. + */ + public function withDefaultVariables(array $defaultDefaultVariables): self + { + return new self( + $this->template->toString(), + $this->filterVariables($defaultDefaultVariables)->all() + ); + } + + /** + * @throws TemplateCanNotBeExpanded if the variable contains nested array values + * @throws UriException if the resulting expansion can not be converted to a UriInterface instance + */ + public function expand(array $variables = []): UriInterface + { + return Uri::createFromString( + $this->template->expand( + $this->filterVariables($variables)->replace($this->defaultVariables) + ) + ); + } +} diff --git a/dist/vendor/league/uri/src/UriTemplate/Expression.php b/dist/vendor/league/uri/src/UriTemplate/Expression.php new file mode 100644 index 000000000..99ecac98b --- /dev/null +++ b/dist/vendor/league/uri/src/UriTemplate/Expression.php @@ -0,0 +1,329 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\UriTemplate; + +use League\Uri\Exceptions\SyntaxError; +use League\Uri\Exceptions\TemplateCanNotBeExpanded; +use function array_filter; +use function array_keys; +use function array_map; +use function array_unique; +use function explode; +use function implode; +use function preg_match; +use function rawurlencode; +use function str_replace; +use function strpos; +use function substr; + +final class Expression +{ + /** + * Expression regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc6570#section-2.2 + */ + private const REGEXP_EXPRESSION = '/^\{ + (?: + (?[\.\/;\?&\=,\!@\|\+#])? + (?[^\}]*) + ) + \}$/x'; + + /** + * Reserved Operator characters. + * + * @link https://tools.ietf.org/html/rfc6570#section-2.2 + */ + private const RESERVED_OPERATOR = '=,!@|'; + + /** + * Processing behavior according to the expression type operator. + * + * @link https://tools.ietf.org/html/rfc6570#appendix-A + */ + private const OPERATOR_HASH_LOOKUP = [ + '' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], + '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], + '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], + ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], + '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], + '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true], + ]; + + private string $operator; + /** @var array */ + private array $varSpecifiers; + private string $joiner; + /** @var array */ + private array $variableNames; + private string $expressionString; + + private function __construct(string $operator, VarSpecifier ...$varSpecifiers) + { + $this->operator = $operator; + $this->varSpecifiers = $varSpecifiers; + $this->joiner = self::OPERATOR_HASH_LOOKUP[$operator]['joiner']; + $this->variableNames = $this->setVariableNames(); + $this->expressionString = $this->setExpressionString(); + } + + /** + * @return array + */ + private function setVariableNames(): array + { + return array_unique(array_map( + static fn (VarSpecifier $varSpecifier): string => $varSpecifier->name(), + $this->varSpecifiers + )); + } + + private function setExpressionString(): string + { + $varSpecifierString = implode(',', array_map( + static fn (VarSpecifier $variable): string => $variable->toString(), + $this->varSpecifiers + )); + + return '{'.$this->operator.$varSpecifierString.'}'; + } + + /** + * {@inheritDoc} + */ + public static function __set_state(array $properties): self + { + return new self($properties['operator'], ...$properties['varSpecifiers']); + } + + /** + * @throws SyntaxError if the expression is invalid + * @throws SyntaxError if the operator used in the expression is invalid + * @throws SyntaxError if the variable specifiers is invalid + */ + public static function createFromString(string $expression): self + { + if (1 !== preg_match(self::REGEXP_EXPRESSION, $expression, $parts)) { + throw new SyntaxError('The expression "'.$expression.'" is invalid.'); + } + + /** @var array{operator:string, variables:string} $parts */ + $parts = $parts + ['operator' => '']; + if ('' !== $parts['operator'] && false !== strpos(self::RESERVED_OPERATOR, $parts['operator'])) { + throw new SyntaxError('The operator used in the expression "'.$expression.'" is reserved.'); + } + + return new Expression($parts['operator'], ...array_map( + static fn (string $varSpec): VarSpecifier => VarSpecifier::createFromString($varSpec), + explode(',', $parts['variables']) + )); + } + + /** + * Returns the expression string representation. + * + */ + public function toString(): string + { + return $this->expressionString; + } + + /** + * @return array + */ + public function variableNames(): array + { + return $this->variableNames; + } + + public function expand(VariableBag $variables): string + { + $parts = []; + foreach ($this->varSpecifiers as $varSpecifier) { + $parts[] = $this->replace($varSpecifier, $variables); + } + + $expanded = implode($this->joiner, array_filter($parts, static fn ($value): bool => '' !== $value)); + if ('' === $expanded) { + return $expanded; + } + + $prefix = self::OPERATOR_HASH_LOOKUP[$this->operator]['prefix']; + if ('' === $prefix) { + return $expanded; + } + + return $prefix.$expanded; + } + + /** + * Replaces an expression with the given variables. + * + * @throws TemplateCanNotBeExpanded if the variables is an array and a ":" modifier needs to be applied + * @throws TemplateCanNotBeExpanded if the variables contains nested array values + */ + private function replace(VarSpecifier $varSpec, VariableBag $variables): string + { + $value = $variables->fetch($varSpec->name()); + if (null === $value) { + return ''; + } + + $useQuery = self::OPERATOR_HASH_LOOKUP[$this->operator]['query']; + [$expanded, $actualQuery] = $this->inject($value, $varSpec, $useQuery); + if (!$actualQuery) { + return $expanded; + } + + if ('&' !== $this->joiner && '' === $expanded) { + return $varSpec->name(); + } + + return $varSpec->name().'='.$expanded; + } + + /** + * @param string|array $value + * + * @return array{0:string, 1:bool} + */ + private function inject($value, VarSpecifier $varSpec, bool $useQuery): array + { + if (is_string($value)) { + return $this->replaceString($value, $varSpec, $useQuery); + } + + return $this->replaceList($value, $varSpec, $useQuery); + } + + /** + * Expands an expression using a string value. + * + * @return array{0:string, 1:bool} + */ + private function replaceString(string $value, VarSpecifier $varSpec, bool $useQuery): array + { + if (':' === $varSpec->modifier()) { + $value = substr($value, 0, $varSpec->position()); + } + + $expanded = rawurlencode($value); + if ('+' === $this->operator || '#' === $this->operator) { + return [$this->decodeReserved($expanded), $useQuery]; + } + + return [$expanded, $useQuery]; + } + + /** + * Expands an expression using a list of values. + * + * @param array $value + * + * @throws TemplateCanNotBeExpanded if the variables is an array and a ":" modifier needs to be applied + * + * @return array{0:string, 1:bool} + */ + private function replaceList(array $value, VarSpecifier $varSpec, bool $useQuery): array + { + if ([] === $value) { + return ['', false]; + } + + if (':' === $varSpec->modifier()) { + throw TemplateCanNotBeExpanded::dueToUnableToProcessValueListWithPrefix($varSpec->name()); + } + + $pairs = []; + $isAssoc = $this->isAssoc($value); + foreach ($value as $key => $var) { + if ($isAssoc) { + $key = rawurlencode((string) $key); + } + + $var = rawurlencode($var); + if ('+' === $this->operator || '#' === $this->operator) { + $var = $this->decodeReserved($var); + } + + if ('*' === $varSpec->modifier()) { + if ($isAssoc) { + $var = $key.'='.$var; + } elseif ($key > 0 && $useQuery) { + $var = $varSpec->name().'='.$var; + } + } + + $pairs[$key] = $var; + } + + if ('*' === $varSpec->modifier()) { + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $useQuery = false; + } + + return [implode($this->joiner, $pairs), $useQuery]; + } + + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($pairs as $offset => &$data) { + $data = $offset.','.$data; + } + + unset($data); + } + + return [implode(',', $pairs), $useQuery]; + } + + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a trade-off for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + */ + private function isAssoc(array $array): bool + { + return [] !== $array && 0 !== array_keys($array)[0]; + } + + /** + * Removes percent encoding on reserved characters (used with + and # modifiers). + */ + private function decodeReserved(string $str): string + { + static $delimiters = [ + ':', '/', '?', '#', '[', ']', '@', '!', '$', + '&', '\'', '(', ')', '*', '+', ',', ';', '=', + ]; + + static $delimitersEncoded = [ + '%3A', '%2F', '%3F', '%23', '%5B', '%5D', '%40', '%21', '%24', + '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', '%3B', '%3D', + ]; + + return str_replace($delimitersEncoded, $delimiters, $str); + } +} diff --git a/dist/vendor/league/uri/src/UriTemplate/Template.php b/dist/vendor/league/uri/src/UriTemplate/Template.php new file mode 100644 index 000000000..ecd130fe1 --- /dev/null +++ b/dist/vendor/league/uri/src/UriTemplate/Template.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\UriTemplate; + +use League\Uri\Exceptions\SyntaxError; +use League\Uri\Exceptions\TemplateCanNotBeExpanded; +use TypeError; +use function array_merge; +use function array_unique; +use function gettype; +use function is_object; +use function is_string; +use function method_exists; +use function preg_match_all; +use function preg_replace; +use function sprintf; +use function strpos; +use const PREG_SET_ORDER; + +final class Template +{ + /** + * Expression regular expression pattern. + */ + private const REGEXP_EXPRESSION_DETECTOR = '/\{[^\}]*\}/x'; + + private string $template; + /** @var array */ + private array $expressions = []; + /** @var array */ + private array $variableNames; + + private function __construct(string $template, Expression ...$expressions) + { + $this->template = $template; + $variableNames = []; + foreach ($expressions as $expression) { + $this->expressions[$expression->toString()] = $expression; + $variableNames[] = $expression->variableNames(); + } + $this->variableNames = array_unique(array_merge([], ...$variableNames)); + } + + /** + * {@inheritDoc} + */ + public static function __set_state(array $properties): self + { + return new self($properties['template'], ...array_values($properties['expressions'])); + } + + /** + * @param object|string $template a string or an object with the __toString method + * + * @throws TypeError if the template is not a string or an object with the __toString method + * @throws SyntaxError if the template contains invalid expressions + * @throws SyntaxError if the template contains invalid variable specification + */ + public static function createFromString($template): self + { + if (is_object($template) && method_exists($template, '__toString')) { + $template = (string) $template; + } + + if (!is_string($template)) { + throw new TypeError(sprintf('The template must be a string or a stringable object %s given.', gettype($template))); + } + + /** @var string $remainder */ + $remainder = preg_replace(self::REGEXP_EXPRESSION_DETECTOR, '', $template); + if (false !== strpos($remainder, '{') || false !== strpos($remainder, '}')) { + throw new SyntaxError('The template "'.$template.'" contains invalid expressions.'); + } + + $names = []; + preg_match_all(self::REGEXP_EXPRESSION_DETECTOR, $template, $findings, PREG_SET_ORDER); + $arguments = []; + foreach ($findings as $finding) { + if (!isset($names[$finding[0]])) { + $arguments[] = Expression::createFromString($finding[0]); + $names[$finding[0]] = 1; + } + } + + return new self($template, ...$arguments); + } + + public function toString(): string + { + return $this->template; + } + + /** + * @return array + */ + public function variableNames(): array + { + return $this->variableNames; + } + + /** + * @throws TemplateCanNotBeExpanded if the variables is an array and a ":" modifier needs to be applied + * @throws TemplateCanNotBeExpanded if the variables contains nested array values + */ + public function expand(VariableBag $variables): string + { + $uriString = $this->template; + /** @var Expression $expression */ + foreach ($this->expressions as $pattern => $expression) { + $uriString = str_replace($pattern, $expression->expand($variables), $uriString); + } + + return $uriString; + } +} diff --git a/dist/vendor/league/uri/src/UriTemplate/VarSpecifier.php b/dist/vendor/league/uri/src/UriTemplate/VarSpecifier.php new file mode 100644 index 000000000..ac49efb53 --- /dev/null +++ b/dist/vendor/league/uri/src/UriTemplate/VarSpecifier.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\UriTemplate; + +use League\Uri\Exceptions\SyntaxError; +use function preg_match; + +final class VarSpecifier +{ + /** + * Variables specification regular expression pattern. + * + * @link https://tools.ietf.org/html/rfc6570#section-2.3 + */ + private const REGEXP_VARSPEC = '/^ + (?(?:[A-z0-9_\.]|%[0-9a-fA-F]{2})+) + (?\:(?\d+)|\*)? + $/x'; + + private string $name; + private string $modifier; + private int $position; + + private function __construct(string $name, string $modifier, int $position) + { + $this->name = $name; + $this->modifier = $modifier; + $this->position = $position; + } + + /** + * {@inheritDoc} + */ + public static function __set_state(array $properties): self + { + return new self($properties['name'], $properties['modifier'], $properties['position']); + } + + public static function createFromString(string $specification): self + { + if (1 !== preg_match(self::REGEXP_VARSPEC, $specification, $parsed)) { + throw new SyntaxError('The variable specification "'.$specification.'" is invalid.'); + } + + $parsed += ['modifier' => '', 'position' => '']; + if ('' !== $parsed['position']) { + $parsed['position'] = (int) $parsed['position']; + $parsed['modifier'] = ':'; + } + + if ('' === $parsed['position']) { + $parsed['position'] = 0; + } + + if (10000 <= $parsed['position']) { + throw new SyntaxError('The variable specification "'.$specification.'" is invalid the position modifier must be lower than 10000.'); + } + + return new self($parsed['name'], $parsed['modifier'], $parsed['position']); + } + + public function toString(): string + { + if (0 < $this->position) { + return $this->name.$this->modifier.$this->position; + } + + return $this->name.$this->modifier; + } + + public function name(): string + { + return $this->name; + } + + public function modifier(): string + { + return $this->modifier; + } + + public function position(): int + { + return $this->position; + } +} diff --git a/dist/vendor/league/uri/src/UriTemplate/VariableBag.php b/dist/vendor/league/uri/src/UriTemplate/VariableBag.php new file mode 100644 index 000000000..cf60de91e --- /dev/null +++ b/dist/vendor/league/uri/src/UriTemplate/VariableBag.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\UriTemplate; + +use League\Uri\Exceptions\TemplateCanNotBeExpanded; +use TypeError; +use function gettype; +use function is_array; +use function is_bool; +use function is_object; +use function is_scalar; +use function method_exists; +use function sprintf; + +final class VariableBag +{ + /** + * @var array> + */ + private array $variables = []; + + /** + * @param iterable> $variables + */ + public function __construct(iterable $variables = []) + { + foreach ($variables as $name => $value) { + $this->assign($name, $value); + } + } + + public static function __set_state(array $properties): self + { + return new self($properties['variables']); + } + + /** + * @return array> + */ + public function all(): array + { + return $this->variables; + } + + /** + * Fetches the variable value if none found returns null. + * + * @return null|string|array + */ + public function fetch(string $name) + { + return $this->variables[$name] ?? null; + } + + /** + * @param string|bool|int|float|array $value + */ + public function assign(string $name, $value): void + { + $this->variables[$name] = $this->normalizeValue($value, $name, true); + } + + /** + * @param mixed $value the value to be expanded + * + * @throws TemplateCanNotBeExpanded if the value contains nested list + * + * @return string|array + */ + private function normalizeValue($value, string $name, bool $isNestedListAllowed) + { + if (is_bool($value)) { + return true === $value ? '1' : '0'; + } + + if (null === $value || is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) { + return (string) $value; + } + + if (!is_array($value)) { + throw new TypeError(sprintf('The variable '.$name.' must be NULL, a scalar or a stringable object `%s` given', gettype($value))); + } + + if (!$isNestedListAllowed) { + throw TemplateCanNotBeExpanded::dueToNestedListOfValue($name); + } + + foreach ($value as &$var) { + $var = self::normalizeValue($var, $name, false); + } + unset($var); + + return $value; + } + + /** + * Replaces elements from passed variables into the current instance. + */ + public function replace(VariableBag $variables): self + { + return new self($this->variables + $variables->variables); + } +} diff --git a/dist/vendor/mailgun/mailgun-php/.php-cs-fixer.php b/dist/vendor/mailgun/mailgun-php/.php-cs-fixer.php new file mode 100644 index 000000000..133e4fedf --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/.php-cs-fixer.php @@ -0,0 +1,35 @@ +in('src') + ->in('tests'); + + +return (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + '@Symfony' => true, + 'strict_param' => true, + 'array_syntax' => ['syntax' => 'short'], + 'declare_strict_types' => true, + 'no_empty_phpdoc' => false, + 'no_superfluous_phpdoc_tags' => false, + 'phpdoc_separation' => false, + 'no_unneeded_final_method' => false, # prevent phpstan divergence + 'header_comment' => [ + 'comment_type' => 'comment', + 'header' => $header, + 'location' => 'after_declare_strict', + 'separate' => 'both', + ], + ]) + ->setFinder($finder) +; diff --git a/dist/vendor/mailgun/mailgun-php/CHANGELOG.md b/dist/vendor/mailgun/mailgun-php/CHANGELOG.md index 3d71e495a..ee4a9858a 100644 --- a/dist/vendor/mailgun/mailgun-php/CHANGELOG.md +++ b/dist/vendor/mailgun/mailgun-php/CHANGELOG.md @@ -1,6 +1,24 @@ # Change Log The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +## 3.5.4 + +### Added +- Added ability to make own API request to needed endpoint + +## 3.5.3 + +### Added + +- Ability to update web_scheme for domain +- `http` or `https` - set your open, click and unsubscribe URLs to use http or https. The default is http + +## 3.5.1 + +### Fixed + +- Error with empty array for param recipient-variables. Fix was suggested by @deviarte +- Use null coalescing operator in IndexResponse.php when. Fix proposed by @TWithers ## 3.5.0 diff --git a/dist/vendor/mailgun/mailgun-php/README.md b/dist/vendor/mailgun/mailgun-php/README.md index fb66b3101..67e422cd1 100644 --- a/dist/vendor/mailgun/mailgun-php/README.md +++ b/dist/vendor/mailgun/mailgun-php/README.md @@ -5,8 +5,6 @@ with the Mailgun API. Below are examples to get you started. For additional examples, please see our official documentation at http://documentation.mailgun.com [![Latest Version](https://img.shields.io/github/release/mailgun/mailgun-php.svg?style=flat-square)](https://github.com/mailgun/mailgun-php/releases) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/mailgun/mailgun-php.svg?style=flat-square)](https://scrutinizer-ci.com/g/mailgun/mailgun-php) -[![Quality Score](https://img.shields.io/scrutinizer/g/mailgun/mailgun-php.svg?style=flat-square)](https://scrutinizer-ci.com/g/mailgun/mailgun-php) [![Total Downloads](https://img.shields.io/packagist/dt/mailgun/mailgun-php.svg?style=flat-square)](https://packagist.org/packages/mailgun/mailgun-php) [![Join the chat at https://gitter.im/mailgun/mailgun-php](https://badges.gitter.im/mailgun/mailgun-php.svg)](https://gitter.im/mailgun/mailgun-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) @@ -24,13 +22,14 @@ curl -sS https://getcomposer.org/installer | php The Mailgun API Client is not hard coupled to Guzzle, Buzz or any other library that sends HTTP messages. Instead, it uses the [PSR-18](https://www.php-fig.org/psr/psr-18/) client abstraction. This will give you the flexibility to choose what -[PSR-7 implementation and HTTP client](https://packagist.org/providers/php-http/client-implementation) +[PSR-7 implementation](https://packagist.org/providers/psr/http-message-implementation) +and [HTTP client](https://packagist.org/providers/psr/http-client-implementation) you want to use. If you just want to get started quickly you should run the following command: ```bash -composer require mailgun/mailgun-php kriswallsmith/buzz nyholm/psr7 +composer require mailgun/mailgun-php symfony/http-client nyholm/psr7 ``` ## Usage @@ -63,6 +62,49 @@ $mg->messages()->send('example.com', [ Attention: `$domain` must match to the domain you have configured on [app.mailgun.com](https://app.mailgun.com/app/domains). +### Usage of new method for updating web scheme + +```php +# Include the Autoloader (see "Libraries" for install instructions) +require 'vendor/autoload.php'; +use Mailgun\Mailgun; + +# Instantiate the client. +$mgClient = Mailgun::create('KEY', 'FULL_DOMAIN_URL'); +$domain = "DOMAIN"; + +# Issue the call to the client. +$result = $mgClient->domains()->updateWebScheme($domain, 'https'); + +print_r($result); +``` + +### Custom http request to the API + +```php +httpClient()->httpPost($path, $params); + +$resultGet = $mgClient->httpClient()->httpGet($path, $params); + +$resultPut = $mgClient->httpClient()->httpPut($path, $params); + +$resultDelete = $mgClient->httpClient()->httpDelete($path, $params); + +``` + ### All usage examples You will find more detailed documentation at [/doc](doc/index.md) and on @@ -163,6 +205,7 @@ If you are using a framework you might consider these composer packages to make * [katanyoo/yii2-mailgun-mailer](https://github.com/katanyoo/yii2-mailgun-mailer) for Yii2 * [narendravaghela/cakephp-mailgun](https://github.com/narendravaghela/cakephp-mailgun) for CakePHP * [drupal/mailgun](https://www.drupal.org/project/mailgun) for Drupal +* [Laravel](https://laravel.com/docs/8.x/mail#mailgun-driver) Mail comes with Mailgun driver support ## Contribute diff --git a/dist/vendor/mailgun/mailgun-php/composer.json b/dist/vendor/mailgun/mailgun-php/composer.json index 525414837..83e6e1276 100644 --- a/dist/vendor/mailgun/mailgun-php/composer.json +++ b/dist/vendor/mailgun/mailgun-php/composer.json @@ -19,17 +19,12 @@ "require-dev": { "nyholm/nsa": "^1.2.1", "nyholm/psr7": "^1.3.1", - "php-http/guzzle7-adapter": "^0.1.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/http-client": "^5.3" }, "suggest": { - "guzzlehttp/psr7": "PSR-7 message implementation that also provides common utility methods", - "php-http/curl-client": "cURL client for PHP-HTTP" - }, - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } + "nyholm/psr7": "PSR-7 message implementation", + "symfony/http-client": "HTTP client" }, "autoload": { "psr-4": { @@ -40,5 +35,10 @@ "psr-4": { "Mailgun\\Tests\\": "tests/" } + }, + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } } } diff --git a/dist/vendor/justinrainbow/json-schema/phpunit.xml.dist b/dist/vendor/mailgun/mailgun-php/phpunit.xml.dist.bak similarity index 52% rename from dist/vendor/justinrainbow/json-schema/phpunit.xml.dist rename to dist/vendor/mailgun/mailgun-php/phpunit.xml.dist.bak index 0136d8edc..1000dd211 100644 --- a/dist/vendor/justinrainbow/json-schema/phpunit.xml.dist +++ b/dist/vendor/mailgun/mailgun-php/phpunit.xml.dist.bak @@ -1,26 +1,21 @@ - - + convertErrorsToExceptions="true" + convertNoticesToExceptions="true" + convertWarningsToExceptions="true"> + - + tests - - ./src/JsonSchema/ + + src diff --git a/dist/vendor/mailgun/mailgun-php/psalm.baseline.xml b/dist/vendor/mailgun/mailgun-php/psalm.baseline.xml index 31b4be393..cce84a7e9 100644 --- a/dist/vendor/mailgun/mailgun-php/psalm.baseline.xml +++ b/dist/vendor/mailgun/mailgun-php/psalm.baseline.xml @@ -1,15 +1,13 @@ - + $params - + boolean boolean nullOrString - stringNotEmpty - stringNotEmpty nullOrString @@ -81,8 +79,47 @@ + + @var string $first + @var string $full_name + @var string $id + @var string $last + getId + + + @var string + @var string + @var string + @var string $first + @var string $first + @var string $first + @var string $first + @var string $first + @var string $first + @var string $first + @var string $full_name + @var string $full_name + @var string $full_name + @var string $full_name + @var string $full_name + @var string $full_name + @var string $full_name + @var string $id If used with BatchMessage + @var string $id If used with BatchMessage + @var string $id If used with BatchMessage + @var string $id If used with BatchMessage + @var string $id If used with BatchMessage + @var string $last + @var string $last + @var string $last + @var string $last + @var string $last + @var string $last + @var string $last + + diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/Domain.php b/dist/vendor/mailgun/mailgun-php/src/Api/Domain.php index ba73fe5b9..34ee145a1 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Api/Domain.php +++ b/dist/vendor/mailgun/mailgun-php/src/Api/Domain.php @@ -11,6 +11,7 @@ namespace Mailgun\Api; +use Exception; use Mailgun\Assert; use Mailgun\Model\Domain\ConnectionResponse; use Mailgun\Model\Domain\CreateCredentialResponse; @@ -27,19 +28,24 @@ use Mailgun\Model\Domain\UpdateOpenTrackingResponse; use Mailgun\Model\Domain\UpdateUnsubscribeTrackingResponse; use Mailgun\Model\Domain\VerifyResponse; +use Mailgun\Model\Domain\WebSchemeResponse; +use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\ResponseInterface; /** - * @see https://documentation.mailgun.com/api-domains.html + * @see https://documentation.mailgun.com/api-domains.html * * @author Sean Johnson */ class Domain extends HttpApi { + private const DKIM_SIZES = ['1024', '2048']; + /** * Returns a list of domains on the account. * * @return IndexResponse + * @throws ClientExceptionInterface */ public function index(int $limit = 100, int $skip = 0) { @@ -61,6 +67,7 @@ public function index(int $limit = 100, int $skip = 0) * @param string $domain name of the domain * * @return ShowResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function show(string $domain) { @@ -84,10 +91,14 @@ public function show(string $domain) * @param bool $wildcard domain will accept email for subdomains * @param bool $forceDkimAuthority force DKIM authority * @param string[] $ips an array of ips to be assigned to the domain + * @param ?string $pool_id pool id to assign to the domain + * @param string $webScheme `http` or `https` - set your open, click and unsubscribe URLs to use http or https. The default is http + * @param string $dkimKeySize Set length of your domain’s generated DKIM key * * @return CreateResponse|array|ResponseInterface + * @throws Exception */ - public function create(string $domain, string $smtpPass = null, string $spamAction = null, bool $wildcard = null, bool $forceDkimAuthority = null, ?array $ips = null) + public function create(string $domain, string $smtpPass = null, string $spamAction = null, bool $wildcard = null, bool $forceDkimAuthority = null, ?array $ips = null, ?string $pool_id = null, string $webScheme = 'http', string $dkimKeySize = '1024') { Assert::stringNotEmpty($domain); @@ -125,6 +136,26 @@ public function create(string $domain, string $smtpPass = null, string $spamActi $params['ips'] = join(',', $ips); } + if (!empty($webScheme)) { + Assert::stringNotEmpty($webScheme); + Assert::oneOf($webScheme, ['https', 'http']); + $params['web_scheme'] = $webScheme; + } + + if (null !== $pool_id) { + Assert::stringNotEmpty($pool_id); + + $params['pool_id'] = $pool_id; + } + if (!empty($dkimKeySize)) { + Assert::oneOf( + $dkimKeySize, + self::DKIM_SIZES, + 'Length of your domain’s generated DKIM key must be 1024 or 2048' + ); + $params['dkim_key_size'] = $dkimKeySize; + } + $response = $this->httpPost('/v3/domains', $params); return $this->hydrateResponse($response, CreateResponse::class); @@ -137,6 +168,7 @@ public function create(string $domain, string $smtpPass = null, string $spamActi * @param string $domain name of the domain * * @return DeleteResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function delete(string $domain) { @@ -155,6 +187,7 @@ public function delete(string $domain) * @param int $skip Number of credentials to omit from the list * * @return CredentialResponse + * @throws ClientExceptionInterface */ public function credentials(string $domain, int $limit = 100, int $skip = 0) { @@ -177,6 +210,7 @@ public function credentials(string $domain, int $limit = 100, int $skip = 0) * @param string $password SMTP Password. Length min 5, max 32. * * @return CreateCredentialResponse|array|ResponseInterface + * @throws Exception */ public function createCredential(string $domain, string $login, string $password) { @@ -203,6 +237,7 @@ public function createCredential(string $domain, string $login, string $password * @param string $pass New SMTP Password. Length min 5, max 32. * * @return UpdateCredentialResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function updateCredential(string $domain, string $login, string $pass) { @@ -227,6 +262,7 @@ public function updateCredential(string $domain, string $login, string $pass) * @param string $login SMTP Username * * @return DeleteCredentialResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function deleteCredential(string $domain, string $login) { @@ -250,6 +286,7 @@ public function deleteCredential(string $domain, string $login) * @param string $domain name of the domain * * @return ConnectionResponse|ResponseInterface + * @throws ClientExceptionInterface */ public function connection(string $domain) { @@ -269,6 +306,7 @@ public function connection(string $domain) * @param bool|null $noVerify disables TLS certificate and hostname verification * * @return UpdateConnectionResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function updateConnection(string $domain, ?bool $requireTLS, ?bool $noVerify) { @@ -288,12 +326,40 @@ public function updateConnection(string $domain, ?bool $requireTLS, ?bool $noVer return $this->hydrateResponse($response, UpdateConnectionResponse::class); } + /** + * Update webScheme for existing domain + * See below for spam filtering parameter information. + * {@link https://documentation.mailgun.com/user_manual.html#um-spam-filter}. + * + * @see https://documentation.mailgun.com/en/latest/api-domains.html#domains + * + * @param string $domain name of the domain + * @param string $webScheme `http` or `https` - set your open, click and unsubscribe URLs to use http or https. The default is http + * @return WebSchemeResponse|array|ResponseInterface + * @throws Exception + * @throws ClientExceptionInterface + */ + public function updateWebScheme(string $domain, string $webScheme = 'http') + { + $params = []; + Assert::stringNotEmpty($domain); + Assert::stringNotEmpty($webScheme); + Assert::oneOf($webScheme, ['https', 'http']); + + $params['web_scheme'] = $webScheme; + + $response = $this->httpPut(sprintf('/v3/domains/%s', $domain), $params); + + return $this->hydrateResponse($response, WebSchemeResponse::class); + } + /** * Returns a single domain. * * @param string $domain name of the domain * * @return VerifyResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function verify(string $domain) { @@ -310,6 +376,7 @@ public function verify(string $domain) * @param string $domain name of the domain * * @return TrackingResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function tracking(string $domain) { @@ -328,7 +395,7 @@ public function tracking(string $domain) * * @return UpdateClickTrackingResponse|array|ResponseInterface * - * @throws \Exception + * @throws Exception */ public function updateClickTracking(string $domain, string $active) { @@ -352,6 +419,7 @@ public function updateClickTracking(string $domain, string $active) * @param string $active The status for this tracking (one of: yes, no) * * @return UpdateOpenTrackingResponse|array|ResponseInterface + * @throws ClientExceptionInterface */ public function updateOpenTracking(string $domain, string $active) { @@ -378,7 +446,7 @@ public function updateOpenTracking(string $domain, string $active) * * @return UpdateUnsubscribeTrackingResponse|array|ResponseInterface * - * @throws \Exception + * @throws Exception */ public function updateUnsubscribeTracking(string $domain, string $active, string $htmlFooter, string $textFooter) { diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/EmailValidation.php b/dist/vendor/mailgun/mailgun-php/src/Api/EmailValidation.php index 42c71c7b6..0b22cfdfd 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Api/EmailValidation.php +++ b/dist/vendor/mailgun/mailgun-php/src/Api/EmailValidation.php @@ -35,12 +35,11 @@ class EmailValidation extends HttpApi * @param bool $mailboxVerification If set to true, a mailbox verification check will be performed * against the address. The default is False. * - * @throws InvalidArgumentException Thrown when local validation returns an error - * @throws HttpClientException Thrown when there's an error on Client side - * @throws HttpServerException Thrown when there's an error on Server side - * @throws \Exception Thrown when we don't catch a Client or Server side Exception - * * @return ValidateResponse|ResponseInterface + * @throws InvalidArgumentException Thrown when local validation returns an error + * @throws HttpClientException Thrown when there's an error on Client side + * @throws HttpServerException Thrown when there's an error on Server side + * @throws \Exception Thrown when we don't catch a Client or Server side Exception */ public function validate(string $address, bool $mailboxVerification = false) { @@ -73,12 +72,11 @@ public function validate(string $address, bool $mailboxVerification = false) * @param bool $syntaxOnly Perform only syntax checks or DNS and ESP specific validation as well. * The default is True. * - * @throws InvalidArgumentException Thrown when local validation returns an error - * @throws HttpClientException Thrown when there's an error on Client side - * @throws HttpServerException Thrown when there's an error on Server side - * @throws \Exception Thrown when we don't catch a Client or Server side Exception - * * @return ParseResponse|ResponseInterface + * @throws InvalidArgumentException Thrown when local validation returns an error + * @throws HttpClientException Thrown when there's an error on Client side + * @throws HttpServerException Thrown when there's an error on Server side + * @throws \Exception Thrown when we don't catch a Client or Server side Exception */ public function parse(string $addresses, bool $syntaxOnly = true) { diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/HttpApi.php b/dist/vendor/mailgun/mailgun-php/src/Api/HttpApi.php index bb566dfa2..c79ad927b 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Api/HttpApi.php +++ b/dist/vendor/mailgun/mailgun-php/src/Api/HttpApi.php @@ -19,6 +19,7 @@ use Mailgun\Hydrator\Hydrator; use Mailgun\Hydrator\NoopHydrator; use Psr\Http\Client as Psr18; +use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\ResponseInterface; @@ -48,7 +49,7 @@ public function __construct($httpClient, RequestBuilder $requestBuilder, Hydrato { if (!is_a($httpClient, ClientInterface::class) && !is_a($httpClient, PluginClient::class)) { - throw new \RuntimeException('httpClient must be an instance of + throw new \RuntimeException('httpClient must be an instance of Psr\Http\Client\ClientInterface or Http\Client\Common\PluginClient'); } $this->httpClient = $httpClient; @@ -59,6 +60,8 @@ public function __construct($httpClient, RequestBuilder $requestBuilder, Hydrato } /** + * @param class-string $class + * * @return mixed|ResponseInterface * * @throws \Exception @@ -111,9 +114,10 @@ protected function handleErrors(ResponseInterface $response) /** * Send a GET request with query parameters. * - * @param string $path Request path - * @param array $parameters GET parameters - * @param array $requestHeaders Request Headers + * @param string $path Request path + * @param array $parameters GET parameters + * @param array $requestHeaders Request Headers + * @throws ClientExceptionInterface */ protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface { @@ -147,9 +151,10 @@ protected function httpPost(string $path, array $parameters = [], array $request /** * Send a POST request with raw data. * - * @param string $path Request path - * @param array|string $body Request body - * @param array $requestHeaders Request headers + * @param string $path Request path + * @param array|string $body Request body + * @param array $requestHeaders Request headers + * @throws ClientExceptionInterface */ protected function httpPostRaw(string $path, $body, array $requestHeaders = []): ResponseInterface { @@ -167,9 +172,10 @@ protected function httpPostRaw(string $path, $body, array $requestHeaders = []): /** * Send a PUT request. * - * @param string $path Request path - * @param array $parameters PUT parameters - * @param array $requestHeaders Request headers + * @param string $path Request path + * @param array $parameters PUT parameters + * @param array $requestHeaders Request headers + * @throws ClientExceptionInterface */ protected function httpPut(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface { @@ -187,9 +193,10 @@ protected function httpPut(string $path, array $parameters = [], array $requestH /** * Send a DELETE request. * - * @param string $path Request path - * @param array $parameters DELETE parameters - * @param array $requestHeaders Request headers + * @param string $path Request path + * @param array $parameters DELETE parameters + * @param array $requestHeaders Request headers + * @throws ClientExceptionInterface */ protected function httpDelete(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface { diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/HttpClient.php b/dist/vendor/mailgun/mailgun-php/src/Api/HttpClient.php new file mode 100644 index 000000000..a489c7f25 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Api/HttpClient.php @@ -0,0 +1,101 @@ + + */ +class HttpClient extends HttpApi +{ + /** + * @return PluginClient|ClientInterface + */ + public function getHttpClient() + { + return $this->httpClient; + } + + /** + * @return RequestBuilder + */ + public function getRequestBuilder(): RequestBuilder + { + return $this->requestBuilder; + } + + /** + * @param string $path + * @param array $parameters + * @param array $requestHeaders + * @return ResponseInterface + * @throws ClientExceptionInterface + */ + public function httpDelete(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface + { + return parent::httpDelete($path, $parameters, $requestHeaders); + } + + /** + * @param string $path + * @param array $parameters + * @param array $requestHeaders + * @return ResponseInterface + * @throws ClientExceptionInterface + */ + public function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface + { + return parent::httpGet($path, $parameters, $requestHeaders); + } + + /** + * @param string $path + * @param array $parameters + * @param array $requestHeaders + * @return ResponseInterface + */ + public function httpPost(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface + { + return parent::httpPost($path, $parameters, $requestHeaders); + } + + /** + * @param string $path + * @param array $parameters + * @param array $requestHeaders + * @return ResponseInterface + * @throws ClientExceptionInterface + */ + public function httpPut(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface + { + return parent::httpPut($path, $parameters, $requestHeaders); + } + + /** + * @param string $path + * @param $body + * @param array $requestHeaders + * @return ResponseInterface + * @throws ClientExceptionInterface + */ + public function httpPostRaw(string $path, $body, array $requestHeaders = []): ResponseInterface + { + return parent::httpPostRaw($path, $body, $requestHeaders); + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/Mailboxes.php b/dist/vendor/mailgun/mailgun-php/src/Api/Mailboxes.php new file mode 100644 index 000000000..cea678445 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Api/Mailboxes.php @@ -0,0 +1,84 @@ +httpPost(sprintf('/v3/%s/mailboxes', $domain), $parameters); + + return $this->hydrateResponse($response, CreateResponse::class); + } + + /** + * @return ShowResponse + * + * @throws \Exception + */ + public function show(string $domain, array $parameters = []) + { + Assert::stringNotEmpty($domain); + + $response = $this->httpGet(sprintf('/v3/%s/mailboxes', $domain), $parameters); + + return $this->hydrateResponse($response, ShowResponse::class); + } + + /** + * @return UpdateResponse + * + * @throws \Exception + */ + public function update(string $domain, string $mailbox, array $parameters = []) + { + Assert::stringNotEmpty($domain); + Assert::stringNotEmpty($mailbox); + + $response = $this->httpPut(sprintf('/v3/%s/mailboxes/%s', $domain, $mailbox), $parameters); + + return $this->hydrateResponse($response, UpdateResponse::class); + } + + /** + * @return DeleteResponse + * + * @throws \Exception + */ + public function delete(string $domain, string $mailbox) + { + Assert::stringNotEmpty($domain); + Assert::stringNotEmpty($mailbox); + + $response = $this->httpDelete(sprintf('/v3/%s/mailboxes/%s', $domain, $mailbox)); + + return $this->hydrateResponse($response, DeleteResponse::class); + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/MailingList.php b/dist/vendor/mailgun/mailgun-php/src/Api/MailingList.php index e87f60770..c35c053d9 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Api/MailingList.php +++ b/dist/vendor/mailgun/mailgun-php/src/Api/MailingList.php @@ -57,16 +57,17 @@ public function pages(int $limit = 100) /** * Creates a new mailing list on the current domain. * - * @param string $address Address for the new mailing list - * @param string $name Name for the new mailing list (optional) - * @param string $description Description for the new mailing list (optional) - * @param string $accessLevel List access level, one of: readonly (default), members, everyone + * @param string $address Address for the new mailing list + * @param string|null $name Name for the new mailing list (optional) + * @param string|null $description Description for the new mailing list (optional) + * @param string $accessLevel List access level, one of: readonly (default), members, everyone + * @param string $replyPreference Set where replies should go: list (default) | sender (optional) * * @return CreateResponse * * @throws \Exception */ - public function create(string $address, string $name = null, string $description = null, string $accessLevel = 'readonly', string $replyPreference = 'list') + public function create(string $address, ?string $name = null, ?string $description = null, string $accessLevel = 'readonly', string $replyPreference = 'list') { Assert::stringNotEmpty($address); Assert::nullOrStringNotEmpty($name); @@ -76,11 +77,11 @@ public function create(string $address, string $name = null, string $description $params = [ 'address' => $address, - 'name' => $name, - 'description' => $description, 'access_level' => $accessLevel, 'reply_preference' => $replyPreference, ]; + $description ? $params['description'] = $description : false; + $name ? $params['name'] = $name : false; $response = $this->httpPost('/v3/lists', $params); diff --git a/dist/vendor/mailgun/mailgun-php/src/Api/Pagination.php b/dist/vendor/mailgun/mailgun-php/src/Api/Pagination.php index 2395517de..1ec3e0f5f 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Api/Pagination.php +++ b/dist/vendor/mailgun/mailgun-php/src/Api/Pagination.php @@ -22,6 +22,9 @@ trait Pagination { abstract protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface; + /** + * @param class-string $className + */ abstract protected function hydrateResponse(ResponseInterface $response, string $className); public function nextPage(PagingProvider $response): ?PagingProvider @@ -44,6 +47,9 @@ public function lastPage(PagingProvider $response): ?PagingProvider return $this->getPaginationUrl($response->getLastUrl(), get_class($response)); } + /** + * @param class-string $class + */ private function getPaginationUrl(string $url, string $class): ?PagingProvider { Assert::stringNotEmpty($class); diff --git a/dist/vendor/mailgun/mailgun-php/src/HttpClient/RequestBuilder.php b/dist/vendor/mailgun/mailgun-php/src/HttpClient/RequestBuilder.php index 827ad5fc6..7ca171543 100644 --- a/dist/vendor/mailgun/mailgun-php/src/HttpClient/RequestBuilder.php +++ b/dist/vendor/mailgun/mailgun-php/src/HttpClient/RequestBuilder.php @@ -60,8 +60,8 @@ public function create(string $method, string $uri, array $headers = [], $body = $builder = $this->getMultipartStreamBuilder(); foreach ($body as $item) { - $name = $item['name']; - $content = $item['content']; + $name = $this->getItemValue($item, 'name'); + $content = $this->getItemValue($item, 'content'); unset($item['name']); unset($item['content']); @@ -77,6 +77,9 @@ public function create(string $method, string $uri, array $headers = [], $body = return $this->createRequest($method, $uri, $headers, $multipartStream); } + /** + * @return RequestFactoryInterface + */ private function getRequestFactory(): RequestFactoryInterface { if (null === $this->requestFactory) { @@ -86,6 +89,10 @@ private function getRequestFactory(): RequestFactoryInterface return $this->requestFactory; } + /** + * @param RequestFactoryInterface $requestFactory + * @return $this + */ public function setRequestFactory(RequestFactoryInterface $requestFactory): self { $this->requestFactory = $requestFactory; @@ -93,6 +100,9 @@ public function setRequestFactory(RequestFactoryInterface $requestFactory): self return $this; } + /** + * @return StreamFactoryInterface + */ private function getStreamFactory(): StreamFactoryInterface { if (null === $this->streamFactory) { @@ -102,6 +112,10 @@ private function getStreamFactory(): StreamFactoryInterface return $this->streamFactory; } + /** + * @param StreamFactoryInterface $streamFactory + * @return $this + */ public function setStreamFactory(StreamFactoryInterface $streamFactory): self { $this->streamFactory = $streamFactory; @@ -109,6 +123,9 @@ public function setStreamFactory(StreamFactoryInterface $streamFactory): self return $this; } + /** + * @return MultipartStreamBuilder + */ private function getMultipartStreamBuilder(): MultipartStreamBuilder { if (null === $this->multipartStreamBuilder) { @@ -118,6 +135,10 @@ private function getMultipartStreamBuilder(): MultipartStreamBuilder return $this->multipartStreamBuilder; } + /** + * @param MultipartStreamBuilder $multipartStreamBuilder + * @return $this + */ public function setMultipartStreamBuilder(MultipartStreamBuilder $multipartStreamBuilder): self { $this->multipartStreamBuilder = $multipartStreamBuilder; @@ -125,7 +146,14 @@ public function setMultipartStreamBuilder(MultipartStreamBuilder $multipartStrea return $this; } - private function createRequest(string $method, string $uri, array $headers, StreamInterface $stream) + /** + * @param string $method + * @param string $uri + * @param array $headers + * @param StreamInterface $stream + * @return RequestInterface + */ + private function createRequest(string $method, string $uri, array $headers, StreamInterface $stream): RequestInterface { $request = $this->getRequestFactory()->createRequest($method, $uri); $request = $request->withBody($stream); @@ -135,4 +163,18 @@ private function createRequest(string $method, string $uri, array $headers, Stre return $request; } + + /** + * @param array $item + * @param string $key + * @return mixed|string + */ + private function getItemValue(array $item, string $key) + { + if (is_bool($item[$key])) { + return (string) $item[$key]; + } + + return $item[$key]; + } } diff --git a/dist/vendor/mailgun/mailgun-php/src/Hydrator/ArrayHydrator.php b/dist/vendor/mailgun/mailgun-php/src/Hydrator/ArrayHydrator.php index 5b453e4ff..806b7d9cd 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Hydrator/ArrayHydrator.php +++ b/dist/vendor/mailgun/mailgun-php/src/Hydrator/ArrayHydrator.php @@ -22,6 +22,8 @@ final class ArrayHydrator implements Hydrator { /** + * @param class-string $class + * * @return array */ public function hydrate(ResponseInterface $response, string $class) diff --git a/dist/vendor/mailgun/mailgun-php/src/Hydrator/Hydrator.php b/dist/vendor/mailgun/mailgun-php/src/Hydrator/Hydrator.php index 6819dc369..05b71568b 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Hydrator/Hydrator.php +++ b/dist/vendor/mailgun/mailgun-php/src/Hydrator/Hydrator.php @@ -20,6 +20,8 @@ interface Hydrator { /** + * @param class-string $class + * * @throws HydrationException */ public function hydrate(ResponseInterface $response, string $class); diff --git a/dist/vendor/mailgun/mailgun-php/src/Hydrator/ModelHydrator.php b/dist/vendor/mailgun/mailgun-php/src/Hydrator/ModelHydrator.php index 9d6e1ea29..d58cca056 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Hydrator/ModelHydrator.php +++ b/dist/vendor/mailgun/mailgun-php/src/Hydrator/ModelHydrator.php @@ -23,6 +23,8 @@ final class ModelHydrator implements Hydrator { /** + * @param class-string $class + * * @return ResponseInterface */ public function hydrate(ResponseInterface $response, string $class) @@ -41,7 +43,7 @@ public function hydrate(ResponseInterface $response, string $class) } if (is_subclass_of($class, ApiResponse::class)) { - $object = call_user_func($class.'::create', $data); + $object = call_user_func([$class, 'create'], $data); } else { $object = new $class($data); } diff --git a/dist/vendor/mailgun/mailgun-php/src/Hydrator/NoopHydrator.php b/dist/vendor/mailgun/mailgun-php/src/Hydrator/NoopHydrator.php index 72ad2edd9..869ef6fa1 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Hydrator/NoopHydrator.php +++ b/dist/vendor/mailgun/mailgun-php/src/Hydrator/NoopHydrator.php @@ -21,6 +21,8 @@ final class NoopHydrator implements Hydrator { /** + * @param class-string $class + * * @throws \LogicException */ public function hydrate(ResponseInterface $response, string $class) diff --git a/dist/vendor/mailgun/mailgun-php/src/Mailgun.php b/dist/vendor/mailgun/mailgun-php/src/Mailgun.php index de4c58bfd..b87a69eda 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Mailgun.php +++ b/dist/vendor/mailgun/mailgun-php/src/Mailgun.php @@ -12,6 +12,21 @@ namespace Mailgun; use Http\Client\Common\PluginClient; +use Mailgun\Api\Attachment; +use Mailgun\Api\Domain; +use Mailgun\Api\EmailValidation; +use Mailgun\Api\EmailValidationV4; +use Mailgun\Api\Event; +use Mailgun\Api\HttpClient; +use Mailgun\Api\Ip; +use Mailgun\Api\Mailboxes; +use Mailgun\Api\MailingList; +use Mailgun\Api\Message; +use Mailgun\Api\Route; +use Mailgun\Api\Stats; +use Mailgun\Api\Suppression; +use Mailgun\Api\Tag; +use Mailgun\Api\Webhook; use Mailgun\HttpClient\HttpClientConfigurator; use Mailgun\HttpClient\Plugin\History; use Mailgun\HttpClient\RequestBuilder; @@ -52,6 +67,11 @@ class Mailgun */ private $responseHistory; + /** + * @param HttpClientConfigurator $configurator + * @param Hydrator|null $hydrator + * @param RequestBuilder|null $requestBuilder + */ public function __construct( HttpClientConfigurator $configurator, Hydrator $hydrator = null, @@ -65,6 +85,11 @@ public function __construct( $this->responseHistory = $configurator->getResponseHistory(); } + /** + * @param string $apiKey + * @param string $endpoint + * @return static + */ public static function create(string $apiKey, string $endpoint = 'https://api.mailgun.net'): self { $httpClientConfigurator = (new HttpClientConfigurator()) @@ -74,73 +99,131 @@ public static function create(string $apiKey, string $endpoint = 'https://api.ma return new self($httpClientConfigurator); } + /** + * @return ResponseInterface|null + */ public function getLastResponse(): ?ResponseInterface { return $this->responseHistory->getLastResponse(); } + /** + * @return Attachment + */ public function attachment(): Api\Attachment { return new Api\Attachment($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Domain + */ public function domains(): Api\Domain { return new Api\Domain($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return EmailValidation + */ public function emailValidation(): Api\EmailValidation { return new Api\EmailValidation($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return EmailValidationV4 + */ public function emailValidationV4(): Api\EmailValidationV4 { return new Api\EmailValidationV4($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Event + */ public function events(): Api\Event { return new Api\Event($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Ip + */ public function ips(): Api\Ip { return new Api\Ip($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return MailingList + */ public function mailingList(): Api\MailingList { return new Api\MailingList($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Message + */ public function messages(): Api\Message { return new Api\Message($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Route + */ public function routes(): Api\Route { return new Api\Route($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Suppression + */ public function suppressions(): Api\Suppression { return new Api\Suppression($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Stats + */ public function stats(): Api\Stats { return new Api\Stats($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Tag + */ public function tags(): Api\Tag { return new Api\Tag($this->httpClient, $this->requestBuilder, $this->hydrator); } + /** + * @return Webhook + */ public function webhooks(): Api\Webhook { return new Api\Webhook($this->httpClient, $this->requestBuilder, $this->hydrator, $this->apiKey); } + + /** + * @return Mailboxes + */ + public function mailboxes(): Api\Mailboxes + { + return new Api\Mailboxes($this->httpClient, $this->requestBuilder, $this->hydrator); + } + + /** + * @return HttpClient + */ + public function httpClient(): Api\HttpClient + { + return new Api\HttpClient($this->httpClient, $this->requestBuilder, $this->hydrator); + } } diff --git a/dist/vendor/mailgun/mailgun-php/src/Message/BatchMessage.php b/dist/vendor/mailgun/mailgun-php/src/Message/BatchMessage.php index a039243be..21b4d7c5d 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Message/BatchMessage.php +++ b/dist/vendor/mailgun/mailgun-php/src/Message/BatchMessage.php @@ -114,11 +114,11 @@ public function finalize(): void throw MissingRequiredParameter::create('subject'); } - if (empty($message['text']) && empty($message['html'])) { - throw MissingRequiredParameter::create('text" or "html'); + if (empty($message['text']) && empty($message['html']) && empty($message['template'])) { + throw MissingRequiredParameter::create('text", "html" or "template'); } - $message['recipient-variables'] = json_encode($this->batchRecipientAttributes); + $message['recipient-variables'] = json_encode($this->batchRecipientAttributes, JSON_FORCE_OBJECT); $response = $this->api->send($this->domain, $message); $this->batchRecipientAttributes = []; diff --git a/dist/vendor/mailgun/mailgun-php/src/Message/MessageBuilder.php b/dist/vendor/mailgun/mailgun-php/src/Message/MessageBuilder.php index 518220202..a18133568 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Message/MessageBuilder.php +++ b/dist/vendor/mailgun/mailgun-php/src/Message/MessageBuilder.php @@ -24,11 +24,11 @@ */ class MessageBuilder { - const RECIPIENT_COUNT_LIMIT = 1000; + public const RECIPIENT_COUNT_LIMIT = 1000; - const CAMPAIGN_ID_LIMIT = 3; + public const CAMPAIGN_ID_LIMIT = 3; - const TAG_LIMIT = 3; + public const TAG_LIMIT = 3; /** * @var array @@ -231,6 +231,16 @@ public function setSubject(string $subject): self return $this; } + /** + * @param string $template Name of the Mailgun template + */ + public function setTemplate(string $template): self + { + $this->message['template'] = $template; + + return $this; + } + public function addCustomHeader(string $headerName, $headerData): self { if (!preg_match('/^h:/i', $headerName)) { @@ -278,6 +288,20 @@ public function addAttachment(string $attachmentPath, string $attachmentName = n return $this; } + public function addStringAttachment(string $attachmentContent, string $attachmentName = null): self + { + if (!isset($this->message['attachment'])) { + $this->message['attachment'] = []; + } + + $this->message['attachment'][] = [ + 'fileContent' => $attachmentContent, + 'filename' => $attachmentName, + ]; + + return $this; + } + public function addInlineImage(string $inlineImagePath, string $inlineImageName = null): self { if (!isset($this->message['inline'])) { diff --git a/dist/vendor/mailgun/mailgun-php/src/Message/README.md b/dist/vendor/mailgun/mailgun-php/src/Message/README.md index b15ccbb90..c72254435 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Message/README.md +++ b/dist/vendor/mailgun/mailgun-php/src/Message/README.md @@ -1,24 +1,31 @@ Mailgun - Messages ================== -This is the Mailgun PHP *Message* utilities. +This is the Mailgun PHP *Message* utilities. -The below assumes you've already installed the Mailgun PHP SDK in to your +The below assumes you've already installed the Mailgun PHP SDK in to your project. If not, go back to the master README for instructions. -There are two utilities included, `MessageBuilder` and `BatchMessage`. +There are two utilities included, `MessageBuilder` and `BatchMessage`. -* `MessageBuilder`: Allows you to build a message object by calling methods for -each MIME attribute. -* `BatchMessage`: Extends `MessageBuilder` and allows you to iterate through -recipients from a list. Messages will fire after the 1,000th recipient has been -added. +* `MessageBuilder`: Allows you to build a message object by calling methods for +each MIME attribute. +* `BatchMessage`: Extends `MessageBuilder` and allows you to iterate through +recipients from a list. Messages will fire after the 1,000th recipient has been +added. Usage - Message Builder ----------------------- -Here's how to use Message Builder to build your Message. +Here's how to use Message Builder to build your Message. ```php +require 'vendor/autoload.php'; +use Mailgun\Mailgun; +use Mailgun\Message\MessageBuilder; + +// First, instantiate the SDK with your API credentials +$mg = Mailgun::create('key-example'); + # Next, instantiate a Message Builder object from the SDK. $builder = new MessageBuilder(); @@ -28,10 +35,12 @@ $builder->setFromAddress("me@example.com", array("first"=>"PHP", "last" => "SDK" $builder->addToRecipient("john.doe@example.com", array("first" => "John", "last" => "Doe")); # Define a cc recipient. $builder->addCcRecipient("sally.doe@example.com", array("full_name" => "Sally Doe")); -# Define the subject. +# Define the subject. $builder->setSubject("A message from the PHP SDK using Message Builder!"); -# Define the body of the message. +# Define the body of the message (One is required). $builder->setTextBody("This is the text body of the message!"); +$builder->setHtmlBody("

This is the HTML body of the message

"); +$builder->setTemplate("template_name"); # Other Optional Parameters. $builder->addCampaignId("My-Awesome-Campaign"); @@ -41,35 +50,38 @@ $builder->setDeliveryTime("tomorrow 8:00AM", "PST"); $builder->setClickTracking(true); # Finally, send the message. -$mg = Mailgun::create('key-example'); -$domain = ; $mg->messages()->send("example.com", $builder->getMessage()); ``` Usage - Batch Message --------------------- -Here's how to use Batch Message to easily handle batch sending jobs. +Here's how to use Batch Message to easily handle batch sending jobs. ```php -# First, instantiate the SDK with your API credentials and define your domain. -$mg = new Mailgun("key-example"); +require 'vendor/autoload.php'; +use Mailgun\Mailgun; + +// First, instantiate the SDK with your API credentials +$mg = Mailgun::create('key-example'); # Next, instantiate a Message Builder object from the SDK, pass in your sending domain. $batchMessage = $mg->messages()->getBatchMessage("example.com"); # Define the from address. $batchMessage->setFromAddress("me@example.com", array("first"=>"PHP", "last" => "SDK")); -# Define the subject. +# Define the subject. $batchMessage->setSubject("A Batch Message from the PHP SDK!"); -# Define the body of the message. +# Define the body of the message (One is required). $batchMessage->setTextBody("This is the text body of the message!"); +$batchMessage->setHtmlBody("

This is the HTML body of the message

"); +$batchMessage->setTemplate("template_name"); # Next, let's add a few recipients to the batch job. $batchMessage->addToRecipient("john.doe@example.com", array("first" => "John", "last" => "Doe")); $batchMessage->addToRecipient("sally.doe@example.com", array("first" => "Sally", "last" => "Doe")); $batchMessage->addToRecipient("mike.jones@example.com", array("first" => "Mike", "last" => "Jones")); ... -// After 1,000 recipients, Batch Message will automatically post your message to the messages endpoint. +// After 1,000 recipients, Batch Message will automatically post your message to the messages endpoint. // Call finalize() to send any remaining recipients still in the buffer. $batchMessage->finalize(); @@ -80,5 +92,5 @@ $messageIds = $batchMessage->getMessageIds(); More Documentation ------------------ -See the official [Mailgun Docs](https://documentation.mailgun.com/en/latest/api-sending.html) +See the official [Mailgun Docs](https://documentation.mailgun.com/en/latest/api-sending.html) for more information. diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Domain/Domain.php b/dist/vendor/mailgun/mailgun-php/src/Model/Domain/Domain.php index d57b868d6..61ce96db3 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Model/Domain/Domain.php +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Domain/Domain.php @@ -25,6 +25,7 @@ final class Domain private $wildcard; private $spamAction; private $state; + private $webScheme; public static function create(array $data): self { @@ -36,6 +37,7 @@ public static function create(array $data): self $model->spamAction = $data['spam_action'] ?? null; $model->state = $data['state'] ?? null; $model->createdAt = isset($data['created_at']) ? new \DateTimeImmutable($data['created_at']) : null; + $model->webScheme = $data['web_scheme'] ?? null; return $model; } diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Domain/WebSchemeResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Domain/WebSchemeResponse.php new file mode 100644 index 000000000..81932a717 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Domain/WebSchemeResponse.php @@ -0,0 +1,16 @@ +createdAt = isset($data['created_at']) ? (DateTimeImmutable::createFromFormat('U', (string) ($data['created_at'])) ?: null) : null; + $model->createdAt = isset($data['created_at']) ? (DateTimeImmutable::createFromFormat('U', (string) $data['created_at']) ?: null) : null; $model->downloadUrl = $data['download_url'] ? JobDownloadUrl::create($data['download_url']) : null; $model->id = $data['id'] ?? null; $model->quantity = $data['quantity'] ?? null; diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/EmailValidationV4/Preview.php b/dist/vendor/mailgun/mailgun-php/src/Model/EmailValidationV4/Preview.php index a3f6b464c..2ec812c3e 100755 --- a/dist/vendor/mailgun/mailgun-php/src/Model/EmailValidationV4/Preview.php +++ b/dist/vendor/mailgun/mailgun-php/src/Model/EmailValidationV4/Preview.php @@ -58,7 +58,7 @@ public static function create(array $data): self $model->valid = $data['valid'] ?? null; $model->status = $data['status'] ?? null; $model->quantity = $data['quantity'] ?? null; - $model->createdAt = isset($data['created_at']) ? (DateTimeImmutable::createFromFormat('U', (string) ($data['created_at'])) ?: null) : null; + $model->createdAt = isset($data['created_at']) ? (DateTimeImmutable::createFromFormat('U', (string) $data['created_at']) ?: null) : null; $model->summary = $data['summary'] ? Summary::create($data['summary']) : null; return $model; diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php index 104f7e936..0a2f6b6cd 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Ip/IndexResponse.php @@ -42,7 +42,7 @@ public static function create(array $data) $model = new self(); $model->items = $data['items']; $model->totalCount = $data['total_count'] ?? 0; - $model->assignableToPools = $data['assignable_to_pools']; + $model->assignableToPools = $data['assignable_to_pools'] ?? []; return $model; } diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/CreateResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/CreateResponse.php new file mode 100644 index 000000000..c894ceb55 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/CreateResponse.php @@ -0,0 +1,36 @@ +message = $data['message'] ?? null; + + return $model; + } + + private function __construct() + { + } + + public function getMessage(): ?string + { + return $this->message; + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/DeleteResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/DeleteResponse.php new file mode 100644 index 000000000..288b54ac2 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/DeleteResponse.php @@ -0,0 +1,43 @@ +message = $data['message'] ?? null; + $model->spec = $data['spec'] ?? null; + + return $model; + } + + private function __construct() + { + } + + public function getMessage(): ?string + { + return $this->message; + } + + public function getSpec(): ?string + { + return $this->spec; + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/ShowResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/ShowResponse.php new file mode 100644 index 000000000..23c286d52 --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/ShowResponse.php @@ -0,0 +1,43 @@ +totalCount = $data['total_count'] ?? null; + $model->items = $data['items'] ?? null; + + return $model; + } + + private function __construct() + { + } + + public function getTotalCount(): ?string + { + return $this->totalCount; + } + + public function getItems(): ?string + { + return $this->items; + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/UpdateResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/UpdateResponse.php new file mode 100644 index 000000000..3ce888b9d --- /dev/null +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Mailboxes/UpdateResponse.php @@ -0,0 +1,36 @@ +message = $data['message'] ?? null; + + return $model; + } + + private function __construct() + { + } + + public function getMessage(): ?string + { + return $this->message; + } +} diff --git a/dist/vendor/mailgun/mailgun-php/src/Model/Message/ShowResponse.php b/dist/vendor/mailgun/mailgun-php/src/Model/Message/ShowResponse.php index 0315a24e0..5e6e8c88e 100644 --- a/dist/vendor/mailgun/mailgun-php/src/Model/Message/ShowResponse.php +++ b/dist/vendor/mailgun/mailgun-php/src/Model/Message/ShowResponse.php @@ -51,7 +51,7 @@ public static function create(array $data): self $model->bodyHtml = $data['body-html'] ?? null; $model->strippedHtml = $data['stripped-html'] ?? null; $model->messageUrl = $data['message-url'] ?? null; - $model->messageHeaders = $data['message-headers'] ?? null; + $model->messageHeaders = $data['message-headers'] ?? []; $model->recipient = $data['recipient'] ?? null; $model->bodyMime = $data['body-mime'] ?? null; $model->attachments = $data['attachments'] ?? []; diff --git a/dist/vendor/nesbot/carbon/composer.json b/dist/vendor/nesbot/carbon/composer.json index 74b7e5c8e..cdbbc1219 100644 --- a/dist/vendor/nesbot/carbon/composer.json +++ b/dist/vendor/nesbot/carbon/composer.json @@ -1,14 +1,13 @@ { "name": "nesbot/carbon", - "type": "library", "description": "An API extension for DateTime that supports 281 different languages.", + "license": "MIT", + "type": "library", "keywords": [ "date", "time", "DateTime" ], - "homepage": "https://carbon.nesbot.com", - "license": "MIT", "authors": [ { "name": "Brian Nesbitt", @@ -20,6 +19,26 @@ "homepage": "https://github.com/kylekatarnls" } ], + "homepage": "https://carbon.nesbot.com", + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon", + "docs": "https://carbon.nesbot.com/docs" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + } + ], "require": { "php": "^7.1.8 || ^8.0", "ext-json": "*", @@ -32,13 +51,37 @@ "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + }, + "files": [ + "tests/Laravel/ServiceProvider.php" + ] + }, + "bin": [ + "bin/carbon" + ], "config": { + "allow-plugins": { + "phpstan/extension-installer": true, + "composer/package-versions-deprecated": true + }, "process-timeout": 0, "sort-packages": true }, @@ -58,24 +101,6 @@ ] } }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - }, - "files": [ - "tests/Laravel/ServiceProvider.php" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "bin": [ - "bin/carbon" - ], "scripts": { "phpcs": "php-cs-fixer fix -v --diff --dry-run", "phpdoc": "php phpdoc.php", @@ -91,10 +116,5 @@ "@phpunit", "@style-check" ] - }, - "support": { - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon", - "docs": "https://carbon.nesbot.com/docs" } } diff --git a/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php new file mode 100644 index 000000000..1504b0abc --- /dev/null +++ b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?ReflectionMethod + { + return $this->reflectionFunction instanceof ReflectionMethod + ? $this->reflectionFunction + : null; + } + } +} diff --git a/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php new file mode 100644 index 000000000..450dceb80 --- /dev/null +++ b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection; +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?Reflection\Adapter\ReflectionMethod + { + if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) { + return $this->reflectionFunction; + } + + return $this->reflectionFunction instanceof ReflectionMethod + ? new Reflection\Adapter\ReflectionMethod( + Reflection\ReflectionMethod::createFromName( + $this->reflectionFunction->getDeclaringClass()->getName(), + $this->reflectionFunction->getName() + ) + ) + : null; + } + } +} diff --git a/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php new file mode 100644 index 000000000..47002c47f --- /dev/null +++ b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + */ + public function getFileName(): ?string + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + */ + public function getStartLine(): ?int + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + */ + public function getEndLine(): ?int + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php new file mode 100644 index 000000000..c47d70ed5 --- /dev/null +++ b/dist/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + * + * @return string|false + */ + public function getFileName() + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getStartLine() + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getEndLine() + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/dist/vendor/nesbot/carbon/readme.md b/dist/vendor/nesbot/carbon/readme.md index 5d827219e..100e60f20 100644 --- a/dist/vendor/nesbot/carbon/readme.md +++ b/dist/vendor/nesbot/carbon/readme.md @@ -126,6 +126,10 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
+ + + + [[Become a sponsor](https://opencollective.com/Carbon#sponsor)] diff --git a/dist/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php b/dist/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php index 555e07a04..949e159be 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php @@ -68,12 +68,13 @@ abstract class AbstractTranslator extends Translation\Translator public static function get($locale = null) { $locale = $locale ?: 'en'; + $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; - if (!isset(static::$singletons[$locale])) { - static::$singletons[$locale] = new static($locale); + if (!isset(static::$singletons[$key])) { + static::$singletons[$key] = new static($locale); } - return static::$singletons[$locale]; + return static::$singletons[$key]; } public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) @@ -219,8 +220,8 @@ protected function translate(?string $id, array $parameters = [], ?string $domai $catalogue = $this->getCatalogue($locale); $format = $this instanceof TranslatorStrongTypeInterface - ? $this->getFromCatalogue($catalogue, (string) $id, $domain) // @codeCoverageIgnore - : $this->getCatalogue($locale)->get((string) $id, $domain); + ? $this->getFromCatalogue($catalogue, (string) $id, $domain) + : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore if ($format instanceof Closure) { // @codeCoverageIgnoreStart @@ -249,11 +250,7 @@ protected function translate(?string $id, array $parameters = [], ?string $domai */ protected function loadMessagesFromFile($locale) { - if (isset($this->messages[$locale])) { - return true; - } - - return $this->resetMessages($locale); + return isset($this->messages[$locale]) || $this->resetMessages($locale); } /** @@ -310,7 +307,7 @@ public function getMessages($locale = null) */ public function setLocale($locale) { - $locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) { + $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { // _2-letters or YUE is a region, _3+-letters is a variant $upper = strtoupper($matches[1]); @@ -337,7 +334,7 @@ public function setLocale($locale) $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); $getScore = function ($language) use ($completeLocaleChunks) { - return static::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); + return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); }; usort($locales, function ($first, $second) use ($getScore) { @@ -358,13 +355,13 @@ public function setLocale($locale) parent::setLocale($macroLocale); } - if ($this->loadMessagesFromFile($locale) || $this->initializing) { - parent::setLocale($locale); - - return true; + if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { + return false; } - return false; + parent::setLocale($locale); + + return true; } /** diff --git a/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php index 15e2061c7..c3db85043 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php @@ -586,6 +586,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable public const YEARS_PER_DECADE = 10; public const MONTHS_PER_YEAR = 12; public const MONTHS_PER_QUARTER = 3; + public const QUARTERS_PER_YEAR = 4; public const WEEKS_PER_YEAR = 52; public const WEEKS_PER_MONTH = 4; public const DAYS_PER_YEAR = 365; diff --git a/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index a2b99a776..54c64d411 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -344,14 +344,14 @@ public static function setCascadeFactors(array $cascadeFactors) /** * Create a new CarbonInterval instance. * - * @param int|null $years - * @param int|null $months - * @param int|null $weeks - * @param int|null $days - * @param int|null $hours - * @param int|null $minutes - * @param int|null $seconds - * @param int|null $microseconds + * @param Closure|DateInterval|string|int|null $years + * @param int|null $months + * @param int|null $weeks + * @param int|null $days + * @param int|null $hours + * @param int|null $minutes + * @param int|null $seconds + * @param int|null $microseconds * * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. */ @@ -365,14 +365,14 @@ public function __construct($years = 1, $months = null, $weeks = null, $days = n if ($years instanceof DateInterval) { parent::__construct(static::getDateIntervalSpec($years)); $this->f = $years->f; - static::copyNegativeUnits($years, $this); + self::copyNegativeUnits($years, $this); return; } $spec = $years; - if (!\is_string($spec) || (float) $years || preg_match('/^[0-9.]/', $years)) { + if (!\is_string($spec) || (float) $years || preg_match('/^[\d.]/', $years)) { $spec = static::PERIOD_PREFIX; $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; @@ -410,13 +410,13 @@ public function __construct($years = 1, $months = null, $weeks = null, $days = n * @param string $source * @param string $target * - * @return int|null + * @return int|float|null */ public static function getFactor($source, $target) { $source = self::standardizeUnit($source); $target = self::standardizeUnit($target); - $factors = static::getFlipCascadeFactors(); + $factors = self::getFlipCascadeFactors(); if (isset($factors[$source])) { [$to, $factor] = $factors[$source]; @@ -438,9 +438,9 @@ public static function getFactor($source, $target) * @param string $source * @param string $target * - * @return int|null + * @return int|float|null */ - public function getFactorWithDefault($source, $target) + public static function getFactorWithDefault($source, $target) { $factor = self::getFactor($source, $target); @@ -465,7 +465,7 @@ public function getFactorWithDefault($source, $target) /** * Returns current config for days per week. * - * @return int + * @return int|float */ public static function getDaysPerWeek() { @@ -475,7 +475,7 @@ public static function getDaysPerWeek() /** * Returns current config for hours per day. * - * @return int + * @return int|float */ public static function getHoursPerDay() { @@ -485,7 +485,7 @@ public static function getHoursPerDay() /** * Returns current config for minutes per hour. * - * @return int + * @return int|float */ public static function getMinutesPerHour() { @@ -495,7 +495,7 @@ public static function getMinutesPerHour() /** * Returns current config for seconds per minute. * - * @return int + * @return int|float */ public static function getSecondsPerMinute() { @@ -505,7 +505,7 @@ public static function getSecondsPerMinute() /** * Returns current config for microseconds per second. * - * @return int + * @return int|float */ public static function getMillisecondsPerSecond() { @@ -515,7 +515,7 @@ public static function getMillisecondsPerSecond() /** * Returns current config for microseconds per second. * - * @return int + * @return int|float */ public static function getMicrosecondsPerMillisecond() { @@ -898,10 +898,10 @@ private static function castIntervalToClass(DateInterval $interval, string $clas } if ($interval instanceof self && is_a($className, self::class, true)) { - static::copyStep($interval, $instance); + self::copyStep($interval, $instance); } - static::copyNegativeUnits($interval, $instance); + self::copyNegativeUnits($interval, $instance); return $instance; } @@ -984,7 +984,7 @@ protected static function makeFromString(string $interval) { $interval = preg_replace('/\s+/', ' ', trim($interval)); - if (preg_match('/^P[T0-9]/', $interval)) { + if (preg_match('/^P[T\d]/', $interval)) { return new static($interval); } @@ -1081,11 +1081,11 @@ public function get($name) return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; case 'weeks': - return (int) ($this->d / static::getDaysPerWeek()); + return (int) ($this->d / (int) static::getDaysPerWeek()); case 'daysExcludeWeeks': case 'dayzExcludeWeeks': - return $this->d % static::getDaysPerWeek(); + return $this->d % (int) static::getDaysPerWeek(); case 'locale': return $this->getTranslatorLocale(); @@ -1136,7 +1136,7 @@ public function set($name, $value = null) break; case 'week': - $this->d = $value * static::getDaysPerWeek(); + $this->d = $value * (int) static::getDaysPerWeek(); break; @@ -1147,7 +1147,7 @@ public function set($name, $value = null) case 'daysexcludeweek': case 'dayzexcludeweek': - $this->d = $this->weeks * static::getDaysPerWeek() + $value; + $this->d = $this->weeks * (int) static::getDaysPerWeek() + $value; break; @@ -1435,11 +1435,9 @@ protected function getForHumansParameters($syntax = null, $short = false, $parts ]; } - if ($altNumbers) { - if ($altNumbers !== true) { - $language = new Language($this->locale); - $altNumbers = \in_array($language->getCode(), (array) $altNumbers); - } + if ($altNumbers && $altNumbers !== true) { + $language = new Language($this->locale); + $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); } if (\is_array($join)) { @@ -1620,18 +1618,23 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options $unit = $short ? 's' : 'second'; $isFuture = $this->invert === 1; $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + $declensionMode = null; /** @var \Symfony\Component\Translation\Translator $translator */ $translator = $this->getLocalTranslator(); - $handleDeclensions = function ($unit, $count) use ($interpolations, $transId, $translator, $altNumbers, $absolute) { + $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { if (!$absolute) { - // Some languages have special pluralization for past and future tense. - $key = $unit.'_'.$transId; - $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); - if ($result !== $key) { - return $result; + if ($this->needsDeclension($declensionMode, $index, $parts)) { + // Some languages have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $key) { + return $result; + } } } @@ -1654,8 +1657,14 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options \count($intervalValues->getNonZeroValues()) > $parts && ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 ) { + $index = min($count, $previousCount - 1) - 2; + + if ($index < 0) { + break; + } + $intervalValues = $this->copy()->roundUnit( - $keys[min($count, $previousCount - 1) - 2], + $keys[$index], 1, $method ); @@ -1690,17 +1699,17 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options } } - $transChoice = function ($short, $unitData) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { + $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { $count = $unitData['value']; if ($short) { - $result = $handleDeclensions($unitData['unitShort'], $count); + $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); if ($result !== null) { return $result; } } elseif ($aUnit) { - $result = $handleDeclensions('a_'.$unitData['unit'], $count); + $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); if ($result !== null) { return $result; @@ -1708,7 +1717,7 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options } if (!$absolute) { - return $handleDeclensions($unitData['unit'], $count); + return $handleDeclensions($unitData['unit'], $count, $index, $parts); } return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); @@ -1720,7 +1729,7 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options if ($diffIntervalData['value'] > 0) { $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; $count = $diffIntervalData['value']; - $interval[] = $transChoice($short, $diffIntervalData); + $interval[] = [$short, $diffIntervalData]; } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { break; } @@ -1731,13 +1740,19 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options } // break the loop after we have reached the minimum unit - if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']])) { + if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; break; } } + $actualParts = \count($interval); + + foreach ($interval as $index => &$item) { + $item = $transChoice($item[0], $item[1], $index, $actualParts); + } + if (\count($interval) === 0) { if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { $key = 'diff_now'; @@ -1808,15 +1823,15 @@ public function __toString() { $format = $this->localToStringFormat; - if ($format) { - if ($format instanceof Closure) { - return $format($this); - } + if (!$format) { + return $this->forHumans(); + } - return $this->format($format); + if ($format instanceof Closure) { + return $format($this); } - return $this->forHumans(); + return $this->format($format); } /** @@ -2135,7 +2150,7 @@ public function divide($divider) * * @return string */ - public static function getDateIntervalSpec(DateInterval $interval) + public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false) { $date = array_filter([ static::PERIOD_YEARS => abs($interval->y), @@ -2143,10 +2158,15 @@ public static function getDateIntervalSpec(DateInterval $interval) static::PERIOD_DAYS => abs($interval->d), ]); + $seconds = abs($interval->s); + if ($microseconds && $interval->f > 0) { + $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); + } + $time = array_filter([ static::PERIOD_HOURS => abs($interval->h), static::PERIOD_MINUTES => abs($interval->i), - static::PERIOD_SECONDS => abs($interval->s), + static::PERIOD_SECONDS => $seconds, ]); $specString = static::PERIOD_PREFIX; @@ -2170,9 +2190,9 @@ public static function getDateIntervalSpec(DateInterval $interval) * * @return string */ - public function spec() + public function spec(bool $microseconds = false) { - return static::getDateIntervalSpec($this); + return static::getDateIntervalSpec($this, $microseconds); } /** @@ -2223,11 +2243,13 @@ private function doCascade(bool $deep) $originalData = $this->toArray(); $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); - $originalData['daysExcludeWeeks'] = $originalData['days']; + $originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek()); + $originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek()); unset($originalData['days']); $newData = $originalData; + $previous = []; - foreach (static::getFlipCascadeFactors() as $source => [$target, $factor]) { + foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { foreach (['source', 'target'] as $key) { if ($$key === 'dayz') { $$key = 'daysExcludeWeeks'; @@ -2235,9 +2257,29 @@ private function doCascade(bool $deep) } $value = $newData[$source]; - $modulo = ($factor + ($value % $factor)) % $factor; + $modulo = fmod($factor + fmod($value, $factor), $factor); $newData[$source] = $modulo; $newData[$target] += ($value - $modulo) / $factor; + + $decimalPart = fmod($newData[$source], 1); + + if ($decimalPart !== 0.0) { + $unit = $source; + + foreach ($previous as [$subUnit, $subFactor]) { + $newData[$unit] -= $decimalPart; + $newData[$subUnit] += $decimalPart * $subFactor; + $decimalPart = fmod($newData[$subUnit], 1); + + if ($decimalPart === 0.0) { + break; + } + + $unit = $subUnit; + } + } + + array_unshift($previous, [$source, $factor]); } $positive = null; @@ -2317,14 +2359,14 @@ public function total($unit) $result = 0; $cumulativeFactor = 0; $unitFound = false; - $factors = static::getFlipCascadeFactors(); - $daysPerWeek = static::getDaysPerWeek(); + $factors = self::getFlipCascadeFactors(); + $daysPerWeek = (int) static::getDaysPerWeek(); $values = [ 'years' => $this->years, 'months' => $this->months, 'weeks' => (int) ($this->d / $daysPerWeek), - 'dayz' => $this->d % $daysPerWeek, + 'dayz' => fmod($this->d, $daysPerWeek), 'hours' => $this->hours, 'minutes' => $this->minutes, 'seconds' => $this->seconds, @@ -2385,10 +2427,11 @@ public function total($unit) } if ($unit === 'weeks') { - return $result / $daysPerWeek; + $result /= $daysPerWeek; } - return $result; + // Cast as int numbers with no decimal part + return fmod($result, 1) === 0.0 ? (int) $result : $result; } /** @@ -2746,4 +2789,14 @@ public function ceil($precision = 1) { return $this->round($precision, 'ceil'); } + + private function needsDeclension(string $mode, int $index, int $parts): bool + { + switch ($mode) { + case 'last': + return $index === $parts - 1; + default: + return true; + } + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/dist/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php index 197f3709b..e2be2cdae 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -11,6 +11,7 @@ namespace Carbon; +use Carbon\Exceptions\EndLessPeriodException; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidIntervalException; use Carbon\Exceptions\InvalidPeriodDateException; @@ -28,6 +29,7 @@ use DateInterval; use DatePeriod; use DateTime; +use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; @@ -163,6 +165,8 @@ * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CarbonPeriod implements Iterator, Countable, JsonSerializable { @@ -173,17 +177,23 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable use Options; /** - * Built-in filters. + * Built-in filter for limit by recurrences. * - * @var string + * @var callable */ public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; + + /** + * Built-in filter for limit to an end. + * + * @var callable + */ public const END_DATE_FILTER = [self::class, 'filterEndDate']; /** * Special value which can be returned by filters to end iteration. Also a filter. * - * @var string + * @var callable */ public const END_ITERATION = [self::class, 'endIteration']; @@ -369,7 +379,7 @@ public static function instance($period) ); } - $class = \get_called_class(); + $class = static::class; $type = \gettype($period); throw new NotAPeriodException( @@ -476,8 +486,8 @@ protected static function parseIso8601($iso) $end = null; foreach (explode('/', $iso) as $key => $part) { - if ($key === 0 && preg_match('/^R([0-9]*)$/', $part, $match)) { - $parsed = \strlen($match[1]) ? (int) $match[1] : null; + if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { + $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { $interval = $part; } elseif ($start === null && $parsed = Carbon::make($part)) { @@ -504,7 +514,7 @@ protected static function parseIso8601($iso) */ protected static function addMissingParts($source, $target) { - $pattern = '/'.preg_replace('/[0-9]+/', '[0-9]+', preg_quote($target, '/')).'$/'; + $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; $result = preg_replace($pattern, $target, $source, 1, $count); @@ -647,10 +657,10 @@ public function __construct(...$arguments) $this->setTimezone($argument); } elseif ($this->dateInterval === null && ( - \is_string($argument) && preg_match( - '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T0-9].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', + (\is_string($argument) && preg_match( + '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', $argument - ) || + )) || $argument instanceof DateInterval || $argument instanceof Closure ) && @@ -1227,7 +1237,7 @@ public function resetFilters() */ public function setRecurrences($recurrences) { - if (!is_numeric($recurrences) && $recurrences !== null || $recurrences < 0) { + if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { throw new InvalidPeriodParameterException('Invalid number of recurrences.'); } @@ -1258,7 +1268,7 @@ public function setRecurrences($recurrences) */ public function setStartDate($date, $inclusive = null) { - if (!$date = ([$this->dateClass, 'make'])($date)) { + if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { throw new InvalidPeriodDateException('Invalid start date.'); } @@ -1283,7 +1293,7 @@ public function setStartDate($date, $inclusive = null) */ public function setEndDate($date, $inclusive = null) { - if ($date !== null && !$date = ([$this->dateClass, 'make'])($date)) { + if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { throw new InvalidPeriodDateException('Invalid end date.'); } @@ -1453,7 +1463,7 @@ public function toString() $parts = []; - $format = !$this->startDate->isStartOfDay() || $this->endDate && !$this->endDate->isStartOfDay() + $format = !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) ? 'Y-m-d H:i:s' : 'Y-m-d'; @@ -1498,9 +1508,9 @@ public function cast(string $className) if (!method_exists($className, 'instance')) { if (is_a($className, DatePeriod::class, true)) { return new $className( - $this->getStartDate(), + $this->rawDate($this->getStartDate()), $this->getDateInterval(), - $this->getEndDate() ? $this->getIncludedEndDate() : $this->getRecurrences(), + $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 ); } @@ -1526,6 +1536,39 @@ public function toDatePeriod() return $this->cast(DatePeriod::class); } + /** + * Return `true` if the period has no custom filter and is guaranteed to be endless. + * + * Note that we can't check if a period is endless as soon as it has custom filters + * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in + * a way we can't predict without actually iterating the period. + */ + public function isUnfilteredAndEndLess(): bool + { + foreach ($this->filters as $filter) { + switch ($filter) { + case [static::RECURRENCES_FILTER, null]: + if ($this->recurrences !== null && is_finite($this->recurrences)) { + return false; + } + + break; + + case [static::END_DATE_FILTER, null]: + if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { + return false; + } + + break; + + default: + return false; + } + } + + return true; + } + /** * Convert the date period into an array without changing current iteration state. * @@ -1533,6 +1576,10 @@ public function toDatePeriod() */ public function toArray() { + if ($this->isUnfilteredAndEndLess()) { + throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); + } + $state = [ $this->key, $this->current ? $this->current->avoidMutation() : null, @@ -1564,6 +1611,16 @@ public function count() */ public function first() { + if ($this->isUnfilteredAndEndLess()) { + foreach ($this as $date) { + $this->rewind(); + + return $date; + } + + return null; + } + return ($this->toArray() ?: [])[0] ?? null; } @@ -2173,7 +2230,10 @@ public function ceilUnit($unit, $precision = 1) */ public function round($precision = null, $function = 'round') { - return $this->roundWith($precision ?? (string) $this->getDateInterval(), $function); + return $this->roundWith( + $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), + $function + ); } /** @@ -2544,9 +2604,9 @@ private function makeDateTime($value): ?DateTimeInterface if (\is_string($value)) { $value = trim($value); - if (!preg_match('/^P[0-9T]/', $value) && - !preg_match('/^R[0-9]/', $value) && - preg_match('/[a-z0-9]/i', $value) + if (!preg_match('/^P[\dT]/', $value) && + !preg_match('/^R\d/', $value) && + preg_match('/[a-z\d]/i', $value) ) { return Carbon::parse($value, $this->tzName); } @@ -2554,4 +2614,30 @@ private function makeDateTime($value): ?DateTimeInterface return null; } + + private function isInfiniteDate($date): bool + { + return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); + } + + private function rawDate($date): ?DateTimeInterface + { + if ($date === false || $date === null) { + return null; + } + + if ($date instanceof CarbonInterface) { + return $date->isMutable() + ? $date->toDateTime() + : $date->toDateTimeImmutable(); + } + + if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { + return $date; + } + + $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; + + return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php b/dist/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php index b4d16ba97..c81899f1e 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php @@ -30,7 +30,7 @@ protected static function parseNumericTimezone($timezone) throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); } - return ($timezone >= 0 ? '+' : '').$timezone.':00'; + return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; } protected static function getDateTimeZoneNameFromMixed($timezone) @@ -101,15 +101,15 @@ public static function instance($object = null, $objectDump = null) $tz = static::getDateTimeZoneFromName($object); } - if ($tz === false) { - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); - } + if ($tz !== false) { + return new static($tz->getName()); + } - return false; + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); } - return new static($tz->getName()); + return false; } /** @@ -231,15 +231,15 @@ public function toRegionTimeZone(DateTimeInterface $date = null) { $tz = $this->toRegionName($date); - if ($tz === false) { - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); - } + if ($tz !== false) { + return new static($tz); + } - return false; + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); } - return new static($tz); + return false; } /** @@ -252,6 +252,18 @@ public function __toString() return $this->getName(); } + /** + * Return the type number: + * + * Type 1; A UTC offset, such as -0300 + * Type 2; A timezone abbreviation, such as GMT + * Type 3: A timezone identifier, such as Europe/London + */ + public function getType(): int + { + return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; + } + /** * Create a CarbonTimeZone from mixed input. * diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php b/dist/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php index 8f2fdee81..ecfe17e79 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php @@ -36,9 +36,16 @@ protected function getCarbonClassName(): string */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { - $precision = ($fieldDeclaration['precision'] ?: 10) === 10 - ? DateTimeDefaultPrecision::get() - : $fieldDeclaration['precision']; + $precision = $fieldDeclaration['precision'] ?: 10; + + if ($fieldDeclaration['secondPrecision'] ?? false) { + $precision = 0; + } + + if ($precision === 10) { + $precision = DateTimeDefaultPrecision::get(); + } + $type = parent::getSQLDeclaration($fieldDeclaration, $platform); if (!$precision) { diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php index b3a087190..3ca8837d1 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class BadComparisonUnitException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Bad comparison unit: '$unit'", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php index d5cd5564c..2e222e54e 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The method. + * + * @var string + */ + protected $method; + /** * Constructor. * * @param string $method * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($method, $code = 0, Exception $previous = null) + public function __construct($method, $code = 0, Throwable $previous = null) { + $this->method = $method; + parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php index 1d7ec542a..4ceaa2ef0 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The setter. + * + * @var string + */ + protected $setter; + /** * Constructor. * - * @param string $method + * @param string $setter * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); + } + + /** + * Get the setter. + * + * @return string */ - public function __construct($method, $code = 0, Exception $previous = null) + public function getSetter(): string { - parent::__construct(sprintf("Unknown fluent setter '%s'", $method), $code, $previous); + return $this->setter; } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php index 73c2dd86f..108206d3e 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php @@ -13,4 +13,5 @@ interface BadMethodCallException extends Exception { + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php new file mode 100644 index 000000000..e10492693 --- /dev/null +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; + +final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException +{ + // +} diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php index 3bbbd77d5..8ad747e75 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php @@ -13,4 +13,5 @@ interface Exception { + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php index a48d4f936..db334c6c9 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php @@ -11,20 +11,38 @@ namespace Carbon\Exceptions; -use Exception; use RuntimeException as BaseRuntimeException; +use Throwable; class ImmutableException extends BaseRuntimeException implements RuntimeException { + /** + * The value. + * + * @var string + */ + protected $value; + /** * Constructor. * * @param string $value the immutable type/value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($value, $code = 0, Exception $previous = null) + public function __construct($value, $code = 0, Throwable $previous = null) { + $this->value = $value; parent::__construct("$value is immutable.", $code, $previous); } + + /** + * Get the value. + * + * @return string + */ + public function getValue(): string + { + return $this->value; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php index 9739f4d18..5b013cd50 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php @@ -13,4 +13,5 @@ interface InvalidArgumentException extends Exception { + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php index d2f370199..a421401f6 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php index 99bb91c05..c9ecb6b06 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException { @@ -36,9 +36,9 @@ class InvalidDateException extends BaseInvalidArgumentException implements Inval * @param string $field * @param mixed $value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($field, $value, $code = 0, Exception $previous = null) + public function __construct($field, $value, $code = 0, Throwable $previous = null) { $this->field = $field; $this->value = $value; diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php index 3341b49d0..92d55fe35 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php index 5f9f142ee..69cf4128a 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php index a37e3f5ec..9bd84a96d 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php index ede47712b..cf2c90240 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php index 892e16e81..f72595583 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php index 3fbe3fc47..2c8ec9ba0 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php index 2b4c48e32..7a87632c4 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php @@ -12,24 +12,39 @@ namespace Carbon\Exceptions; use Carbon\CarbonInterface; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The className. + * + * @var string + */ + protected $className; + /** * Constructor. * * @param string $className * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous + */ + public function __construct($className, $code = 0, Throwable $previous = null) + { + $this->className = $className; + + parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); + } + + /** + * Get the className. + * + * @return string */ - public function __construct($className, $code = 0, Exception $previous = null) + public function getClassName(): string { - parent::__construct(sprintf( - 'Given class does not implement %s: %s', - CarbonInterface::class, - $className - ), $code, $previous); + return $this->className; } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php index 41bb62902..4edd7a484 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php index adbc36cd5..f2c546843 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException { @@ -21,9 +21,9 @@ class NotLocaleAwareException extends BaseInvalidArgumentException implements In * * @param mixed $object * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($object, $code = 0, Exception $previous = null) + public function __construct($object, $code = 0, Throwable $previous = null) { $dump = \is_object($object) ? \get_class($object) : \gettype($object); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php index 54822d954..2c586d0b7 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; // This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 // use OutOfRangeException as BaseOutOfRangeException; @@ -55,9 +55,9 @@ class OutOfRangeException extends BaseInvalidArgumentException implements Invali * @param mixed $max * @param mixed $value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $min, $max, $value, $code = 0, Exception $previous = null) + public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) { $this->unit = $unit; $this->min = $min; diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php index 0314c5d88..5416fd149 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php @@ -11,23 +11,78 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The expected. + * + * @var string + */ + protected $expected; + + /** + * The actual. + * + * @var string + */ + protected $actual; + + /** + * The help message. + * + * @var string + */ + protected $help; + /** * Constructor. * * @param string $expected * @param string $actual * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($expected, $actual, $help = '', $code = 0, Exception $previous = null) + public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) { + $this->expected = $expected; + $this->actual = $actual; + $this->help = $help; + $actual = $actual === '' ? 'data is missing' : "get '$actual'"; parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); } + + /** + * Get the expected. + * + * @return string + */ + public function getExpected(): string + { + return $this->expected; + } + + /** + * Get the actual. + * + * @return string + */ + public function getActual(): string + { + return $this->actual; + } + + /** + * Get the help message. + * + * @return string + */ + public function getHelp(): string + { + return $this->help; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php index 24bf5a68b..ad196f79d 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php @@ -13,4 +13,5 @@ interface RuntimeException extends Exception { + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php index 8bd8653e1..ee99953b4 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php index 39ee12c5b..0e7230563 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class UnitNotConfiguredException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php index 6c8c01b6c..5c504975a 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php @@ -11,20 +11,39 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The getter. + * + * @var string + */ + protected $getter; + /** * Constructor. * - * @param string $name getter name + * @param string $getter getter name * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous + */ + public function __construct($getter, $code = 0, Throwable $previous = null) + { + $this->getter = $getter; + + parent::__construct("Unknown getter '$getter'", $code, $previous); + } + + /** + * Get the getter. + * + * @return string */ - public function __construct($name, $code = 0, Exception $previous = null) + public function getGetter(): string { - parent::__construct("Unknown getter '$name'", $code, $previous); + return $this->getter; } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php index 901db986a..75273a706 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The method. + * + * @var string + */ + protected $method; + /** * Constructor. * * @param string $method * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($method, $code = 0, Exception $previous = null) + public function __construct($method, $code = 0, Throwable $previous = null) { + $this->method = $method; + parent::__construct("Method $method does not exist.", $code, $previous); } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php index c9e9c9ff2..a795f5d72 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php @@ -11,20 +11,39 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException { + /** + * The setter. + * + * @var string + */ + protected $setter; + /** * Constructor. * - * @param string $name setter name + * @param string $setter setter name * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct("Unknown setter '$setter'", $code, $previous); + } + + /** + * Get the setter. + * + * @return string */ - public function __construct($name, $code = 0, Exception $previous = null) + public function getSetter(): string { - parent::__construct("Unknown setter '$name'", $code, $previous); + return $this->setter; } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php index d965c82ae..ecd7f7a59 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class UnknownUnitException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Unknown unit '$unit'.", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php index 6f8b39f5f..1654ab11b 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use RuntimeException as BaseRuntimeException; class UnreachableException extends BaseRuntimeException implements RuntimeException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php new file mode 100644 index 000000000..acf4dc280 --- /dev/null +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Authors: + * - Swara Mohammed + */ +$months = [ + 'ڕێبەندان', + 'ڕەشەمە', + 'نەورۆز', + 'گوڵان', + 'جۆزەردان', + 'پوشپەڕ', + 'گەلاوێژ', + 'خەرمانان', + 'ڕەزبەر', + 'گەڵاڕێزان', + 'سەرماوەرز', + 'بەفرانبار', +]; + +return [ + 'year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), + 'a_year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), + 'month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), + 'a_month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), + 'week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), + 'a_week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), + 'day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), + 'a_day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), + 'hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), + 'a_hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), + 'minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), + 'a_minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), + 'second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), + 'a_second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), + 'ago' => 'پێش :time', + 'from_now' => ':time لە ئێستاوە', + 'after' => 'دوای :time', + 'before' => 'پێش :time', + 'diff_now' => 'ئێستا', + 'diff_today' => 'ئەمڕۆ', + 'diff_today_regexp' => 'ڕۆژ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_yesterday' => 'دوێنێ', + 'diff_yesterday_regexp' => 'دوێنێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_tomorrow' => 'سبەینێ', + 'diff_tomorrow_regexp' => 'سبەینێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', + 'diff_before_yesterday' => 'پێش دوێنێ', + 'diff_after_tomorrow' => 'دوای سبەینێ', + 'period_recurrences' => implode('|', ['{0}جار', '{1}جار', '{2}:count دووجار', ']2,11[:count جار', ']10,Inf[:count جار']), + 'period_interval' => 'هەموو :interval', + 'period_start_date' => 'لە :date', + 'period_end_date' => 'بۆ :date', + 'months' => $months, + 'months_short' => $months, + 'weekdays' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'weekdays_short' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'weekdays_min' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], + 'list' => ['، ', ' و '], + 'first_day_of_week' => 6, + 'day_of_first_week_of_year' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'D/M/YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], + 'calendar' => [ + 'sameDay' => '[ئەمڕۆ لە کاتژمێر] LT', + 'nextDay' => '[سبەینێ لە کاتژمێر] LT', + 'nextWeek' => 'dddd [لە کاتژمێر] LT', + 'lastDay' => '[دوێنێ لە کاتژمێر] LT', + 'lastWeek' => 'dddd [لە کاتژمێر] LT', + 'sameElse' => 'L', + ], + 'meridiem' => ['پ.ن', 'د.ن'], + 'weekend' => [5, 6], +]; diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php index 8cff9a019..c01e3ccc8 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php @@ -101,7 +101,8 @@ 'after' => $za, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, - 'months' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], + 'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'], + 'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], 'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'], 'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], 'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'], diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php index ab7c45a4f..119274f01 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php @@ -60,7 +60,7 @@ 'ordinal' => function ($number) { return $number.( $number > 20 - ? (\in_array($number, [40, 50, 60, 80, 100]) ? 'fed' : 'ain') + ? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain') : ([ '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/da.php index 4e6640a67..322f91d5b 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/da.php @@ -18,6 +18,7 @@ * - Jens Herlevsen * - Ulrik McArdle (mcardle) * - Frederik Sauer (FrittenKeeZ) + * - Janus Bahs Jacquet (kokoshneta) */ return [ 'year' => ':count år|:count år', @@ -41,7 +42,7 @@ 'second' => ':count sekund|:count sekunder', 'a_second' => 'få sekunder|:count sekunder', 's' => ':count s.', - 'ago' => ':time siden', + 'ago' => 'for :time siden', 'from_now' => 'om :time', 'after' => ':time efter', 'before' => ':time før', @@ -70,9 +71,9 @@ ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], - 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], + 'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'], 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/en.php index a8633fef0..f81f617e3 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/en.php @@ -72,7 +72,7 @@ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'th' : ( + ((int) ($number % 100 / 10) === 1) ? 'th' : ( ($lastDigit === 1) ? 'st' : ( ($lastDigit === 2) ? 'nd' : ( ($lastDigit === 3) ? 'rd' : 'th' diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php index 73fe5e41b..8c81ec656 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php @@ -90,7 +90,7 @@ 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], 'ordinal' => function ($number, $period) { switch ($period) { - // In french, only the first has be ordinal, other number remains cardinal + // In French, only the first has to be ordinal, other number remains cardinal // @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais case 'D': return $number.($number === 1 ? 'er' : ''); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/it.php index 605bcbb5a..30c0ffd55 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -55,7 +55,7 @@ 'µs' => ':countµs', 'ago' => ':time fa', 'from_now' => function ($time) { - return (preg_match('/^[0-9].+$/', $time) ? 'tra' : 'in')." $time"; + return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time"; }, 'after' => ':time dopo', 'before' => ':time prima', diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/ku.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ku.php index b001e3015..189960c8a 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/ku.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ku.php @@ -11,31 +11,29 @@ /* * Authors: - * - Halwest Manguri - * - Kardo Qadir + * - Unicode, Inc. */ -$months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', '‌حوزەیران', 'تەمموز', 'ئاب', 'ئەیلول', 'تشرینی یەکەم', 'تشرینی دووەم', 'کانونی یەکەم']; - -$weekdays = ['دوو شەممە', 'سێ شەممە', 'چوار شەممە', 'پێنج شەممە', 'هەینی', 'شەممە', 'یەک شەممە']; return [ - 'ago' => 'پێش :time', - 'from_now' => ':time لە ئێستاوە', - 'after' => 'دوای :time', - 'before' => 'پێش :time', - 'year' => '{0}ساڵ|{1}ساڵێک|{2}٢ ساڵ|[3,10]:count ساڵ|[11,Inf]:count ساڵ', - 'month' => '{0}مانگ|{1}مانگێک|{2}٢ مانگ|[3,10]:count مانگ|[11,Inf]:count مانگ', - 'week' => '{0}هەفتە|{1}هەفتەیەک|{2}٢ هەفتە|[3,10]:count هەفتە|[11,Inf]:count هەفتە', - 'day' => '{0}ڕۆژ|{1}ڕۆژێک|{2}٢ ڕۆژ|[3,10]:count ڕۆژ|[11,Inf]:count ڕۆژ', - 'hour' => '{0}کاتژمێر|{1}کاتژمێرێک|{2}٢ کاتژمێر|[3,10]:count کاتژمێر|[11,Inf]:count کاتژمێر', - 'minute' => '{0}خولەک|{1}خولەکێک|{2}٢ خولەک|[3,10]:count خولەک|[11,Inf]:count خولەک', - 'second' => '{0}چرکە|{1}چرکەیەک|{2}٢ چرکە|[3,10]:count چرکە|[11,Inf]:count چرکە', - 'months' => $months, - 'months_standalone' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => $weekdays, + 'ago' => 'berî :time', + 'from_now' => 'di :time de', + 'after' => ':time piştî', + 'before' => ':time berê', + 'year' => ':count sal', + 'year_ago' => ':count salê|:count salan', + 'year_from_now' => 'salekê|:count salan', + 'month' => ':count meh', + 'week' => ':count hefte', + 'day' => ':count roj', + 'hour' => ':count saet', + 'minute' => ':count deqîqe', + 'second' => ':count saniye', + 'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'], + 'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'], + 'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'], + 'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'], + 'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'], + 'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'], 'list' => [', ', ' û '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php index 717d199bc..38c6434d3 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php @@ -26,6 +26,7 @@ * - Nicolás Hock Isaza * - Ochirkhuyag * - Batmandakh + * - lucifer-crybaby */ return [ 'year' => ':count жил', @@ -43,38 +44,55 @@ 'second' => ':count секунд', 's' => ':countс', - 'ago' => ':timeн өмнө', - 'year_ago' => ':count жилий', - 'month_ago' => ':count сары', - 'day_ago' => ':count хоногий', - 'hour_ago' => ':count цагий', - 'minute_ago' => ':count минуты', - 'second_ago' => ':count секунды', + 'ago_mode' => 'last', + 'ago' => ':time өмнө', + 'year_ago' => ':count жилийн', + 'y_ago' => ':count жилийн', + 'month_ago' => ':count сарын', + 'm_ago' => ':count сарын', + 'day_ago' => ':count хоногийн', + 'd_ago' => ':count хоногийн', + 'week_ago' => ':count долоо хоногийн', + 'w_ago' => ':count долоо хоногийн', + 'hour_ago' => ':count цагийн', + 'minute_ago' => ':count минутын', + 'second_ago' => ':count секундын', + 'from_now_mode' => 'last', 'from_now' => 'одоогоос :time', 'year_from_now' => ':count жилийн дараа', + 'y_from_now' => ':count жилийн дараа', 'month_from_now' => ':count сарын дараа', + 'm_from_now' => ':count сарын дараа', 'day_from_now' => ':count хоногийн дараа', + 'd_from_now' => ':count хоногийн дараа', 'hour_from_now' => ':count цагийн дараа', 'minute_from_now' => ':count минутын дараа', 'second_from_now' => ':count секундын дараа', - // Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action... - 'after' => ':timeн дараа', - 'year_after' => ':count жилий', - 'month_after' => ':count сары', - 'day_after' => ':count хоногий', - 'hour_after' => ':count цагий', - 'minute_after' => ':count минуты', - 'second_after' => ':count секунды', + 'after_mode' => 'last', + 'after' => ':time дараа', + 'year_after' => ':count жилийн', + 'y_after' => ':count жилийн', + 'month_after' => ':count сарын', + 'm_after' => ':count сарын', + 'day_after' => ':count хоногийн', + 'd_after' => ':count хоногийн', + 'hour_after' => ':count цагийн', + 'minute_after' => ':count минутын', + 'second_after' => ':count секундын', - 'before' => ':timeн өмнө', - 'year_before' => ':count жилий', - 'month_before' => ':count сары', - 'day_before' => ':count хоногий', - 'hour_before' => ':count цагий', - 'minute_before' => ':count минуты', - 'second_before' => ':count секунды', + 'before_mode' => 'last', + 'before' => ':time өмнө', + 'year_before' => ':count жилийн', + 'y_before' => ':count жилийн', + 'month_before' => ':count сарын', + 'm_before' => ':count сарын', + 'day_before' => ':count хоногийн', + 'd_before' => ':count хоногийн', + 'hour_before' => ':count цагийн', + 'minute_before' => ':count минутын', + 'second_before' => ':count секундын', 'list' => ', ', 'diff_now' => 'одоо', diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index f80b25e7e..f0196c0d6 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -54,28 +54,11 @@ 's' => ':count sek.', 'ago' => ':time temu', 'from_now' => static function ($time) { - switch ($time) { - case '1 godzina': - return 'za 1 godzinę'; - - case '1 minuta': - return 'za 1 minutę'; - - case '1 sekunda': - return 'za 1 sekundę'; - - case 'godzina': - return 'za godzinę'; - - case 'minuta': - return 'za minutę'; - - case 'sekunda': - return 'za sekundę'; - - default: - return "za $time"; - } + return 'za '.strtr($time, [ + 'godzina' => 'godzinę', + 'minuta' => 'minutę', + 'sekunda' => 'sekundę', + ]); }, 'after' => ':time po', 'before' => ':time przed', diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index fd0f6b3e9..08af197cf 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -31,6 +31,7 @@ * - jofi * - Jakub ADAMEC * - Marek Adamický + * - AlterwebStudio */ return [ 'year' => 'rok|:count roky|:count rokov', @@ -46,11 +47,12 @@ 'minute' => 'minútu|:count minúty|:count minút', 'min' => ':count min', 'second' => 'sekundu|:count sekundy|:count sekúnd', + 'a_second' => 'pár sekúnd|:count sekundy|:count sekúnd', 's' => ':count s', 'ago' => 'pred :time', - 'from_now' => 'za :time', - 'after' => 'o :time neskôr', - 'before' => ':time predtým', + 'from_now' => 'o :time', + 'after' => ':time po', + 'before' => ':time pred', 'year_ago' => 'rokom|:count rokmi|:count rokmi', 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', 'week_ago' => 'týždňom|:count týždňami|:count týždňami', @@ -73,7 +75,7 @@ 'LLLL' => 'dddd D. MMMM YYYY HH:mm', ], 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], - 'weekdays_short' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], + 'weekdays_short' => ['ned', 'pod', 'uto', 'str', 'štv', 'pia', 'sob'], 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/ss.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ss.php index cd4b91901..1c52c9bf6 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/ss.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/ss.php @@ -50,7 +50,7 @@ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'e' : ( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php index ca33e1c45..1706c7191 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php @@ -70,7 +70,7 @@ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'e' : ( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php index 4b0b5410b..9adddcf87 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php @@ -33,9 +33,9 @@ 'm' => ':count mjeśůnc', 'a_month' => ':count mjeśůnc', - 'week' => ':count Tydźyń', - 'w' => ':count Tydźyń', - 'a_week' => ':count Tydźyń', + 'week' => ':count tydźyń', + 'w' => ':count tydźyń', + 'a_week' => ':count tydźyń', 'day' => ':count dźyń', 'd' => ':count dźyń', @@ -45,11 +45,11 @@ 'h' => ':count godzina', 'a_hour' => ':count godzina', - 'minute' => ':count Minuta', - 'min' => ':count Minuta', - 'a_minute' => ':count Minuta', + 'minute' => ':count minuta', + 'min' => ':count minuta', + 'a_minute' => ':count minuta', - 'second' => ':count Sekůnda', - 's' => ':count Sekůnda', - 'a_second' => ':count Sekůnda', + 'second' => ':count sekůnda', + 's' => ':count sekůnda', + 'a_second' => ':count sekůnda', ]); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/dist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index b267b0002..1d5ba703f 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -193,6 +193,7 @@ 'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'], ]; + $format = $format ?? ''; $nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format) ? 'accusative' : ( diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/dist/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php index 8be0569e8..84e241e3e 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php @@ -24,6 +24,22 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider { + /** @var callable|null */ + protected $appGetter = null; + + /** @var callable|null */ + protected $localeGetter = null; + + public function setAppGetter(?callable $appGetter): void + { + $this->appGetter = $appGetter; + } + + public function setLocaleGetter(?callable $localeGetter): void + { + $this->localeGetter = $localeGetter; + } + public function boot() { $this->updateLocale(); @@ -44,8 +60,12 @@ public function boot() public function updateLocale() { - $app = $this->app && method_exists($this->app, 'getLocale') ? $this->app : app('translator'); - $locale = $app->getLocale(); + $locale = $this->getLocale(); + + if ($locale === null) { + return; + } + Carbon::setLocale($locale); CarbonImmutable::setLocale($locale); CarbonPeriod::setLocale($locale); @@ -70,6 +90,34 @@ public function register() // Needed for Laravel < 5.3 compatibility } + protected function getLocale() + { + if ($this->localeGetter) { + return ($this->localeGetter)(); + } + + $app = $this->getApp(); + $app = $app && method_exists($app, 'getLocale') + ? $app + : $this->getGlobalApp('translator'); + + return $app ? $app->getLocale() : null; + } + + protected function getApp() + { + if ($this->appGetter) { + return ($this->appGetter)(); + } + + return $this->app ?? $this->getGlobalApp(); + } + + protected function getGlobalApp(...$args) + { + return \function_exists('app') ? \app(...$args) : null; + } + protected function isEventDispatcher($instance) { return $instance instanceof EventDispatcher diff --git a/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php new file mode 100644 index 000000000..0369e809f --- /dev/null +++ b/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use Closure; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use PHPStan\TrinaryLogic; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; +use ReflectionParameter; +use ReflectionType; +use stdClass; +use Throwable; + +abstract class AbstractMacro implements BuiltinMethodReflection +{ + /** + * The reflection function/method. + * + * @var ReflectionFunction|ReflectionMethod + */ + protected $reflectionFunction; + + /** + * The class name. + * + * @var class-string + */ + private $className; + + /** + * The method name. + * + * @var string + */ + private $methodName; + + /** + * The parameters. + * + * @var ReflectionParameter[] + */ + private $parameters; + + /** + * The is static. + * + * @var bool + */ + private $static = false; + + /** + * Macro constructor. + * + * @param string $className + * @phpstan-param class-string $className + * + * @param string $methodName + * @param callable $macro + */ + public function __construct(string $className, string $methodName, $macro) + { + $this->className = $className; + $this->methodName = $methodName; + $this->reflectionFunction = \is_array($macro) + ? new ReflectionMethod($macro[0], $macro[1]) + : new ReflectionFunction($macro); + $this->parameters = $this->reflectionFunction->getParameters(); + + if ($this->reflectionFunction->isClosure()) { + try { + $closure = $this->reflectionFunction->getClosure(); + $boundClosure = Closure::bind($closure, new stdClass()); + $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); + } catch (Throwable $e) { + $this->static = true; + } + } + } + + /** + * {@inheritdoc} + */ + public function getDeclaringClass(): ReflectionClass + { + return new ReflectionClass($this->className); + } + + /** + * {@inheritdoc} + */ + public function isPrivate(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isPublic(): bool + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isFinal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isInternal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isAbstract(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isStatic(): bool + { + return $this->static; + } + + /** + * {@inheritdoc} + */ + public function getDocComment(): ?string + { + return $this->reflectionFunction->getDocComment() ?: null; + } + + /** + * {@inheritdoc} + */ + public function getName(): string + { + return $this->methodName; + } + + /** + * {@inheritdoc} + */ + public function getParameters(): array + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getReturnType(): ?ReflectionType + { + return $this->reflectionFunction->getReturnType(); + } + + /** + * {@inheritdoc} + */ + public function isDeprecated(): TrinaryLogic + { + return TrinaryLogic::createFromBoolean( + $this->reflectionFunction->isDeprecated() || + preg_match('/@deprecated/i', $this->getDocComment() ?: '') + ); + } + + /** + * {@inheritdoc} + */ + public function isVariadic(): bool + { + return $this->reflectionFunction->isVariadic(); + } + + /** + * {@inheritdoc} + */ + public function getPrototype(): BuiltinMethodReflection + { + return $this; + } + + public function getTentativeReturnType(): ?ReflectionType + { + return null; + } +} diff --git a/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php b/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php index baee2041b..de3e51f6a 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php @@ -13,235 +13,22 @@ namespace Carbon\PHPStan; -use Closure; +use PHPStan\BetterReflection\Reflection\Adapter; use PHPStan\Reflection\Php\BuiltinMethodReflection; -use PHPStan\TrinaryLogic; -use ReflectionClass; -use ReflectionFunction; use ReflectionMethod; -use ReflectionParameter; -use ReflectionType; -use stdClass; -use Throwable; -final class Macro implements BuiltinMethodReflection -{ - /** - * The class name. - * - * @var class-string - */ - private $className; - - /** - * The method name. - * - * @var string - */ - private $methodName; - - /** - * The reflection function/method. - * - * @var ReflectionFunction|ReflectionMethod - */ - private $reflectionFunction; - - /** - * The parameters. - * - * @var ReflectionParameter[] - */ - private $parameters; - - /** - * The is static. - * - * @var bool - */ - private $static = false; - - /** - * Macro constructor. - * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName - * @param callable $macro - */ - public function __construct(string $className, string $methodName, $macro) - { - $this->className = $className; - $this->methodName = $methodName; - $this->reflectionFunction = \is_array($macro) - ? new ReflectionMethod($macro[0], $macro[1]) - : new ReflectionFunction($macro); - $this->parameters = $this->reflectionFunction->getParameters(); - - if ($this->reflectionFunction->isClosure()) { - try { - $closure = $this->reflectionFunction->getClosure(); - $boundClosure = Closure::bind($closure, new stdClass()); - $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); - } catch (Throwable $e) { - $this->static = true; - } - } - } - - /** - * {@inheritdoc} - */ - public function getDeclaringClass(): ReflectionClass - { - return new ReflectionClass($this->className); - } - - /** - * {@inheritdoc} - */ - public function isPrivate(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isPublic(): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public function isFinal(): bool - { - return false; - } +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); - /** - * {@inheritdoc} - */ - public function isInternal(): bool - { - return false; - } +require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class + ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; - /** - * {@inheritdoc} - */ - public function isAbstract(): bool - { - return false; - } +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); - /** - * {@inheritdoc} - */ - public function isStatic(): bool - { - return $this->static; - } +require $method->hasReturnType() + ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; - /** - * {@inheritdoc} - */ - public function getDocComment(): ?string - { - return $this->reflectionFunction->getDocComment() ?: null; - } - - /** - * {@inheritdoc} - * - * @return string|false - */ - public function getFileName() - { - return $this->reflectionFunction->getFileName(); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->methodName; - } - - /** - * {@inheritdoc} - */ - public function getParameters(): array - { - return $this->parameters; - } - - /** - * {@inheritdoc} - */ - public function getReturnType(): ?ReflectionType - { - return $this->reflectionFunction->getReturnType(); - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - public function getStartLine() - { - return $this->reflectionFunction->getStartLine(); - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - public function getEndLine() - { - return $this->reflectionFunction->getEndLine(); - } - - /** - * {@inheritdoc} - */ - public function isDeprecated(): TrinaryLogic - { - return TrinaryLogic::createFromBoolean( - $this->reflectionFunction->isDeprecated() || - preg_match('/@deprecated/i', $this->getDocComment() ?: '') - ); - } - - /** - * {@inheritdoc} - */ - public function isVariadic(): bool - { - return $this->reflectionFunction->isVariadic(); - } - - /** - * {@inheritdoc} - */ - public function getPrototype(): BuiltinMethodReflection - { - return $this; - } - - /** - * {@inheritdoc} - */ - public function getReflection(): ?ReflectionMethod - { - return $this->reflectionFunction instanceof ReflectionMethod - ? $this->reflectionFunction - : null; - } +final class Macro extends LazyMacro +{ } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php index 68240b7c2..d4c2d8c8e 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php @@ -75,7 +75,10 @@ public function eq($date): bool */ public function equalTo($date): bool { - return $this == $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this == $this->resolveCarbon($date); } /** @@ -155,7 +158,10 @@ public function gt($date): bool */ public function greaterThan($date): bool { - return $this > $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this > $this->resolveCarbon($date); } /** @@ -216,7 +222,10 @@ public function gte($date): bool */ public function greaterThanOrEqualTo($date): bool { - return $this >= $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this >= $this->resolveCarbon($date); } /** @@ -256,7 +265,10 @@ public function lt($date): bool */ public function lessThan($date): bool { - return $this < $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this < $this->resolveCarbon($date); } /** @@ -317,7 +329,10 @@ public function lte($date): bool */ public function lessThanOrEqualTo($date): bool { - return $this <= $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this <= $this->resolveCarbon($date); } /** @@ -351,10 +366,10 @@ public function between($date1, $date2, $equal = true): bool } if ($equal) { - return $this->greaterThanOrEqualTo($date1) && $this->lessThanOrEqualTo($date2); + return $this >= $date1 && $this <= $date2; } - return $this->greaterThan($date1) && $this->lessThan($date2); + return $this > $date1 && $this < $date2; } /** @@ -448,7 +463,7 @@ public function isWeekday() */ public function isWeekend() { - return \in_array($this->dayOfWeek, static::$weekendDays); + return \in_array($this->dayOfWeek, static::$weekendDays, true); } /** @@ -621,19 +636,19 @@ public function isSameUnit($unit, $date = null) 'microsecond' => 'Y-m-d H:i:s.u', ]; - if (!isset($units[$unit])) { - if (isset($this->$unit)) { - return $this->resolveCarbon($date)->$unit === $this->$unit; - } + if (isset($units[$unit])) { + return $this->isSameAs($units[$unit], $date); + } - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new BadComparisonUnitException($unit); - } + if (isset($this->$unit)) { + return $this->resolveCarbon($date)->$unit === $this->$unit; + } - return false; + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new BadComparisonUnitException($unit); } - return $this->isSameAs($units[$unit], $date); + return false; } /** @@ -1067,4 +1082,18 @@ public function isEndOfTime(): bool { return $this->endOfTime ?? false; } + + private function discourageNull($value): void + { + if ($value === null) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); + } + } + + private function discourageBoolean($value): void + { + if (\is_bool($value)) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); + } + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php index 8fe008a5c..d6691b2ea 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php @@ -158,6 +158,21 @@ public function toFormattedDateString() return $this->rawFormat('M j, Y'); } + /** + * Format the instance with the day, and a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDayDateString(); + * ``` + * + * @return string + */ + public function toFormattedDayDateString(): string + { + return $this->rawFormat('D, M j, Y'); + } + /** * Format the instance as time * @@ -628,7 +643,7 @@ public function toPeriod($end = null, $interval = null, $unit = null) $period->setDateInterval($interval); } - if (\is_int($end) || \is_string($end) && ctype_digit($end)) { + if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { $period->setRecurrences($end); } elseif ($end) { $period->setEndDate($end); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php index f90195a01..be2c0f7c2 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php @@ -79,8 +79,8 @@ public function __construct($time = null, $tz = null) // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 if (!str_contains((string) .1, '.')) { - $locale = setlocale(LC_NUMERIC, '0'); - setlocale(LC_NUMERIC, 'C'); + $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore + setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore } try { @@ -92,10 +92,10 @@ public function __construct($time = null, $tz = null) $this->constructedObjectId = spl_object_hash($this); if (isset($locale)) { - setlocale(LC_NUMERIC, $locale); + setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore } - static::setLastErrors(parent::getLastErrors()); + self::setLastErrors(parent::getLastErrors()); } /** @@ -148,7 +148,7 @@ public static function instance($date) $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); - if ($date instanceof CarbonInterface || $date instanceof Options) { + if ($date instanceof CarbonInterface) { $settings = $date->getSettings(); if (!$date->hasLocalTranslator()) { @@ -368,7 +368,7 @@ private static function createNowInstance($tz) */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) { - if (\is_string($year) && !is_numeric($year) || $year instanceof DateTimeInterface) { + if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); } @@ -907,9 +907,9 @@ public static function make($var) if (\is_string($var)) { $var = trim($var); - if (!preg_match('/^P[0-9T]/', $var) && - !preg_match('/^R[0-9]/', $var) && - preg_match('/[a-z0-9]/i', $var) + if (!preg_match('/^P[\dT]/', $var) && + !preg_match('/^R\d/', $var) && + preg_match('/[a-z\d]/i', $var) ) { $date = static::parse($var); } @@ -921,13 +921,20 @@ public static function make($var) /** * Set last errors. * - * @param array $lastErrors + * @param array|bool $lastErrors * * @return void */ - private static function setLastErrors(array $lastErrors) + private static function setLastErrors($lastErrors) { - static::$lastErrors = $lastErrors; + if (\is_array($lastErrors) || $lastErrors === false) { + static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [ + 'warning_count' => 0, + 'warnings' => [], + 'error_count' => 0, + 'errors' => [], + ]; + } } /** diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Date.php index 023da4d1e..b05b3652c 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Date.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Date.php @@ -643,7 +643,7 @@ public function getTimezone() * * @return array */ - protected static function getRangesByUnit() + protected static function getRangesByUnit(int $daysInMonth = 31): array { return [ // @call roundUnit @@ -651,7 +651,7 @@ protected static function getRangesByUnit() // @call roundUnit 'month' => [1, static::MONTHS_PER_YEAR], // @call roundUnit - 'day' => [1, 31], + 'day' => [1, $daysInMonth], // @call roundUnit 'hour' => [0, static::HOURS_PER_DAY - 1], // @call roundUnit @@ -940,7 +940,7 @@ public function get($name) case $name === 'millisecond': // @property int case $name === 'milli': - return (int) floor($this->rawFormat('u') / 1000); + return (int) floor(((int) $this->rawFormat('u')) / 1000); // @property int 1 through 53 case $name === 'week': @@ -1250,7 +1250,7 @@ public function set($name, $value = null) protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) { $key = $baseKey.$keySuffix; - $standaloneKey = "${key}_standalone"; + $standaloneKey = "{$key}_standalone"; $baseTranslation = $this->getTranslationMessage($key); if ($baseTranslation instanceof Closure) { @@ -1259,7 +1259,7 @@ protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $su if ( $this->getTranslationMessage("$standaloneKey.$subKey") && - (!$context || ($regExp = $this->getTranslationMessage("${baseKey}_regexp")) && !preg_match($regExp, $context)) + (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) ) { $key = $standaloneKey; } @@ -1694,7 +1694,7 @@ private static function getFirstDayOfWeek(): int public static function getWeekStartsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return static::getFirstDayOfWeek(); + return self::getFirstDayOfWeek(); } return static::$weekStartsAt; @@ -1725,7 +1725,7 @@ public static function setWeekStartsAt($day) public static function getWeekEndsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return (int) (static::DAYS_PER_WEEK - 1 + static::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; + return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; } return static::$weekEndsAt; @@ -1848,9 +1848,18 @@ public function formatLocalized($format) $format = preg_replace('#(?toDateTimeString())); + $time = strtotime($this->toDateTimeString()); + $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) + ? strftime($format, $time) + : @strftime($format, $time); - return static::$utf8 ? utf8_encode($formatted) : $formatted; + return static::$utf8 + ? ( + \function_exists('mb_convert_encoding') + ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) + : utf8_encode($formatted) + ) + : $formatted; } /** @@ -2359,7 +2368,7 @@ public function getOffsetString($separator = ':') $symbol = $second < 0 ? '-' : '+'; $minute = abs($second) / static::SECONDS_PER_MINUTE; $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); - $minute = str_pad((string) ($minute % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); return "$symbol$hour$separator$minute"; } @@ -2479,7 +2488,7 @@ public static function pluralUnit(string $unit): string return 'millennia'; } - return "${unit}s"; + return "{$unit}s"; } protected function executeCallable($macro, ...$parameters) @@ -2566,7 +2575,7 @@ public function __call($method, $parameters) if (str_starts_with($unit, 'is')) { $word = substr($unit, 2); - if (\in_array($word, static::$days)) { + if (\in_array($word, static::$days, true)) { return $this->isDayOfWeek($word); } @@ -2594,7 +2603,7 @@ public function __call($method, $parameters) $unit = strtolower(substr($unit, 3)); } - if (\in_array($unit, static::$units)) { + if (\in_array($unit, static::$units, true)) { return $this->setUnit($unit, ...$parameters); } @@ -2604,7 +2613,7 @@ public function __call($method, $parameters) if (str_starts_with($unit, 'Real')) { $unit = static::singularUnit(substr($unit, 4)); - return $this->{"${action}RealUnit"}($unit, ...$parameters); + return $this->{"{$action}RealUnit"}($unit, ...$parameters); } if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { @@ -2616,7 +2625,7 @@ public function __call($method, $parameters) } if (static::isModifiableUnit($unit)) { - return $this->{"${action}Unit"}($unit, $parameters[0] ?? 1, $overflow); + return $this->{"{$action}Unit"}($unit, $parameters[0] ?? 1, $overflow); } $sixFirstLetters = substr($unit, 0, 6); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php index fa7a49fca..e7045dc85 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php @@ -217,7 +217,7 @@ public function diffInWeeks($date = null, $absolute = true) */ public function diffInDays($date = null, $absolute = true) { - return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%a'); + return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); } /** @@ -472,7 +472,7 @@ public function diffInRealMilliseconds($date = null, $absolute = true) */ public function floatDiffInSeconds($date = null, $absolute = true) { - return $this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; + return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); } /** @@ -518,7 +518,7 @@ public function floatDiffInDays($date = null, $absolute = true) return $hoursDiff / static::HOURS_PER_DAY; } - $daysDiff = (int) $interval->format('%r%a'); + $daysDiff = $this->getIntervalDayDiff($interval); return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; } @@ -1149,4 +1149,21 @@ public function calendar($referenceTime = null, array $formats = []) return $this->isoFormat((string) $format); } + + private function getIntervalDayDiff(DateInterval $interval): int + { + $daysDiff = (int) $interval->format('%a'); + $sign = $interval->format('%r') === '-' ? -1 : 1; + + if (\is_int($interval->days) && + $interval->y === 0 && + $interval->m === 0 && + version_compare(PHP_VERSION, '8.1.0-dev', '<') && + abs($interval->d - $daysDiff) === 1 + ) { + $daysDiff = abs($interval->d); // @codeCoverageIgnore + } + + return $daysDiff * $sign; + } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php index b3d01c791..bd6417432 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; -if (!interface_exists('Symfony\\Component\\Translation\\TranslatorInterface')) { +if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && + !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') +) { class_alias( 'Symfony\\Contracts\\Translation\\TranslatorInterface', 'Symfony\\Component\\Translation\\TranslatorInterface' @@ -454,7 +456,7 @@ public function locale(string $locale = null, ...$fallbackLocales) } } - $this->setLocalTranslator($translator); + $this->localTranslator = $translator; } return $this; @@ -555,17 +557,13 @@ public static function executeWithLocale($locale, $func) public static function localeHasShortUnits($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return $newLocale && - ( - ($y = static::translateWith($translator, 'y')) !== 'y' && - $y !== static::translateWith($translator, 'year') - ) || ( - ($y = static::translateWith($translator, 'd')) !== 'd' && + return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( + ($y = static::translateWith($translator, 'd')) !== 'd' && $y !== static::translateWith($translator, 'day') - ) || ( - ($y = static::translateWith($translator, 'h')) !== 'h' && + ) || ( + ($y = static::translateWith($translator, 'h')) !== 'h' && $y !== static::translateWith($translator, 'hour') - ); + ); }); } @@ -734,7 +732,7 @@ protected static function getLocaleAwareTranslator($translator = null) } if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { - throw new NotLocaleAwareException($translator); + throw new NotLocaleAwareException($translator); // @codeCoverageIgnore } return $translator; @@ -792,7 +790,7 @@ private static function translateWordsByKeys($keys, $messages, $key): array $parts = explode('|', $message); return $key === 'to' - ? static::cleanWordFromTranslationString(end($parts)) + ? self::cleanWordFromTranslationString(end($parts)) : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; }, $keys); } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php index ac06084a7..88b251df4 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php @@ -66,8 +66,8 @@ trait Mixin public static function mixin($mixin) { \is_string($mixin) && trait_exists($mixin) - ? static::loadMixinTrait($mixin) - : static::loadMixinClass($mixin); + ? self::loadMixinTrait($mixin) + : self::loadMixinClass($mixin); } /** @@ -115,7 +115,7 @@ private static function loadMixinTrait($trait) } // in case of errors not converted into exceptions - $closure = $closure ?? $closureBase; + $closure = $closure ?: $closureBase; return $closure(...\func_get_args()); }); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php index 33062397f..c991a9b0a 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php @@ -52,7 +52,7 @@ public function roundUnit($unit, $precision = 1, $function = 'round') 'millisecond' => [1000, 'microsecond'], ]; $normalizedUnit = static::singularUnit($unit); - $ranges = array_merge(static::getRangesByUnit(), [ + $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ // @call roundUnit 'microsecond' => [0, 999999], ]); @@ -93,7 +93,7 @@ public function roundUnit($unit, $precision = 1, $function = 'round') $delta = $maximum + 1 - $minimum; $factor /= $delta; $fraction *= $delta; - $arguments[0] += $this->$unit * $factor; + $arguments[0] += ($this->$unit - $minimum) * $factor; $changes[$unit] = round( $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) ); diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php index eebc69bd0..9e86bd3e9 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php @@ -134,6 +134,39 @@ public function __sleep() return $properties; } + public function __serialize(): array + { + if (isset($this->timezone_type)) { + return [ + 'date' => $this->date ?? null, + 'timezone_type' => $this->timezone_type, + 'timezone' => $this->timezone ?? null, + ]; + } + + $timezone = $this->getTimezone(); + $export = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone_type' => $timezone->getType(), + 'timezone' => $timezone->getName(), + ]; + + // @codeCoverageIgnoreStart + if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { + $export['dumpDateProperties'] = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + } + // @codeCoverageIgnoreEnd + + if ($this->localTranslator ?? null) { + $export['dumpLocale'] = $this->locale ?? null; + } + + return $export; + } + /** * Set locale if specified on unserialize() called. * @@ -142,14 +175,18 @@ public function __sleep() #[ReturnTypeWillChange] public function __wakeup() { - if (get_parent_class() && method_exists(parent::class, '__wakeup')) { + if (parent::class && method_exists(parent::class, '__wakeup')) { // @codeCoverageIgnoreStart try { parent::__wakeup(); } catch (Throwable $exception) { - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. - ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; - parent::__construct($date, unserialize($timezone)); + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; + parent::__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } } // @codeCoverageIgnoreEnd } @@ -164,6 +201,31 @@ public function __wakeup() $this->cleanupDumpProperties(); } + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + try { + $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); + } catch (Throwable $exception) { + if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { + throw $exception; + } + + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; + $this->__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + + if (isset($data['dumpLocale'])) { + $this->locale($data['dumpLocale']); + } + } + /** * Prepare the object for JSON serialization. * @@ -207,9 +269,11 @@ public static function serializeUsing($callback) */ public function cleanupDumpProperties() { - foreach ($this->dumpProperties as $property) { - if (isset($this->$property)) { - unset($this->$property); + if (PHP_VERSION < 8.2) { + foreach ($this->dumpProperties as $property) { + if (isset($this->$property)) { + unset($this->$property); + } } } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Test.php index d22988c32..e0c9e8068 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Test.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Test.php @@ -28,10 +28,17 @@ trait Test /** * A test Carbon instance to be returned when now instances are created. * - * @var static + * @var Closure|static|null */ protected static $testNow; + /** + * The timezone to resto to when clearing the time mock. + * + * @var string|null + */ + protected static $testDefaultTimezone; + /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned @@ -52,15 +59,13 @@ trait Test * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNow($testNow = null) { - if ($testNow === false) { - $testNow = null; - } - - static::$testNow = \is_string($testNow) ? static::parse($testNow) : $testNow; + static::$testNow = $testNow instanceof self || $testNow instanceof Closure + ? $testNow + : static::make($testNow); } /** @@ -80,10 +85,14 @@ public static function setTestNow($testNow = null) * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNowAndTimezone($testNow = null, $tz = null) { + if ($testNow) { + self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); + } + $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; if ($useDateInstanceTimezone) { @@ -94,7 +103,12 @@ public static function setTestNowAndTimezone($testNow = null, $tz = null) if (!$useDateInstanceTimezone) { $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); - self::setDefaultTimezone($now->tzName, $now); + $tzName = $now ? $now->tzName : null; + self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); + } + + if (!$testNow) { + self::$testDefaultTimezone = null; } } @@ -105,16 +119,20 @@ public static function setTestNowAndTimezone($testNow = null, $tz = null) * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure|null $callback + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure|null $callback * * @return mixed */ public static function withTestNow($testNow = null, $callback = null) { static::setTestNow($testNow); - $result = $callback(); - static::setTestNow(); + + try { + $result = $callback(); + } finally { + static::setTestNow(); + } return $result; } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php index 2cb5c48d7..88a465c93 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php @@ -63,7 +63,7 @@ public static function createFromTimestampUTC($timestamp) public static function createFromTimestampMsUTC($timestamp) { [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); - $sign = $milliseconds < 0 || $milliseconds === 0.0 && $microseconds < 0 ? -1 : 1; + $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; $milliseconds = abs($milliseconds); $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); @@ -125,7 +125,7 @@ public function timestamp($unixTimestamp) */ public function getPreciseTimestamp($precision = 6) { - return round($this->rawFormat('Uu') / pow(10, 6 - $precision)); + return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); } /** @@ -182,7 +182,7 @@ private static function getIntegerAndDecimalParts($numbers, $decimals = 6) $integer = 0; $decimal = 0; - foreach (preg_split('`[^0-9.]+`', $numbers) as $chunk) { + foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { [$integerPart, $decimalPart] = explode('.', "$chunk."); $integer += (int) $integerPart; diff --git a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Units.php index 2902a8b10..4fc7d2330 100644 --- a/dist/vendor/nesbot/carbon/src/Carbon/Traits/Units.php +++ b/dist/vendor/nesbot/carbon/src/Carbon/Traits/Units.php @@ -60,8 +60,6 @@ public function addRealUnit($unit, $value = 1) case 'millisecond': return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); - break; - // @call addRealUnit case 'second': break; @@ -167,7 +165,7 @@ public static function isModifiableUnit($unit) 'weekday', ]; - return \in_array($unit, $modifiableUnits) || \in_array($unit, static::$units); + return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); } /** @@ -264,7 +262,7 @@ public function addUnit($unit, $value = 1, $overflow = null) /** @var static $date */ $date = $date->addDays($sign); - while (\in_array($date->dayOfWeek, $weekendDays)) { + while (\in_array($date->dayOfWeek, $weekendDays, true)) { $date = $date->addDays($sign); } } @@ -274,14 +272,14 @@ public function addUnit($unit, $value = 1, $overflow = null) } $timeString = $date->toTimeString(); - } elseif ($canOverflow = \in_array($unit, [ + } elseif ($canOverflow = (\in_array($unit, [ 'month', 'year', ]) && ($overflow === false || ( $overflow === null && ($ucUnit = ucfirst($unit).'s') && !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) - ))) { + )))) { $day = $date->day; } diff --git a/dist/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/dist/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php new file mode 100644 index 000000000..ad36c6704 --- /dev/null +++ b/dist/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\ImmutableException; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +class TranslatorImmutable extends Translator +{ + /** @var bool */ + private $constructed = false; + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->constructed = true; + } + + /** + * @codeCoverageIgnore + */ + public function setDirectories(array $directories) + { + $this->disallowMutation(__METHOD__); + + return parent::setDirectories($directories); + } + + public function setLocale($locale) + { + $this->disallowMutation(__METHOD__); + + return parent::setLocale($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setMessages($locale, $messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setMessages($locale, $messages); + } + + /** + * @codeCoverageIgnore + */ + public function setTranslations($messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setTranslations($messages); + } + + /** + * @codeCoverageIgnore + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->disallowMutation(__METHOD__); + + parent::setConfigCacheFactory($configCacheFactory); + } + + public function resetMessages($locale = null) + { + $this->disallowMutation(__METHOD__); + + return parent::resetMessages($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setFallbackLocales(array $locales) + { + $this->disallowMutation(__METHOD__); + + parent::setFallbackLocales($locales); + } + + private function disallowMutation($method) + { + if ($this->constructed) { + throw new ImmutableException($method.' not allowed on '.static::class); + } + } +} diff --git a/dist/vendor/nyholm/psr7/CHANGELOG.md b/dist/vendor/nyholm/psr7/CHANGELOG.md index 07238bdab..a9f8154b6 100644 --- a/dist/vendor/nyholm/psr7/CHANGELOG.md +++ b/dist/vendor/nyholm/psr7/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 1.5.1 + +### Fixed + +- Fixed deprecations on PHP 8.1 + +## 1.5.0 + +### Added + +- Add explicit `@return mixed` +- Add explicit return types to HttplugFactory + +### Fixed + +- Improve error handling with streams + ## 1.4.1 ### Fixed diff --git a/dist/vendor/nyholm/psr7/doc/final.md b/dist/vendor/nyholm/psr7/doc/final.md deleted file mode 100644 index b5b1942b8..000000000 --- a/dist/vendor/nyholm/psr7/doc/final.md +++ /dev/null @@ -1,20 +0,0 @@ -# Final classes - -The `final` keyword was removed in version 1.4.0. It was replaced by `@final` annotation. -This was done due popular demand, not because it is a good technical reason to -extend the classes. - -This document will show the correct way to work with PSR-7 classes. The "correct way" -refers to best practices and good software design. I strongly believe that one should -be aware of how a problem *should* be solved, however, it is not needed to always -implement that solution. - -## Extending classes - -You should never extend the classes, you should rather use composition or implement -the interface yourself. Please refer to the [decorator pattern](https://refactoring.guru/design-patterns/decorator). - -## Mocking classes - -The PSR-7 classes are all value objects and they can be used without mocking. If -one really needs to create a special scenario, one can mock the interface instead. diff --git a/dist/vendor/nyholm/psr7/psalm.xml b/dist/vendor/nyholm/psr7/psalm.xml deleted file mode 100644 index d234691b9..000000000 --- a/dist/vendor/nyholm/psr7/psalm.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/dist/vendor/nyholm/psr7/src/Factory/HttplugFactory.php b/dist/vendor/nyholm/psr7/src/Factory/HttplugFactory.php index cc64780e1..4cf8e27e0 100644 --- a/dist/vendor/nyholm/psr7/src/Factory/HttplugFactory.php +++ b/dist/vendor/nyholm/psr7/src/Factory/HttplugFactory.php @@ -6,6 +6,9 @@ use Http\Message\{MessageFactory, StreamFactory, UriFactory}; use Nyholm\Psr7\{Request, Response, Stream, Uri}; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriInterface; /** @@ -16,17 +19,17 @@ */ class HttplugFactory implements MessageFactory, StreamFactory, UriFactory { - public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1') + public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1'): RequestInterface { return new Request($method, $uri, $headers, $body, $protocolVersion); } - public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1') + public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1'): ResponseInterface { return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase); } - public function createStream($body = null) + public function createStream($body = null): StreamInterface { return Stream::create($body ?? ''); } diff --git a/dist/vendor/nyholm/psr7/src/Factory/Psr17Factory.php b/dist/vendor/nyholm/psr7/src/Factory/Psr17Factory.php index f304baa1b..440bec347 100644 --- a/dist/vendor/nyholm/psr7/src/Factory/Psr17Factory.php +++ b/dist/vendor/nyholm/psr7/src/Factory/Psr17Factory.php @@ -37,18 +37,16 @@ public function createStream(string $content = ''): StreamInterface public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface { - try { - $resource = @\fopen($filename, $mode); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $filename)); + if ('' === $filename) { + throw new \RuntimeException('Path cannot be empty'); } - if (false === $resource) { + if (false === $resource = @\fopen($filename, $mode)) { if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { throw new \InvalidArgumentException(\sprintf('The mode "%s" is invalid.', $mode)); } - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $filename)); + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $filename, \error_get_last()['message'] ?? '')); } return Stream::create($resource); diff --git a/dist/vendor/nyholm/psr7/src/ServerRequest.php b/dist/vendor/nyholm/psr7/src/ServerRequest.php index 1ad879299..5fc3f2bee 100644 --- a/dist/vendor/nyholm/psr7/src/ServerRequest.php +++ b/dist/vendor/nyholm/psr7/src/ServerRequest.php @@ -77,6 +77,9 @@ public function getUploadedFiles(): array return $this->uploadedFiles; } + /** + * @return static + */ public function withUploadedFiles(array $uploadedFiles) { $new = clone $this; @@ -90,6 +93,9 @@ public function getCookieParams(): array return $this->cookieParams; } + /** + * @return static + */ public function withCookieParams(array $cookies) { $new = clone $this; @@ -103,6 +109,9 @@ public function getQueryParams(): array return $this->queryParams; } + /** + * @return static + */ public function withQueryParams(array $query) { $new = clone $this; @@ -111,11 +120,17 @@ public function withQueryParams(array $query) return $new; } + /** + * @return array|object|null + */ public function getParsedBody() { return $this->parsedBody; } + /** + * @return static + */ public function withParsedBody($data) { if (!\is_array($data) && !\is_object($data) && null !== $data) { @@ -133,6 +148,9 @@ public function getAttributes(): array return $this->attributes; } + /** + * @return mixed + */ public function getAttribute($attribute, $default = null) { if (false === \array_key_exists($attribute, $this->attributes)) { diff --git a/dist/vendor/nyholm/psr7/src/Stream.php b/dist/vendor/nyholm/psr7/src/Stream.php index 1a7f8c1f9..71515e5c3 100644 --- a/dist/vendor/nyholm/psr7/src/Stream.php +++ b/dist/vendor/nyholm/psr7/src/Stream.php @@ -185,8 +185,12 @@ public function getSize(): ?int public function tell(): int { - if (false === $result = \ftell($this->stream)) { - throw new \RuntimeException('Unable to determine stream position'); + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + if (false === $result = @\ftell($this->stream)) { + throw new \RuntimeException('Unable to determine stream position: ' . (\error_get_last()['message'] ?? '')); } return $result; @@ -194,7 +198,7 @@ public function tell(): int public function eof(): bool { - return !$this->stream || \feof($this->stream); + return !isset($this->stream) || \feof($this->stream); } public function isSeekable(): bool @@ -204,6 +208,10 @@ public function isSeekable(): bool public function seek($offset, $whence = \SEEK_SET): void { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { throw new \RuntimeException('Stream is not seekable'); } @@ -225,6 +233,10 @@ public function isWritable(): bool public function write($string): int { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { throw new \RuntimeException('Cannot write to a non-writable stream'); } @@ -232,8 +244,8 @@ public function write($string): int // We can't know the size after writing anything $this->size = null; - if (false === $result = \fwrite($this->stream, $string)) { - throw new \RuntimeException('Unable to write to stream'); + if (false === $result = @\fwrite($this->stream, $string)) { + throw new \RuntimeException('Unable to write to stream: ' . (\error_get_last()['message'] ?? '')); } return $result; @@ -246,12 +258,16 @@ public function isReadable(): bool public function read($length): string { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { throw new \RuntimeException('Cannot read from non-readable stream'); } - if (false === $result = \fread($this->stream, $length)) { - throw new \RuntimeException('Unable to read from stream'); + if (false === $result = @\fread($this->stream, $length)) { + throw new \RuntimeException('Unable to read from stream: ' . (\error_get_last()['message'] ?? '')); } return $result; @@ -260,16 +276,19 @@ public function read($length): string public function getContents(): string { if (!isset($this->stream)) { - throw new \RuntimeException('Unable to read stream contents'); + throw new \RuntimeException('Stream is detached'); } - if (false === $contents = \stream_get_contents($this->stream)) { - throw new \RuntimeException('Unable to read stream contents'); + if (false === $contents = @\stream_get_contents($this->stream)) { + throw new \RuntimeException('Unable to read stream contents: ' . (\error_get_last()['message'] ?? '')); } return $contents; } + /** + * @return mixed + */ public function getMetadata($key = null) { if (!isset($this->stream)) { diff --git a/dist/vendor/nyholm/psr7/src/UploadedFile.php b/dist/vendor/nyholm/psr7/src/UploadedFile.php index 198cd3386..bf47b781f 100644 --- a/dist/vendor/nyholm/psr7/src/UploadedFile.php +++ b/dist/vendor/nyholm/psr7/src/UploadedFile.php @@ -80,7 +80,7 @@ public function __construct($streamOrFile, $size, $errorStatus, $clientFilename if (\UPLOAD_ERR_OK === $this->error) { // Depending on the value set file or stream variable. - if (\is_string($streamOrFile)) { + if (\is_string($streamOrFile) && '' !== $streamOrFile) { $this->file = $streamOrFile; } elseif (\is_resource($streamOrFile)) { $this->stream = Stream::create($streamOrFile); @@ -114,11 +114,11 @@ public function getStream(): StreamInterface return $this->stream; } - try { - return Stream::create(\fopen($this->file, 'r')); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $this->file)); + if (false === $resource = @\fopen($this->file, 'r')) { + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $this->file, \error_get_last()['message'] ?? '')); } + + return Stream::create($resource); } public function moveTo($targetPath): void @@ -130,20 +130,23 @@ public function moveTo($targetPath): void } if (null !== $this->file) { - $this->moved = 'cli' === \PHP_SAPI ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath); + $this->moved = 'cli' === \PHP_SAPI ? @\rename($this->file, $targetPath) : @\move_uploaded_file($this->file, $targetPath); + + if (false === $this->moved) { + throw new \RuntimeException(\sprintf('Uploaded file could not be moved to "%s": %s', $targetPath, \error_get_last()['message'] ?? '')); + } } else { $stream = $this->getStream(); if ($stream->isSeekable()) { $stream->rewind(); } - try { - // Copy the contents of a stream into another stream until end-of-file. - $dest = Stream::create(\fopen($targetPath, 'w')); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $targetPath)); + if (false === $resource = @\fopen($targetPath, 'w')) { + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $targetPath, \error_get_last()['message'] ?? '')); } + $dest = Stream::create($resource); + while (!$stream->eof()) { if (!$dest->write($stream->read(1048576))) { break; @@ -152,10 +155,6 @@ public function moveTo($targetPath): void $this->moved = true; } - - if (false === $this->moved) { - throw new \RuntimeException(\sprintf('Uploaded file could not be moved to "%s"', $targetPath)); - } } public function getSize(): int diff --git a/dist/vendor/php-http/discovery/.php-cs-fixer.php b/dist/vendor/php-http/discovery/.php-cs-fixer.php new file mode 100644 index 000000000..83809c25d --- /dev/null +++ b/dist/vendor/php-http/discovery/.php-cs-fixer.php @@ -0,0 +1,16 @@ +in(__DIR__.'/src') + ->name('*.php') +; + +$config = (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; + +return $config; diff --git a/dist/vendor/php-http/discovery/CHANGELOG.md b/dist/vendor/php-http/discovery/CHANGELOG.md index f896866a2..a4f3840a7 100644 --- a/dist/vendor/php-http/discovery/CHANGELOG.md +++ b/dist/vendor/php-http/discovery/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 1.14.3 - 2022-07-11 + +- [#207](https://github.com/php-http/discovery/pull/207) - Updates Exception to extend Throwable solving static analysis errors for consumers + +## 1.14.2 - 2022-05-25 + +- [#202](https://github.com/php-http/discovery/pull/202) - Avoid error when the Symfony PSR-18 client exists but its dependencies are not installed + ## 1.14.1 - 2021-09-18 - [#199](https://github.com/php-http/discovery/pull/199) - Fixes message factory discovery for `laminas-diactoros ^2.7` diff --git a/dist/vendor/php-http/discovery/composer.json b/dist/vendor/php-http/discovery/composer.json index 5ded29e1e..42d626027 100644 --- a/dist/vendor/php-http/discovery/composer.json +++ b/dist/vendor/php-http/discovery/composer.json @@ -17,8 +17,7 @@ "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1", - "puli/composer-plugin": "1.0.0-beta10" + "phpspec/phpspec": "^5.1 || ^6.1" }, "suggest": { "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" diff --git a/dist/vendor/php-http/discovery/src/ClassDiscovery.php b/dist/vendor/php-http/discovery/src/ClassDiscovery.php index 435298507..4f47f3c87 100644 --- a/dist/vendor/php-http/discovery/src/ClassDiscovery.php +++ b/dist/vendor/php-http/discovery/src/ClassDiscovery.php @@ -206,7 +206,7 @@ protected static function evaluateCondition($condition) /** * Get an instance of the $class. * - * @param string|\Closure $class A FQCN of a class or a closure that instantiate the class. + * @param string|\Closure $class a FQCN of a class or a closure that instantiate the class * * @return object * diff --git a/dist/vendor/php-http/discovery/src/Exception.php b/dist/vendor/php-http/discovery/src/Exception.php index 973c9087e..58b05235a 100644 --- a/dist/vendor/php-http/discovery/src/Exception.php +++ b/dist/vendor/php-http/discovery/src/Exception.php @@ -2,11 +2,13 @@ namespace Http\Discovery; +use Throwable; + /** * An interface implemented by all discovery related exceptions. * * @author Tobias Nyholm */ -interface Exception +interface Exception extends Throwable { } diff --git a/dist/vendor/php-http/discovery/src/Exception/NotFoundException.php b/dist/vendor/php-http/discovery/src/Exception/NotFoundException.php index befbf4887..ef8b9c584 100644 --- a/dist/vendor/php-http/discovery/src/Exception/NotFoundException.php +++ b/dist/vendor/php-http/discovery/src/Exception/NotFoundException.php @@ -11,6 +11,6 @@ * * @author Márk Sági-Kazár */ -/*final */class NotFoundException extends \RuntimeException implements Exception +/* final */ class NotFoundException extends \RuntimeException implements Exception { } diff --git a/dist/vendor/php-http/discovery/src/Psr18ClientDiscovery.php b/dist/vendor/php-http/discovery/src/Psr18ClientDiscovery.php index 7fcdb17af..dfd2dd1e7 100644 --- a/dist/vendor/php-http/discovery/src/Psr18ClientDiscovery.php +++ b/dist/vendor/php-http/discovery/src/Psr18ClientDiscovery.php @@ -24,7 +24,7 @@ public static function find() try { $client = static::findOneByType(ClientInterface::class); } catch (DiscoveryFailedException $e) { - throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e); + throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".', 0, $e); } return static::instantiateClass($client); diff --git a/dist/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/dist/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php index e82bcb1d8..8bddbe827 100644 --- a/dist/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php +++ b/dist/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php @@ -2,45 +2,46 @@ namespace Http\Discovery\Strategy; +use GuzzleHttp\Client as GuzzleHttp; use GuzzleHttp\Promise\Promise; use GuzzleHttp\Psr7\Request as GuzzleRequest; +use Http\Adapter\Artax\Client as Artax; +use Http\Adapter\Buzz\Client as Buzz; +use Http\Adapter\Cake\Client as Cake; +use Http\Adapter\Guzzle5\Client as Guzzle5; +use Http\Adapter\Guzzle6\Client as Guzzle6; +use Http\Adapter\Guzzle7\Client as Guzzle7; +use Http\Adapter\React\Client as React; +use Http\Adapter\Zend\Client as Zend; +use Http\Client\Curl\Client as Curl; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; +use Http\Client\Socket\Client as Socket; +use Http\Discovery\ClassDiscovery; use Http\Discovery\Exception\NotFoundException; use Http\Discovery\MessageFactoryDiscovery; use Http\Discovery\Psr17FactoryDiscovery; -use Http\Message\RequestFactory; -use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory; use Http\Message\MessageFactory; +use Http\Message\MessageFactory\DiactorosMessageFactory; use Http\Message\MessageFactory\GuzzleMessageFactory; +use Http\Message\MessageFactory\SlimMessageFactory; +use Http\Message\RequestFactory; use Http\Message\StreamFactory; +use Http\Message\StreamFactory\DiactorosStreamFactory; use Http\Message\StreamFactory\GuzzleStreamFactory; +use Http\Message\StreamFactory\SlimStreamFactory; use Http\Message\UriFactory; -use Http\Message\UriFactory\GuzzleUriFactory; -use Http\Message\MessageFactory\DiactorosMessageFactory; -use Http\Message\StreamFactory\DiactorosStreamFactory; use Http\Message\UriFactory\DiactorosUriFactory; -use Psr\Http\Client\ClientInterface as Psr18Client; -use Zend\Diactoros\Request as ZendDiactorosRequest; -use Laminas\Diactoros\Request as DiactorosRequest; -use Http\Message\MessageFactory\SlimMessageFactory; -use Http\Message\StreamFactory\SlimStreamFactory; +use Http\Message\UriFactory\GuzzleUriFactory; use Http\Message\UriFactory\SlimUriFactory; +use Laminas\Diactoros\Request as DiactorosRequest; +use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory; +use Psr\Http\Client\ClientInterface as Psr18Client; +use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory; use Slim\Http\Request as SlimRequest; -use GuzzleHttp\Client as GuzzleHttp; -use Http\Adapter\Guzzle7\Client as Guzzle7; -use Http\Adapter\Guzzle6\Client as Guzzle6; -use Http\Adapter\Guzzle5\Client as Guzzle5; -use Http\Client\Curl\Client as Curl; -use Http\Client\Socket\Client as Socket; -use Http\Adapter\React\Client as React; -use Http\Adapter\Buzz\Client as Buzz; -use Http\Adapter\Cake\Client as Cake; -use Http\Adapter\Zend\Client as Zend; -use Http\Adapter\Artax\Client as Artax; use Symfony\Component\HttpClient\HttplugClient as SymfonyHttplug; use Symfony\Component\HttpClient\Psr18Client as SymfonyPsr18; -use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory; +use Zend\Diactoros\Request as ZendDiactorosRequest; /** * @internal @@ -136,8 +137,11 @@ private static function getPsr18Candidates() // HTTPlug 2.0 clients implements PSR18Client too. foreach (self::$classes[HttpClient::class] as $c) { + if (!is_string($c['class'])) { + continue; + } try { - if (is_subclass_of($c['class'], Psr18Client::class)) { + if (ClassDiscovery::safeClassExists($c['class']) && is_subclass_of($c['class'], Psr18Client::class)) { $candidates[] = $c; } } catch (\Throwable $e) { diff --git a/dist/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php b/dist/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php index 641485a63..1eadb145b 100644 --- a/dist/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php +++ b/dist/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php @@ -17,7 +17,7 @@ interface DiscoveryStrategy * @return array The return value is always an array with zero or more elements. Each * element is an array with two keys ['class' => string, 'condition' => mixed]. * - * @throws StrategyUnavailableException if we cannot use this strategy. + * @throws StrategyUnavailableException if we cannot use this strategy */ public static function getCandidates($type); } diff --git a/dist/vendor/php-http/httplug/.php-cs-fixer.dist.php b/dist/vendor/php-http/httplug/.php-cs-fixer.dist.php new file mode 100644 index 000000000..83809c25d --- /dev/null +++ b/dist/vendor/php-http/httplug/.php-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__.'/src') + ->name('*.php') +; + +$config = (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; + +return $config; diff --git a/dist/vendor/php-http/httplug/CHANGELOG.md b/dist/vendor/php-http/httplug/CHANGELOG.md index 29b03e0c6..26483c2c4 100644 --- a/dist/vendor/php-http/httplug/CHANGELOG.md +++ b/dist/vendor/php-http/httplug/CHANGELOG.md @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [2.3.0] - 2022-02-21 + +### Changed + +- Enabled the `$onRejected` callback of `HttpRejectedPromise` to return a promise for implementing a retry + mechanism [#168](https://github.com/php-http/httplug/pull/168) + ## [2.2.0] - 2020-07-13 ### Changed diff --git a/dist/vendor/php-http/httplug/README.md b/dist/vendor/php-http/httplug/README.md index aabcf2588..ce60cfaa9 100644 --- a/dist/vendor/php-http/httplug/README.md +++ b/dist/vendor/php-http/httplug/README.md @@ -2,12 +2,11 @@ [![Latest Version](https://img.shields.io/github/release/php-http/httplug.svg?style=flat-square)](https://github.com/php-http/httplug/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/httplug/master.svg?style=flat-square)](https://travis-ci.org/php-http/httplug) +[![Build Status](https://github.com/php-http/httplug/actions/workflows/ci.yml/badge.svg)](https://github.com/php-http/httplug/actions/workflows/ci.yml) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) [![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug) -[![Slack Status](http://slack.httplug.io/badge.svg)](http://slack.httplug.io) [![Email](https://img.shields.io/badge/email-team@httplug.io-blue.svg?style=flat-square)](mailto:team@httplug.io) **HTTPlug, the HTTP client abstraction for PHP.** diff --git a/dist/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php b/dist/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php index 8af97dead..624cc8a94 100644 --- a/dist/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php +++ b/dist/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php @@ -27,7 +27,12 @@ public function then(callable $onFulfilled = null, callable $onRejected = null) } try { - return new HttpFulfilledPromise($onRejected($this->exception)); + $result = $onRejected($this->exception); + if ($result instanceof Promise) { + return $result; + } + + return new HttpFulfilledPromise($result); } catch (Exception $e) { return new self($e); } diff --git a/dist/vendor/php-http/message/CHANGELOG.md b/dist/vendor/php-http/message/CHANGELOG.md index d3eb840bc..a185f4612 100644 --- a/dist/vendor/php-http/message/CHANGELOG.md +++ b/dist/vendor/php-http/message/CHANGELOG.md @@ -6,9 +6,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.13.0] - 2022-02-11 + +- Added `Formatter::formatResponseForRequest()` to allow the formatter to get context from the request to decide what of the response to output. +- Deprecated `Formatter::formatResponse()` in favor of the new `formatResponseForRequest` method. + ## [1.12.0] - 2021-08-29 -- Added support for adjusting binary detection regex in FullHttpMessageFormatter +- Added support for adjusting binary detection regex in FullHttpMessageFormatter. ## [1.11.2] - 2021-08-03 diff --git a/dist/vendor/php-http/message/composer.json b/dist/vendor/php-http/message/composer.json index fc67cd042..1a614df8d 100644 --- a/dist/vendor/php-http/message/composer.json +++ b/dist/vendor/php-http/message/composer.json @@ -27,7 +27,7 @@ "ext-zlib": "*", "ergebnis/composer-normalize": "^2.6", "guzzlehttp/psr7": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.3", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0", "laminas/laminas-diactoros": "^2.0" }, @@ -38,7 +38,10 @@ "slim/slim": "Used with Slim Framework PSR-7 implementation" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "ergebnis/composer-normalize": true + } }, "extra": { "branch-alias": { diff --git a/dist/vendor/php-http/message/src/Authentication/Header.php b/dist/vendor/php-http/message/src/Authentication/Header.php index 97a04dd4a..77f638275 100644 --- a/dist/vendor/php-http/message/src/Authentication/Header.php +++ b/dist/vendor/php-http/message/src/Authentication/Header.php @@ -13,10 +13,13 @@ class Header implements Authentication private $name; /** - * @var string|array + * @var string|string[] */ private $value; + /** + * @param string|string[] $value + */ public function __construct(string $name, $value) { $this->name = $name; diff --git a/dist/vendor/php-http/message/src/CookieJar.php b/dist/vendor/php-http/message/src/CookieJar.php index 1479cc687..914ad9797 100644 --- a/dist/vendor/php-http/message/src/CookieJar.php +++ b/dist/vendor/php-http/message/src/CookieJar.php @@ -195,6 +195,7 @@ public function clear() /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function count() { return $this->cookies->count(); @@ -203,6 +204,7 @@ public function count() /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function getIterator() { return clone $this->cookies; diff --git a/dist/vendor/php-http/message/src/Encoding/Filter/Chunk.php b/dist/vendor/php-http/message/src/Encoding/Filter/Chunk.php index 0f8f53b32..538e27007 100644 --- a/dist/vendor/php-http/message/src/Encoding/Filter/Chunk.php +++ b/dist/vendor/php-http/message/src/Encoding/Filter/Chunk.php @@ -12,6 +12,7 @@ class Chunk extends \php_user_filter /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { diff --git a/dist/vendor/php-http/message/src/Formatter.php b/dist/vendor/php-http/message/src/Formatter.php index d6cd21b77..6ef70bb03 100644 --- a/dist/vendor/php-http/message/src/Formatter.php +++ b/dist/vendor/php-http/message/src/Formatter.php @@ -9,6 +9,11 @@ * Formats a request and/or a response as a string. * * @author Márk Sági-Kazár + * + * The formatResponseForRequest method will be added to this interface in the next major version, replacing the formatRequest method. + * Meanwhile, callers SHOULD check the formatter for the existence of formatResponseForRequest and call that if available. + * + * @method string formatResponseForRequest(ResponseInterface $response, RequestInterface $request) Formats a response in context of its request. */ interface Formatter { @@ -20,6 +25,8 @@ interface Formatter public function formatRequest(RequestInterface $request); /** + * @deprecated since 1.13, use formatResponseForRequest() instead + * * Formats a response. * * @return string diff --git a/dist/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php b/dist/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php index 78b1d55b3..80d2971cb 100644 --- a/dist/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php +++ b/dist/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php @@ -68,6 +68,16 @@ public function formatResponse(ResponseInterface $response) return ''; } + /** + * Formats a response in context of its request. + * + * @return string + */ + public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) + { + return $this->formatResponse($response); + } + /** * @return string */ diff --git a/dist/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php b/dist/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php index bb22efe2e..8b9b1264e 100644 --- a/dist/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php +++ b/dist/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php @@ -74,6 +74,16 @@ public function formatResponse(ResponseInterface $response) return $this->addBody($response, $message); } + /** + * Formats a response in context of its request. + * + * @return string + */ + public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) + { + return $this->formatResponse($response); + } + /** * Add the message body if the stream is seekable. * diff --git a/dist/vendor/php-http/message/src/Formatter/SimpleFormatter.php b/dist/vendor/php-http/message/src/Formatter/SimpleFormatter.php index b1fcabdb0..ee99ae3f3 100644 --- a/dist/vendor/php-http/message/src/Formatter/SimpleFormatter.php +++ b/dist/vendor/php-http/message/src/Formatter/SimpleFormatter.php @@ -39,4 +39,14 @@ public function formatResponse(ResponseInterface $response) $response->getProtocolVersion() ); } + + /** + * Formats a response in context of its request. + * + * @return string + */ + public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) + { + return $this->formatResponse($response); + } } diff --git a/dist/vendor/php-http/message/src/Stream/BufferedStream.php b/dist/vendor/php-http/message/src/Stream/BufferedStream.php index 1eac97474..3d38731d6 100644 --- a/dist/vendor/php-http/message/src/Stream/BufferedStream.php +++ b/dist/vendor/php-http/message/src/Stream/BufferedStream.php @@ -203,6 +203,9 @@ public function read($length) if (null === $this->resource) { throw new \RuntimeException('Cannot read on a detached stream'); } + if ($length < 0) { + throw new \InvalidArgumentException('Can not read a negative amount of bytes'); + } $read = ''; diff --git a/dist/vendor/professional-wiki/edtf/README.md b/dist/vendor/professional-wiki/edtf/README.md index 089ec0f50..2ffb04f38 100644 --- a/dist/vendor/professional-wiki/edtf/README.md +++ b/dist/vendor/professional-wiki/edtf/README.md @@ -114,6 +114,14 @@ You can also invoke PHPUnit directly to pass it arguments, as follows ## Release notes +### Version 2.0.2 - 2022-04-29 + +* Improved translations + +### Version 2.0.1 - 2022-02-19 + +* `?` is no longer recognized as valid date + ### Version 2.0.0 - 2021-04-28 * Fixed performance issue for sets with large range elements like `1000-01-01..2000-12-30` diff --git a/dist/vendor/professional-wiki/edtf/i18n/bn.json b/dist/vendor/professional-wiki/edtf/i18n/bn.json index b4953d58f..ff01041d5 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/bn.json +++ b/dist/vendor/professional-wiki/edtf/i18n/bn.json @@ -1,6 +1,7 @@ { "@metadata": { "authors": [ + "FARMER", "R4356th", "WikiAbuHuraira", "আফতাবুজ্জামান" diff --git a/dist/vendor/professional-wiki/edtf/i18n/de.json b/dist/vendor/professional-wiki/edtf/i18n/de.json index 3ca3c1da2..3d69467af 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/de.json +++ b/dist/vendor/professional-wiki/edtf/i18n/de.json @@ -1,6 +1,7 @@ { "@metadata": { "authors": [ + "CNRALux", "FF-11", "FF11", "Kghbln" @@ -77,5 +78,11 @@ "edtf-both-dates": "$1 und $2", "edtf-one-of-two-dates": "$1 oder $2", "edtf-inline-all-of-these": "Alle diese Angaben: $1", - "edtf-inline-one-of-these": "Eine dieser Angaben: $1" + "edtf-inline-one-of-these": "Eine dieser Angaben: $1", + "edtf-set-range-all-year": "Alle Jahre von $1 bis $2", + "edtf-set-range-all-month": "Alle Monate von $1 bis $2", + "edtf-set-range-all-day": "Alle Tage von $1 bis $2", + "edtf-set-range-one-year": "$1, $2 oder ein Jahr dazwischen", + "edtf-set-range-one-month": "$1, $2 oder ein Monat dazwischen", + "edtf-set-range-one-day": "$1, $2 oder ein Tag dazwischen" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/fr.json b/dist/vendor/professional-wiki/edtf/i18n/fr.json index 365617b8f..4f50a9c3d 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/fr.json +++ b/dist/vendor/professional-wiki/edtf/i18n/fr.json @@ -2,6 +2,7 @@ "@metadata": { "authors": [ "Gomoko", + "Raphoraph", "Verdy p" ] }, @@ -32,7 +33,7 @@ "edtf-semester-2": "Second semestre", "edtf-full-date": "$3 $2 $1", "edtf-season-and-year": "$1 $2", - "edtf-day-and-year": "$1e{{PLURAL:$1|r|}} jour d’un mois inconnu de $2", + "edtf-day-and-year": "$1e jour d’un mois inconnu de $2", "edtf-bc-year": "$1 avant J.-C.", "edtf-bc-year-short": "Année $1 avant J.-C.", "edtf-year-short": "Année $1", @@ -76,5 +77,11 @@ "edtf-both-dates": "$1 et $2", "edtf-one-of-two-dates": "$1 ou $2", "edtf-inline-all-of-these": "Tous celles-ci : $1", - "edtf-inline-one-of-these": "Une de celles-ci : $1" + "edtf-inline-one-of-these": "Une de celles-ci : $1", + "edtf-set-range-all-year": "Toutes les années de $1 à $2", + "edtf-set-range-all-month": "Tous les mois de $1 à $2", + "edtf-set-range-all-day": "Tous les jours du $1 au $2", + "edtf-set-range-one-year": "$1, $2 ou une année entre les deux", + "edtf-set-range-one-month": "$1, $2 ou un mois entre les deux", + "edtf-set-range-one-day": "$1, $2 ou un jour entre les deux" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/it.json b/dist/vendor/professional-wiki/edtf/i18n/it.json index b5a3f8210..5f2e93fb7 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/it.json +++ b/dist/vendor/professional-wiki/edtf/i18n/it.json @@ -39,5 +39,6 @@ "edtf-december": "Dicembre", "edtf-interval-normal": "$1 a $2", "edtf-both-dates": "$1 e $2", - "edtf-one-of-two-dates": "$1 o $2" + "edtf-one-of-two-dates": "$1 o $2", + "edtf-set-range-all-month": "Tutti i mesi da $1 a $2" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/ko.json b/dist/vendor/professional-wiki/edtf/i18n/ko.json index a3a85223f..d9de7d09b 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/ko.json +++ b/dist/vendor/professional-wiki/edtf/i18n/ko.json @@ -60,5 +60,11 @@ "edtf-both-dates": "$1 및 $2", "edtf-one-of-two-dates": "$1 또는 $2", "edtf-inline-all-of-these": "다음 중 모든 항목: $1", - "edtf-inline-one-of-these": "다음 중 하나: $1" + "edtf-inline-one-of-these": "다음 중 하나: $1", + "edtf-set-range-all-year": "모든 연도 ($1 ~ $2)", + "edtf-set-range-all-month": "모든 월 ($1 ~ $2)", + "edtf-set-range-all-day": "모든 일 ($1 ~ $2)", + "edtf-set-range-one-year": "$1, $2 또는 그 사이의 연도", + "edtf-set-range-one-month": "$1, $2 또는 그 사이의 월", + "edtf-set-range-one-day": "$1, $2 또는 그 사이의 일" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/lb.json b/dist/vendor/professional-wiki/edtf/i18n/lb.json new file mode 100644 index 000000000..f8da50820 --- /dev/null +++ b/dist/vendor/professional-wiki/edtf/i18n/lb.json @@ -0,0 +1,86 @@ +{ + "@metadata": { + "authors": [ + "CNRALux", + "Robby" + ] + }, + "edtf-description": "PHP Bibliothéik fir d'Verschaffen, d'Duerstellen an d'Schaffe mat Datumen no de Spezifikatioune vum „Extended Date/Time Format“ (EDTF)", + "edtf-maybe-circa": "Villäicht zirka $1", + "edtf-circa": "Zirka $1", + "edtf-maybe": "Villäicht $1", + "edtf-spring": "Fréijoer", + "edtf-summer": "Summer", + "edtf-autumn": "Hierscht", + "edtf-winter": "Wanter", + "edtf-spring-north": "Fréijoer (Nordhallefkugel)", + "edtf-summer-north": "Summer (Südhallefkugel)", + "edtf-autumn-north": "Hierscht (Nordhallefkugel)", + "edtf-winter-north": "Wanter (Nordhallefkugel)", + "edtf-spring-south": "Fréijoer (Südhallefkugel)", + "edtf-summer-south": "Summer (Südhallefkugel)", + "edtf-autumn-south": "Hierscht (Südhallefkugel)", + "edtf-winter-south": "Wanter (Südhallefkugel)", + "edtf-quarter-1": "Éischt Trimester", + "edtf-quarter-2": "Zweet Trimester", + "edtf-quarter-3": "Drëtt Trimester", + "edtf-quarter-4": "Véiert Trimester", + "edtf-quadrimester-1": "Éischt Quadrimester", + "edtf-quadrimester-2": "Zweet Quadrimester", + "edtf-quadrimester-3": "Drëtt Quadrimester", + "edtf-semester-1": "Éischt Semester", + "edtf-semester-2": "Zweet Semester", + "edtf-full-date": "$2 $3, $1", + "edtf-season-and-year": "$1 $2", + "edtf-day-and-year": "$1 vun engem onbekannte Mount, $2", + "edtf-bc-year": "$1 v. Chr.", + "edtf-bc-year-short": "Joer $1 v. Chr.", + "edtf-year-short": "Joer $1", + "edtf-january": "Januar", + "edtf-february": "Februar", + "edtf-march": "Mäerz", + "edtf-april": "Abrëll", + "edtf-may": "Mee", + "edtf-june": "Juni", + "edtf-july": "Juli", + "edtf-august": "August", + "edtf-september": "September", + "edtf-october": "Oktober", + "edtf-november": "November", + "edtf-december": "Dezember", + "edtf-interval-normal": "$1 bis $2", + "edtf-interval-open-end": "$1 oder méi spéit", + "edtf-interval-open-start": "$1 oder méi fréi", + "edtf-interval-unknown-end": "Vu(n) $1 bis onbekannt", + "edtf-interval-unknown-start": "Vun onbekannt bis $1", + "edtf-local-time": "Lokalzäit", + "edtf-empty-set": "Eidele Set", + "edtf-all-of-these": "All dës:", + "edtf-one-of-these": "Ee vun dësen:", + "edtf-year-and-all-earlier": "D'Joer $1 an all déi Joer virdrun", + "edtf-year-or-earlier": "D'Joer $1 oder iergende Joer virdrun", + "edtf-year-and-all-later": "D'Joer $1 an all déi Joer duerno", + "edtf-year-or-later": "D'Joer $1 oder iergende Joer duerno", + "edtf-month-and-all-earlier": "$1 an all Méint virdrun", + "edtf-month-and-all-later": "$1 an all Méint duerno", + "edtf-month-or-earlier": "$1 oder iergende Mount virdrun", + "edtf-month-or-later": "$1 oder iergende Mount duerno", + "edtf-day-and-all-earlier": "$1; an all Deeg virdrun", + "edtf-day-and-all-later": "$1, an all Deeg duerno", + "edtf-day-or-earlier": "$1, oder en Datum virdrun", + "edtf-day-or-later": "$1; oder en Datum duerno", + "edtf-season-or-earlier": "$1 oder iergendeng Joreszäit virdrun", + "edtf-season-or-later": "$1 oder iergendeng Joreszäit duerno", + "edtf-season-and-all-earlier": "$1 an all Joreszäiten virdrun", + "edtf-season-and-all-later": "$1 an all Joreszäiten duerno", + "edtf-both-dates": "$1 a(n) $2", + "edtf-one-of-two-dates": "$1 oder $2", + "edtf-inline-all-of-these": "All dës: $1", + "edtf-inline-one-of-these": "Ee vun dësen: $1", + "edtf-set-range-all-year": "All Joren vu(n) $1 bis $2", + "edtf-set-range-all-month": "All Méint vu(n) $1 bis $2", + "edtf-set-range-all-day": "All Deeg vu(n) $1 bis $2", + "edtf-set-range-one-year": "$1, $2 oder e Joer dertëscht", + "edtf-set-range-one-month": "$1, $2 oder e Mount dertëscht", + "edtf-set-range-one-day": "$1, $2 oder en Dag dertëscht" +} diff --git a/dist/vendor/professional-wiki/edtf/i18n/mk.json b/dist/vendor/professional-wiki/edtf/i18n/mk.json index 3ddde10f5..82ad933cc 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/mk.json +++ b/dist/vendor/professional-wiki/edtf/i18n/mk.json @@ -75,5 +75,11 @@ "edtf-both-dates": "$1 и $2", "edtf-one-of-two-dates": "$1 или $2", "edtf-inline-all-of-these": "Сите овие: $1", - "edtf-inline-one-of-these": "Едно од овие: $1" + "edtf-inline-one-of-these": "Едно од овие: $1", + "edtf-set-range-all-year": "Сите години од $1 до $2", + "edtf-set-range-all-month": "Сите месеци од $1 до $2", + "edtf-set-range-all-day": "Сите денови од $1 до $2", + "edtf-set-range-one-year": "$1, $2 или година помеѓу", + "edtf-set-range-one-month": "$1, $2 или месец помеѓу", + "edtf-set-range-one-day": "$1, $2 или ден помеѓу" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/nl.json b/dist/vendor/professional-wiki/edtf/i18n/nl.json index bb12b1c6a..caa85ad68 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/nl.json +++ b/dist/vendor/professional-wiki/edtf/i18n/nl.json @@ -1,6 +1,7 @@ { "@metadata": { "authors": [ + "Danieldegroot2", "DigitaalWerktuig", "Martsniez" ] @@ -57,7 +58,7 @@ "edtf-empty-set": "Lege set", "edtf-all-of-these": "Al deze data:", "edtf-one-of-these": "Eén van deze data:", - "edtf-year-and-all-earlier": "het jaar $1 and alle jaren daarvoor", + "edtf-year-and-all-earlier": "Het jaar $1 en alle jaren daarvoor", "edtf-year-or-earlier": "het jaar $1 of een eerder jaar", "edtf-year-and-all-later": "het jaar $1 en alle opvolgende jaren", "edtf-year-or-later": "het jaar $1 of een later jaar", @@ -76,5 +77,11 @@ "edtf-both-dates": "$1 en $2", "edtf-one-of-two-dates": "$1 of $2", "edtf-inline-all-of-these": "Al deze data: $1", - "edtf-inline-one-of-these": "Eén van deze data: $1" + "edtf-inline-one-of-these": "Eén van deze data: $1", + "edtf-set-range-all-year": "alle jaren van $1 tot $2", + "edtf-set-range-all-month": "alle maanden van $1 tot $2", + "edtf-set-range-all-day": "alle dagen van $1 tot $2", + "edtf-set-range-one-year": "$1, $2 of een jaar daar tussenin", + "edtf-set-range-one-month": "$1, $2 of een maand daar tussenin", + "edtf-set-range-one-day": "$1, $2 of een dag er tussenin" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/pt-br.json b/dist/vendor/professional-wiki/edtf/i18n/pt-br.json index d77d28fa3..722d2b3fa 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/pt-br.json +++ b/dist/vendor/professional-wiki/edtf/i18n/pt-br.json @@ -56,13 +56,30 @@ "edtf-empty-set": "Conjunto vazio", "edtf-all-of-these": "Todos esses:", "edtf-one-of-these": "Um desses:", + "edtf-year-and-all-earlier": "O ano $1 e todos os anos anteriores", + "edtf-year-or-earlier": "O ano $1 ou um ano anterior", "edtf-year-and-all-later": "O ano $1 e todos os anos posteriores", + "edtf-year-or-later": "O ano $1 ou um ano posterior", + "edtf-month-and-all-earlier": "$1 e todos os meses anteriores", + "edtf-month-and-all-later": "$1 e todos os meses posteriores", "edtf-month-or-earlier": "$1 ou um mês anterior", + "edtf-month-or-later": "$1 ou um mês posterior", "edtf-day-and-all-earlier": "$1; e todas as datas anteriores", + "edtf-day-and-all-later": "$1; e todas as datas posteriores", + "edtf-day-or-earlier": "$1; ou uma data anterior", + "edtf-day-or-later": "$1; ou uma data posterior", "edtf-season-or-earlier": "$1 ou uma temporada anterior", + "edtf-season-or-later": "$1 ou uma temporada posterior", + "edtf-season-and-all-earlier": "$1 e todas as estações anteriores", "edtf-season-and-all-later": "$1 e todas as temporadas posteriores", "edtf-both-dates": "$1 e $2", "edtf-one-of-two-dates": "$1 ou $2", "edtf-inline-all-of-these": "Todos esses: $1", - "edtf-inline-one-of-these": "Um desses: $1" + "edtf-inline-one-of-these": "Um desses: $1", + "edtf-set-range-all-year": "Todos os anos de $1 a $2", + "edtf-set-range-all-month": "Todos os meses de $1 a $2", + "edtf-set-range-all-day": "Todos os dias de $1 a $2", + "edtf-set-range-one-year": "$1, $2 ou um ano entre", + "edtf-set-range-one-month": "$1, $2 ou um mês entre", + "edtf-set-range-one-day": "$1, $2 ou um dia entre" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/qqq.json b/dist/vendor/professional-wiki/edtf/i18n/qqq.json index edcdfd136..409cc8861 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/qqq.json +++ b/dist/vendor/professional-wiki/edtf/i18n/qqq.json @@ -3,6 +3,7 @@ "authors": [ "Kghbln", "Martsniez", + "Robby", "Verdy p" ] }, @@ -10,9 +11,9 @@ "edtf-maybe-circa": "Approximate {{EdtfDate}} with uncertainty. $1 is a date", "edtf-circa": "Approximate {{EdtfDate}}. $1 is a date", "edtf-maybe": "{{EdtfDate}} with uncertainty. $1 is a date", - "edtf-spring": "Spring season, often combined with a year", + "edtf-spring": "Spring season, often combined with a year\n{{identical|Spring}}", "edtf-summer": "Summer season, often combined with a year", - "edtf-autumn": "Autumn season, often combined with a year", + "edtf-autumn": "Autumn season, often combined with a year\n{{identical|Autumn}}", "edtf-winter": "Winter season, often combined with a year", "edtf-spring-north": "Spring season in Northern Hemisphere of Earth", "edtf-summer-north": "Summer season in Northern Hemisphere of Earth", diff --git a/dist/vendor/professional-wiki/edtf/i18n/ru.json b/dist/vendor/professional-wiki/edtf/i18n/ru.json index b2286ed23..c93930206 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/ru.json +++ b/dist/vendor/professional-wiki/edtf/i18n/ru.json @@ -1,7 +1,9 @@ { "@metadata": { "authors": [ - "Kareyac" + "Kareyac", + "Lopusanski", + "Rivka Silinsky" ] }, "edtf-spring": "Весна", @@ -25,5 +27,7 @@ "edtf-december": "Декабрь", "edtf-local-time": "местное время", "edtf-both-dates": "$1 и $2", - "edtf-one-of-two-dates": "$1 или $2" + "edtf-one-of-two-dates": "$1 или $2", + "edtf-set-range-all-month": "Все месяцы от $1 до $2", + "edtf-set-range-all-day": "Все дни от $1 до $2" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/scn.json b/dist/vendor/professional-wiki/edtf/i18n/scn.json new file mode 100644 index 000000000..2c4e5675b --- /dev/null +++ b/dist/vendor/professional-wiki/edtf/i18n/scn.json @@ -0,0 +1,41 @@ +{ + "@metadata": { + "authors": [ + "Ajeje Brazorf" + ] + }, + "edtf-spring": "Primavera", + "edtf-summer": "Astati", + "edtf-autumn": "Autunnu", + "edtf-winter": "Mmernu", + "edtf-quarter-1": "Primu trimestri", + "edtf-quarter-2": "Secunnu trimestri", + "edtf-quarter-3": "Terzu trimestri", + "edtf-quarter-4": "Quartu trimestri", + "edtf-quadrimester-1": "Primu quatrimestri", + "edtf-quadrimester-2": "Secunnu quatrimestri", + "edtf-quadrimester-3": "Terzu quatrimestri", + "edtf-semester-1": "Primu simestri", + "edtf-semester-2": "Secunnu simestri", + "edtf-full-date": "$3 $2 $1", + "edtf-season-and-year": "$1 di $2", + "edtf-day-and-year": "$1 d'un misi scanusciutu $2", + "edtf-bc-year": "$1 a.C.", + "edtf-bc-year-short": "Annu $1 a.C.", + "edtf-year-short": "Annu $1", + "edtf-january": "jinnaru", + "edtf-february": "frivaru", + "edtf-march": "marzu", + "edtf-april": "aprili", + "edtf-may": "maiu", + "edtf-june": "giugnu", + "edtf-july": "giugnettu", + "edtf-august": "austu", + "edtf-september": "sittèmmiru", + "edtf-october": "uttùviru", + "edtf-november": "nuvèmmiru", + "edtf-december": "dicèmmiru", + "edtf-interval-normal": "$1 a $2", + "edtf-both-dates": "$1 e $2", + "edtf-one-of-two-dates": "$1 o $2" +} diff --git a/dist/vendor/professional-wiki/edtf/i18n/tr.json b/dist/vendor/professional-wiki/edtf/i18n/tr.json index 0fe0969c2..394f089b0 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/tr.json +++ b/dist/vendor/professional-wiki/edtf/i18n/tr.json @@ -75,5 +75,11 @@ "edtf-both-dates": "$1 ve $2", "edtf-one-of-two-dates": "$1 ya da $2", "edtf-inline-all-of-these": "Bunların hepsi: $1", - "edtf-inline-one-of-these": "Bunlardan biri: $1" + "edtf-inline-one-of-these": "Bunlardan biri: $1", + "edtf-set-range-all-year": "$1 ile $2 arası tüm yıllar", + "edtf-set-range-all-month": "$1 ile $2 arası tüm aylar", + "edtf-set-range-all-day": "$1 ile $2 arası tüm günler", + "edtf-set-range-one-year": "$1, $2 ya da arasında bir yıl", + "edtf-set-range-one-month": "$1, $2 ya da arasında bir ay", + "edtf-set-range-one-day": "$1, $2 ya da arasında bir gün" } diff --git a/dist/vendor/professional-wiki/edtf/i18n/uk.json b/dist/vendor/professional-wiki/edtf/i18n/uk.json new file mode 100644 index 000000000..1e82c665d --- /dev/null +++ b/dist/vendor/professional-wiki/edtf/i18n/uk.json @@ -0,0 +1,86 @@ +{ + "@metadata": { + "authors": [ + "DDPAT", + "Ice bulldog" + ] + }, + "edtf-description": "Бібліотека PHP для аналізу, представлення та роботи з датами, що відповідають специфікації розширеного формату дати/часу.", + "edtf-maybe-circa": "Можливо близько $1", + "edtf-circa": "Приблизно $1", + "edtf-maybe": "Можливо $1", + "edtf-spring": "Весна", + "edtf-summer": "Літо", + "edtf-autumn": "Осінь", + "edtf-winter": "Зима", + "edtf-spring-north": "Весна (Північна півкуля)", + "edtf-summer-north": "Літо (Північна півкуля)", + "edtf-autumn-north": "Осінь (Північна півкуля)", + "edtf-winter-north": "Зима (Північна півкуля)", + "edtf-spring-south": "Весна (Південна півкуля)", + "edtf-summer-south": "Літо (Південна півкуля)", + "edtf-autumn-south": "Осінь (Південна півкуля)", + "edtf-winter-south": "Зима (Південна півкуля)", + "edtf-quarter-1": "Перша чверть", + "edtf-quarter-2": "Друга чверт", + "edtf-quarter-3": "Третя чверть", + "edtf-quarter-4": "Четверта чверть", + "edtf-quadrimester-1": "Перший квадристер", + "edtf-quadrimester-2": "Другий квадристер", + "edtf-quadrimester-3": "Третій квадристер", + "edtf-semester-1": "Перший семестр", + "edtf-semester-2": "Другий семестр", + "edtf-full-date": "$2 $3, $1", + "edtf-season-and-year": "$1 $2", + "edtf-day-and-year": "$1 невідомого місяця, $2", + "edtf-bc-year": "$1 до н. е.", + "edtf-bc-year-short": "Рік $1 до н.е.", + "edtf-year-short": "Рік $1", + "edtf-january": "Січень", + "edtf-february": "Лютий", + "edtf-march": "Березень", + "edtf-april": "Квітень", + "edtf-may": "Травень", + "edtf-june": "Червень", + "edtf-july": "Липень", + "edtf-august": "Серпень", + "edtf-september": "Вересень", + "edtf-october": "Жовтень", + "edtf-november": "Листопад", + "edtf-december": "Грудень", + "edtf-interval-normal": "$1 до $2", + "edtf-interval-open-end": "$1 або пізніше", + "edtf-interval-open-start": "$1 або раніше", + "edtf-interval-unknown-end": "Від $1 до невідомого", + "edtf-interval-unknown-start": "Від невідомого до $1", + "edtf-local-time": "місцевий час", + "edtf-empty-set": "Порожній набір", + "edtf-all-of-these": "Все це:", + "edtf-one-of-these": "Один з цих:", + "edtf-year-and-all-earlier": "$1 рік і всі попередні роки", + "edtf-year-or-earlier": "Рік $1 або раніше", + "edtf-year-and-all-later": "$1 рік і всі наступні роки", + "edtf-year-or-later": "Рік $1 або пізніше", + "edtf-month-and-all-earlier": "$1 і всі попередні місяці", + "edtf-month-and-all-later": "$1 і всі пізніші місяці", + "edtf-month-or-earlier": "$1 або раніше місяця", + "edtf-month-or-later": "$1 або пізніше місяця", + "edtf-day-and-all-earlier": "$1; та всі попередні дати", + "edtf-day-and-all-later": "$1; і всі пізніші дати", + "edtf-day-or-earlier": "$1; або на більш ранню дату", + "edtf-day-or-later": "$1; або пізнішу дату", + "edtf-season-or-earlier": "$1 або найбільш ранній сезон", + "edtf-season-or-later": "$1 або пізніший сезон", + "edtf-season-and-all-earlier": "$1 і всі попередні сезони", + "edtf-season-and-all-later": "$1 і всі пізні сезони", + "edtf-both-dates": "$1 і $2", + "edtf-one-of-two-dates": "$1 або $2", + "edtf-inline-all-of-these": "Все це: $1", + "edtf-inline-one-of-these": "Один з цих: $1", + "edtf-set-range-all-year": "Усі роки від $1 на $2", + "edtf-set-range-all-month": "Усі місяці з $1 на $2", + "edtf-set-range-all-day": "Усі дні з $1 на $2", + "edtf-set-range-one-year": "$1, $2 або рік між ними", + "edtf-set-range-one-month": "$1, $2 або місяць між ними", + "edtf-set-range-one-day": "$1, $2 або днів між ними" +} diff --git a/dist/vendor/professional-wiki/edtf/i18n/zh-hans.json b/dist/vendor/professional-wiki/edtf/i18n/zh-hans.json index 478ba9eee..df04ea840 100644 --- a/dist/vendor/professional-wiki/edtf/i18n/zh-hans.json +++ b/dist/vendor/professional-wiki/edtf/i18n/zh-hans.json @@ -1,6 +1,7 @@ { "@metadata": { "authors": [ + "Grace03", "Hmgrmb" ] }, @@ -57,5 +58,11 @@ "edtf-both-dates": "$1和$2", "edtf-one-of-two-dates": "于$1和$2之间", "edtf-inline-all-of-these": "所有这些:$1", - "edtf-inline-one-of-these": "这些中的一个:$1" + "edtf-inline-one-of-these": "这些中的一个:$1", + "edtf-set-range-all-year": "整年从$1到$2", + "edtf-set-range-all-month": "每个月从$1到$2", + "edtf-set-range-all-day": "每一天从$1到$2", + "edtf-set-range-one-year": "$1,$2或者一年之间", + "edtf-set-range-one-month": "$1,$2或者一个月之间", + "edtf-set-range-one-day": "$1,$2或者一天之间" } diff --git a/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Humanizer/Strategy/EnglishStrategy.php b/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Humanizer/Strategy/EnglishStrategy.php index 50da81942..2b4c6fe65 100644 --- a/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Humanizer/Strategy/EnglishStrategy.php +++ b/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Humanizer/Strategy/EnglishStrategy.php @@ -9,7 +9,7 @@ public function applyOrdinalEnding( int $number ): string { return $number . 'th'; } - return $number . [ 'th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th' ][$number % 10]; + return $number . [ 'th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th' ][abs( $number ) % 10]; } public function monthUppercaseFirst(): bool { diff --git a/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Parser/Parser.php b/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Parser/Parser.php index 86db9f4d6..86a39b22f 100644 --- a/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Parser/Parser.php +++ b/dist/vendor/professional-wiki/edtf/src/PackagePrivate/Parser/Parser.php @@ -41,7 +41,7 @@ public function __construct() { public function parse( string $input ): self { $input = $this->removeExtraSpaces( $input ); - if ( "" === $input ) { + if ( $input === '' || $input === '?' ) { throw new InvalidArgumentException( "Can't create EDTF from empty string" ); } diff --git a/dist/vendor/react/promise/CHANGELOG.md b/dist/vendor/react/promise/CHANGELOG.md index 81ffffbb4..7f785eb5c 100644 --- a/dist/vendor/react/promise/CHANGELOG.md +++ b/dist/vendor/react/promise/CHANGELOG.md @@ -1,6 +1,30 @@ CHANGELOG for 2.x ================= +* 2.9.0 (2022-02-11) + + * Feature: Support union types and address deprecation of `ReflectionType::getClass()` (PHP 8+). + (#198 by @cdosoftei and @SimonFrings) + + ```php + $promise->otherwise(function (OverflowException|UnderflowException $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; + }); + ``` + + * Feature: Support intersection types (PHP 8.1+). + (#195 by @bzikarsky) + + ```php + $promise->otherwise(function (OverflowException&CacheException $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; + }); + ``` + + * Improve test suite, use GitHub actions for continuous integration (CI), + update to PHPUnit 9, and add full core team to the license. + (#174, #183, #186, and #201 by @SimonFrings and #211 by @clue) + * 2.8.0 (2020-05-12) * Mark `FulfilledPromise`, `RejectedPromise` and `LazyPromise` as deprecated for Promise v2 (and remove for Promise v3). diff --git a/dist/vendor/react/promise/LICENSE b/dist/vendor/react/promise/LICENSE index 5919d20ff..21c1357b7 100644 --- a/dist/vendor/react/promise/LICENSE +++ b/dist/vendor/react/promise/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2012-2016 Jan Sorgalla +The MIT License (MIT) + +Copyright (c) 2012 Jan Sorgalla, Christian Lück, Cees-Jan Kiewiet, Chris Boden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/dist/vendor/react/promise/README.md b/dist/vendor/react/promise/README.md index 6588c7247..d904a1d8f 100644 --- a/dist/vendor/react/promise/README.md +++ b/dist/vendor/react/promise/README.md @@ -4,8 +4,7 @@ Promise A lightweight implementation of [CommonJS Promises/A](http://wiki.commonjs.org/wiki/Promises/A) for PHP. -[![Build Status](https://travis-ci.org/reactphp/promise.svg?branch=master)](http://travis-ci.org/reactphp/promise) -[![Coverage Status](https://coveralls.io/repos/github/reactphp/promise/badge.svg?branch=master)](https://coveralls.io/github/reactphp/promise?branch=master) +[![CI status](https://github.com/reactphp/promise/workflows/CI/badge.svg?branch=2.x)](https://github.com/reactphp/promise/actions) Table of Contents ----------------- @@ -850,15 +849,14 @@ This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require react/promise:^2.8 +$ composer require react/promise:^2.9 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP -extensions and supports running on legacy PHP 5.4 through current PHP 7+ and HHVM. -It's *highly recommended to use PHP 7+* for this project due to its vast -performance improvements. +extensions and supports running on legacy PHP 5.4 through current PHP 8+ and HHVM. +It's *highly recommended to use the latest supported PHP version* for this project. Credits ------- diff --git a/dist/vendor/react/promise/composer.json b/dist/vendor/react/promise/composer.json index b3e723a7a..f933f1537 100644 --- a/dist/vendor/react/promise/composer.json +++ b/dist/vendor/react/promise/composer.json @@ -3,13 +3,32 @@ "description": "A lightweight implementation of CommonJS Promises/A for PHP", "license": "MIT", "authors": [ - {"name": "Jan Sorgalla", "email": "jsorgalla@gmail.com"} + { + "name": "Jan Sorgalla", + "homepage": "https://sorgalla.com/", + "email": "jsorgalla@gmail.com" + }, + { + "name": "Christian Lück", + "homepage": "https://clue.engineering/", + "email": "christian@clue.engineering" + }, + { + "name": "Cees-Jan Kiewiet", + "homepage": "https://wyrihaximus.net/", + "email": "reactphp@ceesjankiewiet.nl" + }, + { + "name": "Chris Boden", + "homepage": "https://cboden.dev/", + "email": "cboden@gmail.com" + } ], "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, "autoload": { "psr-4": { diff --git a/dist/vendor/react/promise/src/functions.php b/dist/vendor/react/promise/src/functions.php index bdbdf52d8..429f0e733 100644 --- a/dist/vendor/react/promise/src/functions.php +++ b/dist/vendor/react/promise/src/functions.php @@ -343,9 +343,65 @@ function _checkTypehint(callable $callback, $object) $expectedException = $parameters[0]; - if (!$expectedException->getClass()) { + // PHP before v8 used an easy API: + if (\PHP_VERSION_ID < 70100 || \defined('HHVM_VERSION')) { + if (!$expectedException->getClass()) { + return true; + } + + return $expectedException->getClass()->isInstance($object); + } + + // Extract the type of the argument and handle different possibilities + $type = $expectedException->getType(); + + $isTypeUnion = true; + $types = []; + + switch (true) { + case $type === null: + break; + case $type instanceof \ReflectionNamedType: + $types = [$type]; + break; + case $type instanceof \ReflectionIntersectionType: + $isTypeUnion = false; + case $type instanceof \ReflectionUnionType; + $types = $type->getTypes(); + break; + default: + throw new \LogicException('Unexpected return value of ReflectionParameter::getType'); + } + + // If there is no type restriction, it matches + if (empty($types)) { return true; } - return $expectedException->getClass()->isInstance($object); + foreach ($types as $type) { + if (!$type instanceof \ReflectionNamedType) { + throw new \LogicException('This implementation does not support groups of intersection or union types'); + } + + // A named-type can be either a class-name or a built-in type like string, int, array, etc. + $matches = ($type->isBuiltin() && \gettype($object) === $type->getName()) + || (new \ReflectionClass($type->getName()))->isInstance($object); + + + // If we look for a single match (union), we can return early on match + // If we look for a full match (intersection), we can return early on mismatch + if ($matches) { + if ($isTypeUnion) { + return true; + } + } else { + if (!$isTypeUnion) { + return false; + } + } + } + + // If we look for a single match (union) and did not return early, we matched no type and are false + // If we look for a full match (intersection) and did not return early, we matched all types and are true + return $isTypeUnion ? false : true; } diff --git a/dist/vendor/symfony/deprecation-contracts/LICENSE b/dist/vendor/symfony/deprecation-contracts/LICENSE index ad85e1737..406242ff2 100644 --- a/dist/vendor/symfony/deprecation-contracts/LICENSE +++ b/dist/vendor/symfony/deprecation-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-2021 Fabien Potencier +Copyright (c) 2020-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/vendor/symfony/options-resolver/LICENSE b/dist/vendor/symfony/options-resolver/LICENSE index 9ff2d0d63..88bf75bb4 100644 --- a/dist/vendor/symfony/options-resolver/LICENSE +++ b/dist/vendor/symfony/options-resolver/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2021 Fabien Potencier +Copyright (c) 2004-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/vendor/symfony/options-resolver/OptionsResolver.php b/dist/vendor/symfony/options-resolver/OptionsResolver.php index be80a9a84..3db291f99 100644 --- a/dist/vendor/symfony/options-resolver/OptionsResolver.php +++ b/dist/vendor/symfony/options-resolver/OptionsResolver.php @@ -437,7 +437,7 @@ public function isNested(string $option): bool * * @return $this */ - public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self + public function setDeprecated(string $option/* , string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self { if ($this->locked) { throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.'); diff --git a/dist/vendor/symfony/polyfill-php73/README.md b/dist/vendor/symfony/polyfill-php73/README.md index b3ebbce51..032fafbda 100644 --- a/dist/vendor/symfony/polyfill-php73/README.md +++ b/dist/vendor/symfony/polyfill-php73/README.md @@ -10,7 +10,7 @@ This component provides functions added to PHP 7.3 core: - [`JsonException`](https://php.net/JsonException) More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/dist/vendor/symfony/polyfill-php73/composer.json b/dist/vendor/symfony/polyfill-php73/composer.json index a7fe47875..af0cf42d2 100644 --- a/dist/vendor/symfony/polyfill-php73/composer.json +++ b/dist/vendor/symfony/polyfill-php73/composer.json @@ -26,7 +26,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/dist/vendor/symfony/translation-contracts/LICENSE b/dist/vendor/symfony/translation-contracts/LICENSE index 235841453..74cdc2dbf 100644 --- a/dist/vendor/symfony/translation-contracts/LICENSE +++ b/dist/vendor/symfony/translation-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2021 Fabien Potencier +Copyright (c) 2018-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/vendor/symfony/translation-contracts/Test/TranslatorTest.php b/dist/vendor/symfony/translation-contracts/Test/TranslatorTest.php index 890367657..a3e9b20af 100644 --- a/dist/vendor/symfony/translation-contracts/Test/TranslatorTest.php +++ b/dist/vendor/symfony/translation-contracts/Test/TranslatorTest.php @@ -362,7 +362,7 @@ protected function validateMatrix($nplural, $matrix, $expectSuccess = true) foreach ($matrix as $langCode => $data) { $indexes = array_flip($data); if ($expectSuccess) { - $this->assertEquals($nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + $this->assertCount($nplural, $indexes, "Langcode '$langCode' has '$nplural' plural forms."); } else { $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); } diff --git a/dist/vendor/symfony/translation/Command/TranslationPullCommand.php b/dist/vendor/symfony/translation/Command/TranslationPullCommand.php index 7045a9e69..e2e7c00dc 100644 --- a/dist/vendor/symfony/translation/Command/TranslationPullCommand.php +++ b/dist/vendor/symfony/translation/Command/TranslationPullCommand.php @@ -111,7 +111,7 @@ protected function configure() Full example: - php %command.full_name% provider --force --domains=messages,validators --locales=en + php %command.full_name% provider --force --domains=messages --domains=validators --locales=en This command pulls all translations associated with the messages and validators domains for the en locale. Local translations for the specified domains and locale are deleted if they're not present on the provider and overwritten if it's the case. @@ -142,7 +142,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int switch ($format) { case 'xlf20': $xliffVersion = '2.0'; - // no break + // no break case 'xlf12': $format = 'xlf'; } @@ -160,7 +160,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($force) { foreach ($providerTranslations->getCatalogues() as $catalogue) { - $operation = new TargetOperation((new MessageCatalogue($catalogue->getLocale())), $catalogue); + $operation = new TargetOperation(new MessageCatalogue($catalogue->getLocale()), $catalogue); if ($intlIcu) { $operation->moveMessagesToIntlDomainsIfPossible(); } diff --git a/dist/vendor/symfony/translation/Command/TranslationPushCommand.php b/dist/vendor/symfony/translation/Command/TranslationPushCommand.php index 628a06b3f..bf6e8c948 100644 --- a/dist/vendor/symfony/translation/Command/TranslationPushCommand.php +++ b/dist/vendor/symfony/translation/Command/TranslationPushCommand.php @@ -20,6 +20,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Translation\Provider\FilteringProvider; use Symfony\Component\Translation\Provider\TranslationProviderCollection; use Symfony\Component\Translation\Reader\TranslationReaderInterface; use Symfony\Component\Translation\TranslatorBag; @@ -103,7 +104,7 @@ protected function configure() Full example: - php %command.full_name% provider --force --delete-missing --domains=messages,validators --locales=en + php %command.full_name% provider --force --delete-missing --domains=messages --domains=validators --locales=en This command pushes all translations associated with the messages and validators domains for the en locale. Provider translations for the specified domains and locale are deleted if they're not present locally and overwritten if it's the case. @@ -130,6 +131,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int $force = $input->getOption('force'); $deleteMissing = $input->getOption('delete-missing'); + if (!$domains && $provider instanceof FilteringProvider) { + $domains = $provider->getDomains(); + } + + // Reading local translations must be done after retrieving the domains from the provider + // in order to manage only translations from configured domains $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths); if (!$domains) { diff --git a/dist/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/dist/vendor/symfony/translation/Dumper/IcuResFileDumper.php index cdc59913b..12a7a8cfc 100644 --- a/dist/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ b/dist/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -47,7 +47,7 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra $data .= pack('V', \strlen($target)) .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') .$this->writePadding($data) - ; + ; } $resOffset = $this->getPosition($data); @@ -56,7 +56,7 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra .$indexes .$this->writePadding($data) .$resources - ; + ; $bundleTop = $this->getPosition($data); diff --git a/dist/vendor/symfony/translation/Dumper/MoFileDumper.php b/dist/vendor/symfony/translation/Dumper/MoFileDumper.php index 54d0da875..f52206ee3 100644 --- a/dist/vendor/symfony/translation/Dumper/MoFileDumper.php +++ b/dist/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -62,7 +62,7 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra .$targetOffsets .$sources .$targets - ; + ; return $output; } diff --git a/dist/vendor/symfony/translation/LICENSE b/dist/vendor/symfony/translation/LICENSE index 9ff2d0d63..88bf75bb4 100644 --- a/dist/vendor/symfony/translation/LICENSE +++ b/dist/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2021 Fabien Potencier +Copyright (c) 2004-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/vendor/symfony/translation/Loader/PhpFileLoader.php b/dist/vendor/symfony/translation/Loader/PhpFileLoader.php index 85f10902b..40f64db27 100644 --- a/dist/vendor/symfony/translation/Loader/PhpFileLoader.php +++ b/dist/vendor/symfony/translation/Loader/PhpFileLoader.php @@ -25,7 +25,7 @@ class PhpFileLoader extends FileLoader */ protected function loadResource(string $resource) { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { + if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { self::$cache = null; } diff --git a/dist/vendor/symfony/translation/MessageCatalogue.php b/dist/vendor/symfony/translation/MessageCatalogue.php index ff49b5a97..9da3b7f00 100644 --- a/dist/vendor/symfony/translation/MessageCatalogue.php +++ b/dist/vendor/symfony/translation/MessageCatalogue.php @@ -155,19 +155,14 @@ public function replace(array $messages, string $domain = 'messages') */ public function add(array $messages, string $domain = 'messages') { - if (!isset($this->messages[$domain])) { - $this->messages[$domain] = []; - } - $intlDomain = $domain; - if (!str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { - $intlDomain .= self::INTL_DOMAIN_SUFFIX; - } + $altDomain = str_ends_with($domain, self::INTL_DOMAIN_SUFFIX) ? substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)) : $domain.self::INTL_DOMAIN_SUFFIX; foreach ($messages as $id => $message) { - if (isset($this->messages[$intlDomain]) && \array_key_exists($id, $this->messages[$intlDomain])) { - $this->messages[$intlDomain][$id] = $message; - } else { - $this->messages[$domain][$id] = $message; - } + unset($this->messages[$altDomain][$id]); + $this->messages[$domain][$id] = $message; + } + + if ([] === ($this->messages[$altDomain] ?? null)) { + unset($this->messages[$altDomain]); } } diff --git a/dist/vendor/symfony/translation/PseudoLocalizationTranslator.php b/dist/vendor/symfony/translation/PseudoLocalizationTranslator.php index 3fdc1aa4d..c769bdad0 100644 --- a/dist/vendor/symfony/translation/PseudoLocalizationTranslator.php +++ b/dist/vendor/symfony/translation/PseudoLocalizationTranslator.php @@ -123,7 +123,7 @@ private function getParts(string $originalTrans): array return [[true, true, $originalTrans]]; } - $html = mb_convert_encoding($originalTrans, 'HTML-ENTITIES', mb_detect_encoding($originalTrans, null, true) ?: 'UTF-8'); + $html = mb_encode_numericentity($originalTrans, [0x80, 0xFFFF, 0, 0xFFFF], mb_detect_encoding($originalTrans, null, true) ?: 'UTF-8'); $useInternalErrors = libxml_use_internal_errors(true); @@ -283,7 +283,7 @@ private function expand(string &$trans, string $visibleText): void } $visibleLength = $this->strlen($visibleText); - $missingLength = (int) (ceil($visibleLength * $this->expansionFactor)) - $visibleLength; + $missingLength = (int) ceil($visibleLength * $this->expansionFactor) - $visibleLength; if ($this->brackets) { $missingLength -= 2; } diff --git a/dist/vendor/symfony/translation/Resources/data/parents.json b/dist/vendor/symfony/translation/Resources/data/parents.json index 288f16300..32a33cdaf 100644 --- a/dist/vendor/symfony/translation/Resources/data/parents.json +++ b/dist/vendor/symfony/translation/Resources/data/parents.json @@ -54,6 +54,7 @@ "en_MS": "en_001", "en_MT": "en_001", "en_MU": "en_001", + "en_MV": "en_001", "en_MW": "en_001", "en_MY": "en_001", "en_NA": "en_001", @@ -116,6 +117,8 @@ "es_UY": "es_419", "es_VE": "es_419", "ff_Adlm": "root", + "hi_Latn": "en_IN", + "ks_Deva": "root", "nb": "no", "nn": "no", "pa_Arab": "root", diff --git a/dist/vendor/symfony/translation/Test/ProviderTestCase.php b/dist/vendor/symfony/translation/Test/ProviderTestCase.php index 238fd967e..4eb08604b 100644 --- a/dist/vendor/symfony/translation/Test/ProviderTestCase.php +++ b/dist/vendor/symfony/translation/Test/ProviderTestCase.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Translation\Test; -use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\HttpClient\MockHttpClient; @@ -55,17 +54,11 @@ protected function getClient(): MockHttpClient return $this->client ?? $this->client = new MockHttpClient(); } - /** - * @return LoaderInterface&MockObject - */ protected function getLoader(): LoaderInterface { return $this->loader ?? $this->loader = $this->createMock(LoaderInterface::class); } - /** - * @return LoaderInterface&MockObject - */ protected function getLogger(): LoggerInterface { return $this->logger ?? $this->logger = $this->createMock(LoggerInterface::class); @@ -76,9 +69,6 @@ protected function getDefaultLocale(): string return $this->defaultLocale ?? $this->defaultLocale = 'en'; } - /** - * @return LoaderInterface&MockObject - */ protected function getXliffFileDumper(): XliffFileDumper { return $this->xliffFileDumper ?? $this->xliffFileDumper = $this->createMock(XliffFileDumper::class); diff --git a/dist/vendor/symfony/translation/TranslatorBag.php b/dist/vendor/symfony/translation/TranslatorBag.php index 6d98455e5..555a9e814 100644 --- a/dist/vendor/symfony/translation/TranslatorBag.php +++ b/dist/vendor/symfony/translation/TranslatorBag.php @@ -94,7 +94,10 @@ public function intersect(TranslatorBagInterface $intersectBag): self $obsoleteCatalogue = new MessageCatalogue($locale); foreach ($operation->getDomains() as $domain) { - $obsoleteCatalogue->add($operation->getObsoleteMessages($domain), $domain); + $obsoleteCatalogue->add( + array_diff($operation->getMessages($domain), $operation->getNewMessages($domain)), + $domain + ); } $diff->addCatalogue($obsoleteCatalogue); diff --git a/dist/vendor/webmozart/assert/.editorconfig b/dist/vendor/webmozart/assert/.editorconfig deleted file mode 100644 index 384453bfb..000000000 --- a/dist/vendor/webmozart/assert/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -charset=utf-8 -end_of_line=lf -trim_trailing_whitespace=true -insert_final_newline=true -indent_style=space -indent_size=4 - -[*.yml] -indent_size=2 diff --git a/dist/vendor/webmozart/assert/.github/workflows/ci.yaml b/dist/vendor/webmozart/assert/.github/workflows/ci.yaml deleted file mode 100644 index 636fc5ab5..000000000 --- a/dist/vendor/webmozart/assert/.github/workflows/ci.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# https://docs.github.com/en/actions - -name: "CI" - -on: - pull_request: ~ - push: - branches: - - "master" - -env: - COMPOSER_ROOT_VERSION: 1.99 - -jobs: - coding-standards: - name: "Coding Standards" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - tools: "composer-normalize" - - - name: "Validate composer.json" - run: "composer validate --strict" - - - name: "Normalize composer.json" - run: "composer-normalize --dry-run" - - - name: "PHP-CS-Fixer" - uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0" - with: - args: "--dry-run --diff-format udiff" - - static-code-analysis: - name: "Static Code Analysis" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress && composer i --working-dir=ci" - - - name: "Run vimeo/psalm" - run: "ci/vendor/bin/psalm --threads=4" - - tests: - name: "Tests" - - runs-on: "ubuntu-latest" - - strategy: - matrix: - php-version: - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit" - - windows-tests: - name: "Windows tests" - - runs-on: "windows-latest" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit tests/AssertTest.php" diff --git a/dist/vendor/webmozart/assert/.php_cs b/dist/vendor/webmozart/assert/.php_cs deleted file mode 100644 index f7afd3ed7..000000000 --- a/dist/vendor/webmozart/assert/.php_cs +++ /dev/null @@ -1,24 +0,0 @@ -in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules([ - '@PSR2' => true, - '@Symfony' => true, - 'ordered_imports' => true, - 'array_syntax' => ['syntax' => 'long'], - 'no_superfluous_phpdoc_tags' => false, - 'phpdoc_annotation_without_dot' => false, - 'phpdoc_types_order' => false, - 'phpdoc_summary' => false, - 'phpdoc_to_comment' => false, - 'phpdoc_align' => false, - 'yoda_style' => false, - ]) - ->setFinder($finder) -; diff --git a/dist/vendor/webmozart/assert/CHANGELOG.md b/dist/vendor/webmozart/assert/CHANGELOG.md index 8629248bb..56c8011de 100644 --- a/dist/vendor/webmozart/assert/CHANGELOG.md +++ b/dist/vendor/webmozart/assert/CHANGELOG.md @@ -3,6 +3,23 @@ Changelog ## UNRELEASED +## 1.11.0 + +### Added + +* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support. + +### Changed + +* Trait methods will now check the assertion themselves, instead of using `__callStatic` +* `isList` will now deal correctly with (modified) lists that contain `NaN` +* `reportInvalidArgument` now has a return type of `never`. + +### Removed + +* Removed `symfony/polyfill-ctype` as a dependency, and require `ext-cytpe` instead. + * You can still require the `symfony/polyfill-ctype` in your project if you need it, as it provides `ext-ctype` + ## 1.10.0 ### Added diff --git a/dist/vendor/webmozart/assert/README.md b/dist/vendor/webmozart/assert/README.md index b85d59817..3b2397a1a 100644 --- a/dist/vendor/webmozart/assert/README.md +++ b/dist/vendor/webmozart/assert/README.md @@ -43,8 +43,8 @@ Installation Use [Composer] to install the package: -``` -$ composer require webmozart/assert +```bash +composer require webmozart/assert ``` Example diff --git a/dist/vendor/webmozart/assert/composer.json b/dist/vendor/webmozart/assert/composer.json index cfae60e5c..b340452c7 100644 --- a/dist/vendor/webmozart/assert/composer.json +++ b/dist/vendor/webmozart/assert/composer.json @@ -1,12 +1,12 @@ { "name": "webmozart/assert", "description": "Assertions to validate method input/output with nice error messages.", + "license": "MIT", "keywords": [ "assert", "check", "validate" ], - "license": "MIT", "authors": [ { "name": "Bernhard Schussek", @@ -15,19 +15,14 @@ ], "require": { "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" + "ext-ctype": "*" }, "require-dev": { "phpunit/phpunit": "^8.5.13" }, - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "autoload": { "psr-4": { @@ -39,5 +34,10 @@ "Webmozart\\Assert\\Tests\\": "tests/", "Webmozart\\Assert\\Bin\\": "bin/src" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } } } diff --git a/dist/vendor/webmozart/assert/psalm.xml b/dist/vendor/webmozart/assert/psalm.xml deleted file mode 100644 index 9a4300819..000000000 --- a/dist/vendor/webmozart/assert/psalm.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/dist/vendor/webmozart/assert/src/Assert.php b/dist/vendor/webmozart/assert/src/Assert.php index e0fbabc86..db1f3a51a 100644 --- a/dist/vendor/webmozart/assert/src/Assert.php +++ b/dist/vendor/webmozart/assert/src/Assert.php @@ -463,7 +463,7 @@ public static function isInstanceOfAny($value, array $classes, $message = '') static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of any of %2$s. Got: %s', static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) + \implode(', ', \array_map(array(static::class, 'valueToString'), $classes)) )); } @@ -485,8 +485,8 @@ public static function isAOf($value, $class, $message = '') if (!\is_a($value, $class, \is_string($value))) { static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s', - static::typeToString($value), + $message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s', + static::valueToString($value), $class )); } @@ -511,8 +511,8 @@ public static function isNotA($value, $class, $message = '') if (\is_a($value, $class, \is_string($value))) { static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), + $message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', + static::valueToString($value), $class )); } @@ -539,9 +539,9 @@ public static function isAnyOf($value, array $classes, $message = '') } static::reportInvalidArgument(sprintf( - $message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) + $message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s', + static::valueToString($value), + \implode(', ', $classes) )); } @@ -975,7 +975,7 @@ public static function inArray($value, array $values, $message = '') static::reportInvalidArgument(\sprintf( $message ?: 'Expected one of: %2$s. Got: %s', static::valueToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $values)) + \implode(', ', \array_map(array(static::class, 'valueToString'), $values)) )); } } @@ -1822,11 +1822,24 @@ public static function countBetween($array, $min, $max, $message = '') */ public static function isList($array, $message = '') { - if (!\is_array($array) || $array !== \array_values($array)) { + if (!\is_array($array)) { static::reportInvalidArgument( $message ?: 'Expected list - non-associative array.' ); } + + if ($array === \array_values($array)) { + return; + } + + $nextKey = -1; + foreach ($array as $k => $v) { + if ($k !== ++$nextKey) { + static::reportInvalidArgument( + $message ?: 'Expected list - non-associative array.' + ); + } + } } /** @@ -1955,7 +1968,7 @@ public static function __callStatic($name, $arguments) if ('nullOr' === \substr($name, 0, 6)) { if (null !== $arguments[0]) { $method = \lcfirst(\substr($name, 6)); - \call_user_func_array(array('static', $method), $arguments); + \call_user_func_array(array(static::class, $method), $arguments); } return; @@ -1970,7 +1983,7 @@ public static function __callStatic($name, $arguments) foreach ($arguments[0] as $entry) { $args[0] = $entry; - \call_user_func_array(array('static', $method), $args); + \call_user_func_array(array(static::class, $method), $args); } return; @@ -2054,6 +2067,7 @@ protected static function strlen($value) * @throws InvalidArgumentException * * @psalm-pure this method is not supposed to perform side-effects + * @psalm-return never */ protected static function reportInvalidArgument($message) { diff --git a/dist/vendor/webmozart/assert/src/Mixin.php b/dist/vendor/webmozart/assert/src/Mixin.php index 5e98823d4..0f0a75e33 100644 --- a/dist/vendor/webmozart/assert/src/Mixin.php +++ b/dist/vendor/webmozart/assert/src/Mixin.php @@ -1,9 +1,5 @@ $value * * @param mixed $value * @param string $message @@ -60,14 +60,18 @@ public static function allString($value, $message = '') * * @return void */ - public static function nullOrStringNotEmpty($value, $message = '') + public static function allNullOrString($value, $message = '') { - static::__callStatic('nullOrStringNotEmpty', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::string($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert non-empty-string|null $value * * @param mixed $value * @param string $message @@ -76,14 +80,14 @@ public static function nullOrStringNotEmpty($value, $message = '') * * @return void */ - public static function allStringNotEmpty($value, $message = '') + public static function nullOrStringNotEmpty($value, $message = '') { - static::__callStatic('allStringNotEmpty', array($value, $message)); + null === $value || static::stringNotEmpty($value, $message); } /** * @psalm-pure - * @psalm-assert int|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -92,14 +96,18 @@ public static function allStringNotEmpty($value, $message = '') * * @return void */ - public static function nullOrInteger($value, $message = '') + public static function allStringNotEmpty($value, $message = '') { - static::__callStatic('nullOrInteger', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::stringNotEmpty($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -108,14 +116,18 @@ public static function nullOrInteger($value, $message = '') * * @return void */ - public static function allInteger($value, $message = '') + public static function allNullOrStringNotEmpty($value, $message = '') { - static::__callStatic('allInteger', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::stringNotEmpty($entry, $message); + } } /** * @psalm-pure - * @psalm-assert numeric|null $value + * @psalm-assert int|null $value * * @param mixed $value * @param string $message @@ -124,14 +136,14 @@ public static function allInteger($value, $message = '') * * @return void */ - public static function nullOrIntegerish($value, $message = '') + public static function nullOrInteger($value, $message = '') { - static::__callStatic('nullOrIntegerish', array($value, $message)); + null === $value || static::integer($value, $message); } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -140,14 +152,18 @@ public static function nullOrIntegerish($value, $message = '') * * @return void */ - public static function allIntegerish($value, $message = '') + public static function allInteger($value, $message = '') { - static::__callStatic('allIntegerish', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::integer($entry, $message); + } } /** * @psalm-pure - * @psalm-assert positive-int|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -156,14 +172,18 @@ public static function allIntegerish($value, $message = '') * * @return void */ - public static function nullOrPositiveInteger($value, $message = '') + public static function allNullOrInteger($value, $message = '') { - static::__callStatic('nullOrPositiveInteger', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::integer($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert numeric|null $value * * @param mixed $value * @param string $message @@ -172,14 +192,14 @@ public static function nullOrPositiveInteger($value, $message = '') * * @return void */ - public static function allPositiveInteger($value, $message = '') + public static function nullOrIntegerish($value, $message = '') { - static::__callStatic('allPositiveInteger', array($value, $message)); + null === $value || static::integerish($value, $message); } /** * @psalm-pure - * @psalm-assert float|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -188,14 +208,18 @@ public static function allPositiveInteger($value, $message = '') * * @return void */ - public static function nullOrFloat($value, $message = '') + public static function allIntegerish($value, $message = '') { - static::__callStatic('nullOrFloat', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::integerish($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -204,14 +228,18 @@ public static function nullOrFloat($value, $message = '') * * @return void */ - public static function allFloat($value, $message = '') + public static function allNullOrIntegerish($value, $message = '') { - static::__callStatic('allFloat', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::integerish($entry, $message); + } } /** * @psalm-pure - * @psalm-assert numeric|null $value + * @psalm-assert positive-int|null $value * * @param mixed $value * @param string $message @@ -220,14 +248,14 @@ public static function allFloat($value, $message = '') * * @return void */ - public static function nullOrNumeric($value, $message = '') + public static function nullOrPositiveInteger($value, $message = '') { - static::__callStatic('nullOrNumeric', array($value, $message)); + null === $value || static::positiveInteger($value, $message); } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -236,14 +264,18 @@ public static function nullOrNumeric($value, $message = '') * * @return void */ - public static function allNumeric($value, $message = '') + public static function allPositiveInteger($value, $message = '') { - static::__callStatic('allNumeric', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::positiveInteger($entry, $message); + } } /** * @psalm-pure - * @psalm-assert positive-int|0|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -252,14 +284,18 @@ public static function allNumeric($value, $message = '') * * @return void */ - public static function nullOrNatural($value, $message = '') + public static function allNullOrPositiveInteger($value, $message = '') { - static::__callStatic('nullOrNatural', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::positiveInteger($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert float|null $value * * @param mixed $value * @param string $message @@ -268,14 +304,14 @@ public static function nullOrNatural($value, $message = '') * * @return void */ - public static function allNatural($value, $message = '') + public static function nullOrFloat($value, $message = '') { - static::__callStatic('allNatural', array($value, $message)); + null === $value || static::float($value, $message); } /** * @psalm-pure - * @psalm-assert bool|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -284,14 +320,18 @@ public static function allNatural($value, $message = '') * * @return void */ - public static function nullOrBoolean($value, $message = '') + public static function allFloat($value, $message = '') { - static::__callStatic('nullOrBoolean', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::float($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -300,14 +340,18 @@ public static function nullOrBoolean($value, $message = '') * * @return void */ - public static function allBoolean($value, $message = '') + public static function allNullOrFloat($value, $message = '') { - static::__callStatic('allBoolean', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::float($entry, $message); + } } /** * @psalm-pure - * @psalm-assert scalar|null $value + * @psalm-assert numeric|null $value * * @param mixed $value * @param string $message @@ -316,14 +360,14 @@ public static function allBoolean($value, $message = '') * * @return void */ - public static function nullOrScalar($value, $message = '') + public static function nullOrNumeric($value, $message = '') { - static::__callStatic('nullOrScalar', array($value, $message)); + null === $value || static::numeric($value, $message); } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -332,14 +376,18 @@ public static function nullOrScalar($value, $message = '') * * @return void */ - public static function allScalar($value, $message = '') + public static function allNumeric($value, $message = '') { - static::__callStatic('allScalar', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::numeric($entry, $message); + } } /** * @psalm-pure - * @psalm-assert object|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -348,14 +396,18 @@ public static function allScalar($value, $message = '') * * @return void */ - public static function nullOrObject($value, $message = '') + public static function allNullOrNumeric($value, $message = '') { - static::__callStatic('nullOrObject', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::numeric($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert positive-int|0|null $value * * @param mixed $value * @param string $message @@ -364,48 +416,54 @@ public static function nullOrObject($value, $message = '') * * @return void */ - public static function allObject($value, $message = '') + public static function nullOrNatural($value, $message = '') { - static::__callStatic('allObject', array($value, $message)); + null === $value || static::natural($value, $message); } /** * @psalm-pure - * @psalm-assert resource|null $value + * @psalm-assert iterable $value * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrResource($value, $type = null, $message = '') + public static function allNatural($value, $message = '') { - static::__callStatic('nullOrResource', array($value, $type, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::natural($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allResource($value, $type = null, $message = '') + public static function allNullOrNatural($value, $message = '') { - static::__callStatic('allResource', array($value, $type, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::natural($entry, $message); + } } /** * @psalm-pure - * @psalm-assert callable|null $value + * @psalm-assert bool|null $value * * @param mixed $value * @param string $message @@ -414,14 +472,14 @@ public static function allResource($value, $type = null, $message = '') * * @return void */ - public static function nullOrIsCallable($value, $message = '') + public static function nullOrBoolean($value, $message = '') { - static::__callStatic('nullOrIsCallable', array($value, $message)); + null === $value || static::boolean($value, $message); } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -430,14 +488,18 @@ public static function nullOrIsCallable($value, $message = '') * * @return void */ - public static function allIsCallable($value, $message = '') + public static function allBoolean($value, $message = '') { - static::__callStatic('allIsCallable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::boolean($entry, $message); + } } /** * @psalm-pure - * @psalm-assert array|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -446,14 +508,18 @@ public static function allIsCallable($value, $message = '') * * @return void */ - public static function nullOrIsArray($value, $message = '') + public static function allNullOrBoolean($value, $message = '') { - static::__callStatic('nullOrIsArray', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::boolean($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert scalar|null $value * * @param mixed $value * @param string $message @@ -462,16 +528,14 @@ public static function nullOrIsArray($value, $message = '') * * @return void */ - public static function allIsArray($value, $message = '') + public static function nullOrScalar($value, $message = '') { - static::__callStatic('allIsArray', array($value, $message)); + null === $value || static::scalar($value, $message); } /** * @psalm-pure - * @psalm-assert iterable|null $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -480,16 +544,18 @@ public static function allIsArray($value, $message = '') * * @return void */ - public static function nullOrIsTraversable($value, $message = '') + public static function allScalar($value, $message = '') { - static::__callStatic('nullOrIsTraversable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::scalar($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -498,14 +564,18 @@ public static function nullOrIsTraversable($value, $message = '') * * @return void */ - public static function allIsTraversable($value, $message = '') + public static function allNullOrScalar($value, $message = '') { - static::__callStatic('allIsTraversable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::scalar($entry, $message); + } } /** * @psalm-pure - * @psalm-assert array|ArrayAccess|null $value + * @psalm-assert object|null $value * * @param mixed $value * @param string $message @@ -514,14 +584,14 @@ public static function allIsTraversable($value, $message = '') * * @return void */ - public static function nullOrIsArrayAccessible($value, $message = '') + public static function nullOrObject($value, $message = '') { - static::__callStatic('nullOrIsArrayAccessible', array($value, $message)); + null === $value || static::object($value, $message); } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -530,14 +600,18 @@ public static function nullOrIsArrayAccessible($value, $message = '') * * @return void */ - public static function allIsArrayAccessible($value, $message = '') + public static function allObject($value, $message = '') { - static::__callStatic('allIsArrayAccessible', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::object($entry, $message); + } } /** * @psalm-pure - * @psalm-assert countable|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -546,208 +620,671 @@ public static function allIsArrayAccessible($value, $message = '') * * @return void */ - public static function nullOrIsCountable($value, $message = '') + public static function allNullOrObject($value, $message = '') { - static::__callStatic('nullOrIsCountable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::object($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert resource|null $value * - * @param mixed $value - * @param string $message + * @param mixed $value + * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsCountable($value, $message = '') + public static function nullOrResource($value, $type = null, $message = '') { - static::__callStatic('allIsCountable', array($value, $message)); + null === $value || static::resource($value, $type, $message); } /** * @psalm-pure - * @psalm-assert iterable|null $value + * @psalm-assert iterable $value * - * @param mixed $value - * @param string $message + * @param mixed $value + * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrIsIterable($value, $message = '') + public static function allResource($value, $type = null, $message = '') { - static::__callStatic('nullOrIsIterable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::resource($entry, $type, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value + * @psalm-assert iterable $value * - * @param mixed $value - * @param string $message + * @param mixed $value + * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsIterable($value, $message = '') + public static function allNullOrResource($value, $type = null, $message = '') { - static::__callStatic('allIsIterable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::resource($entry, $type, $message); + } } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|null $value + * @psalm-assert callable|null $value * - * @param mixed $value - * @param string|object $class - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrIsInstanceOf($value, $class, $message = '') + public static function nullOrIsCallable($value, $message = '') { - static::__callStatic('nullOrIsInstanceOf', array($value, $class, $message)); + null === $value || static::isCallable($value, $message); } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value + * @psalm-assert iterable $value * - * @param mixed $value - * @param string|object $class - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsInstanceOf($value, $class, $message = '') + public static function allIsCallable($value, $message = '') { - static::__callStatic('allIsInstanceOf', array($value, $class, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::isCallable($entry, $message); + } } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class + * @psalm-assert iterable $value * - * @param mixed $value - * @param string|object $class - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrNotInstanceOf($value, $class, $message = '') + public static function allNullOrIsCallable($value, $message = '') { - static::__callStatic('nullOrNotInstanceOf', array($value, $class, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isCallable($entry, $message); + } } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class + * @psalm-assert array|null $value * - * @param mixed $value - * @param string|object $class - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allNotInstanceOf($value, $class, $message = '') + public static function nullOrIsArray($value, $message = '') { - static::__callStatic('allNotInstanceOf', array($value, $class, $message)); + null === $value || static::isArray($value, $message); } /** * @psalm-pure - * @psalm-param array $classes + * @psalm-assert iterable $value * - * @param mixed $value - * @param array $classes - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrIsInstanceOfAny($value, $classes, $message = '') + public static function allIsArray($value, $message = '') { - static::__callStatic('nullOrIsInstanceOfAny', array($value, $classes, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::isArray($entry, $message); + } } /** * @psalm-pure - * @psalm-param array $classes + * @psalm-assert iterable $value * - * @param mixed $value - * @param array $classes - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsInstanceOfAny($value, $classes, $message = '') + public static function allNullOrIsArray($value, $message = '') { - static::__callStatic('allIsInstanceOfAny', array($value, $classes, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isArray($entry, $message); + } } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string|null $value + * @psalm-assert iterable|null $value * - * @param object|string|null $value - * @param string $class - * @param string $message + * @deprecated use "isIterable" or "isInstanceOf" instead + * + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrIsAOf($value, $class, $message = '') + public static function nullOrIsTraversable($value, $message = '') { - static::__callStatic('nullOrIsAOf', array($value, $class, $message)); + null === $value || static::isTraversable($value, $message); } /** * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable> $value + * @psalm-assert iterable $value * - * @param iterable $value - * @param string $class - * @param string $message + * @deprecated use "isIterable" or "isInstanceOf" instead + * + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsAOf($value, $class, $message = '') + public static function allIsTraversable($value, $message = '') { - static::__callStatic('allIsAOf', array($value, $class, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::isTraversable($entry, $message); + } } /** * @psalm-pure - * @psalm-template UnexpectedType of object + * @psalm-assert iterable $value + * + * @deprecated use "isIterable" or "isInstanceOf" instead + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsTraversable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isTraversable($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert array|ArrayAccess|null $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsArrayAccessible($value, $message = '') + { + null === $value || static::isArrayAccessible($value, $message); + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsArrayAccessible($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isArrayAccessible($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsArrayAccessible($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isArrayAccessible($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert countable|null $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsCountable($value, $message = '') + { + null === $value || static::isCountable($value, $message); + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsCountable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isCountable($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsCountable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isCountable($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable|null $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsIterable($value, $message = '') + { + null === $value || static::isIterable($value, $message); + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsIterable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isIterable($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsIterable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isIterable($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert ExpectedType|null $value + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsInstanceOf($value, $class, $message = '') + { + null === $value || static::isInstanceOf($value, $class, $message); + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsInstanceOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isInstanceOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsInstanceOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isInstanceOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrNotInstanceOf($value, $class, $message = '') + { + null === $value || static::notInstanceOf($value, $class, $message); + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNotInstanceOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::notInstanceOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotInstanceOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notInstanceOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param mixed $value + * @param array $classes + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsInstanceOfAny($value, $classes, $message = '') + { + null === $value || static::isInstanceOfAny($value, $classes, $message); + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param mixed $value + * @param array $classes + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsInstanceOfAny($value, $classes, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isInstanceOfAny($entry, $classes, $message); + } + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param mixed $value + * @param array $classes + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsInstanceOfAny($value, $classes, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isInstanceOfAny($entry, $classes, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert ExpectedType|class-string|null $value + * + * @param object|string|null $value + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsAOf($value, $class, $message = '') + { + null === $value || static::isAOf($value, $class, $message); + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable> $value + * + * @param iterable $value + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsAOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isAOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable|null> $value + * + * @param iterable $value + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsAOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isAOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template UnexpectedType of object * @psalm-param class-string $class * * @param object|string|null $value @@ -760,7 +1297,7 @@ public static function allIsAOf($value, $class, $message = '') */ public static function nullOrIsNotA($value, $class, $message = '') { - static::__callStatic('nullOrIsNotA', array($value, $class, $message)); + null === $value || static::isNotA($value, $class, $message); } /** @@ -768,56 +1305,145 @@ public static function nullOrIsNotA($value, $class, $message = '') * @psalm-template UnexpectedType of object * @psalm-param class-string $class * - * @param iterable $value - * @param string $class - * @param string $message + * @param iterable $value + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsNotA($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isNotA($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template UnexpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable $value + * @psalm-assert iterable|null> $value + * + * @param iterable $value + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsNotA($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isNotA($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param object|string|null $value + * @param string[] $classes + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrIsAnyOf($value, $classes, $message = '') + { + null === $value || static::isAnyOf($value, $classes, $message); + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param iterable $value + * @param string[] $classes + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allIsAnyOf($value, $classes, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::isAnyOf($entry, $classes, $message); + } + } + + /** + * @psalm-pure + * @psalm-param array $classes + * + * @param iterable $value + * @param string[] $classes + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsNotA($value, $class, $message = '') + public static function allNullOrIsAnyOf($value, $classes, $message = '') { - static::__callStatic('allIsNotA', array($value, $class, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isAnyOf($entry, $classes, $message); + } } /** * @psalm-pure - * @psalm-param array $classes + * @psalm-assert empty $value * - * @param object|string|null $value - * @param string[] $classes - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrIsAnyOf($value, $classes, $message = '') + public static function nullOrIsEmpty($value, $message = '') { - static::__callStatic('nullOrIsAnyOf', array($value, $classes, $message)); + null === $value || static::isEmpty($value, $message); } /** * @psalm-pure - * @psalm-param array $classes + * @psalm-assert iterable $value * - * @param iterable $value - * @param string[] $classes - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allIsAnyOf($value, $classes, $message = '') + public static function allIsEmpty($value, $message = '') { - static::__callStatic('allIsAnyOf', array($value, $classes, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::isEmpty($entry, $message); + } } /** * @psalm-pure - * @psalm-assert empty $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -826,14 +1452,17 @@ public static function allIsAnyOf($value, $classes, $message = '') * * @return void */ - public static function nullOrIsEmpty($value, $message = '') + public static function allNullOrIsEmpty($value, $message = '') { - static::__callStatic('nullOrIsEmpty', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::isEmpty($entry, $message); + } } /** * @psalm-pure - * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -842,9 +1471,9 @@ public static function nullOrIsEmpty($value, $message = '') * * @return void */ - public static function allIsEmpty($value, $message = '') + public static function nullOrNotEmpty($value, $message = '') { - static::__callStatic('allIsEmpty', array($value, $message)); + null === $value || static::notEmpty($value, $message); } /** @@ -857,13 +1486,18 @@ public static function allIsEmpty($value, $message = '') * * @return void */ - public static function nullOrNotEmpty($value, $message = '') + public static function allNotEmpty($value, $message = '') { - static::__callStatic('nullOrNotEmpty', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notEmpty($entry, $message); + } } /** * @psalm-pure + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -872,9 +1506,13 @@ public static function nullOrNotEmpty($value, $message = '') * * @return void */ - public static function allNotEmpty($value, $message = '') + public static function allNullOrNotEmpty($value, $message = '') { - static::__callStatic('allNotEmpty', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notEmpty($entry, $message); + } } /** @@ -890,7 +1528,11 @@ public static function allNotEmpty($value, $message = '') */ public static function allNull($value, $message = '') { - static::__callStatic('allNull', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::null($entry, $message); + } } /** @@ -905,7 +1547,11 @@ public static function allNull($value, $message = '') */ public static function allNotNull($value, $message = '') { - static::__callStatic('allNotNull', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notNull($entry, $message); + } } /** @@ -921,7 +1567,7 @@ public static function allNotNull($value, $message = '') */ public static function nullOrTrue($value, $message = '') { - static::__callStatic('nullOrTrue', array($value, $message)); + null === $value || static::true($value, $message); } /** @@ -937,7 +1583,31 @@ public static function nullOrTrue($value, $message = '') */ public static function allTrue($value, $message = '') { - static::__callStatic('allTrue', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::true($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrTrue($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::true($entry, $message); + } } /** @@ -953,7 +1623,7 @@ public static function allTrue($value, $message = '') */ public static function nullOrFalse($value, $message = '') { - static::__callStatic('nullOrFalse', array($value, $message)); + null === $value || static::false($value, $message); } /** @@ -969,7 +1639,31 @@ public static function nullOrFalse($value, $message = '') */ public static function allFalse($value, $message = '') { - static::__callStatic('allFalse', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::false($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrFalse($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::false($entry, $message); + } } /** @@ -984,7 +1678,7 @@ public static function allFalse($value, $message = '') */ public static function nullOrNotFalse($value, $message = '') { - static::__callStatic('nullOrNotFalse', array($value, $message)); + null === $value || static::notFalse($value, $message); } /** @@ -999,7 +1693,31 @@ public static function nullOrNotFalse($value, $message = '') */ public static function allNotFalse($value, $message = '') { - static::__callStatic('allNotFalse', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notFalse($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotFalse($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notFalse($entry, $message); + } } /** @@ -1012,7 +1730,7 @@ public static function allNotFalse($value, $message = '') */ public static function nullOrIp($value, $message = '') { - static::__callStatic('nullOrIp', array($value, $message)); + null === $value || static::ip($value, $message); } /** @@ -1025,7 +1743,28 @@ public static function nullOrIp($value, $message = '') */ public static function allIp($value, $message = '') { - static::__callStatic('allIp', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::ip($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIp($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::ip($entry, $message); + } } /** @@ -1038,7 +1777,7 @@ public static function allIp($value, $message = '') */ public static function nullOrIpv4($value, $message = '') { - static::__callStatic('nullOrIpv4', array($value, $message)); + null === $value || static::ipv4($value, $message); } /** @@ -1051,7 +1790,28 @@ public static function nullOrIpv4($value, $message = '') */ public static function allIpv4($value, $message = '') { - static::__callStatic('allIpv4', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::ipv4($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIpv4($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::ipv4($entry, $message); + } } /** @@ -1064,7 +1824,7 @@ public static function allIpv4($value, $message = '') */ public static function nullOrIpv6($value, $message = '') { - static::__callStatic('nullOrIpv6', array($value, $message)); + null === $value || static::ipv6($value, $message); } /** @@ -1077,7 +1837,28 @@ public static function nullOrIpv6($value, $message = '') */ public static function allIpv6($value, $message = '') { - static::__callStatic('allIpv6', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::ipv6($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIpv6($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::ipv6($entry, $message); + } } /** @@ -1090,7 +1871,7 @@ public static function allIpv6($value, $message = '') */ public static function nullOrEmail($value, $message = '') { - static::__callStatic('nullOrEmail', array($value, $message)); + null === $value || static::email($value, $message); } /** @@ -1103,7 +1884,28 @@ public static function nullOrEmail($value, $message = '') */ public static function allEmail($value, $message = '') { - static::__callStatic('allEmail', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::email($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrEmail($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::email($entry, $message); + } } /** @@ -1116,7 +1918,7 @@ public static function allEmail($value, $message = '') */ public static function nullOrUniqueValues($values, $message = '') { - static::__callStatic('nullOrUniqueValues', array($values, $message)); + null === $values || static::uniqueValues($values, $message); } /** @@ -1127,12 +1929,171 @@ public static function nullOrUniqueValues($values, $message = '') * * @return void */ - public static function allUniqueValues($values, $message = '') + public static function allUniqueValues($values, $message = '') + { + static::isIterable($values); + + foreach ($values as $entry) { + static::uniqueValues($entry, $message); + } + } + + /** + * @param iterable $values + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrUniqueValues($values, $message = '') + { + static::isIterable($values); + + foreach ($values as $entry) { + null === $entry || static::uniqueValues($entry, $message); + } + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrEq($value, $expect, $message = '') + { + null === $value || static::eq($value, $expect, $message); + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allEq($value, $expect, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::eq($entry, $expect, $message); + } + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrEq($value, $expect, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::eq($entry, $expect, $message); + } + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrNotEq($value, $expect, $message = '') + { + null === $value || static::notEq($value, $expect, $message); + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNotEq($value, $expect, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::notEq($entry, $expect, $message); + } + } + + /** + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotEq($value, $expect, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notEq($entry, $expect, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrSame($value, $expect, $message = '') + { + null === $value || static::same($value, $expect, $message); + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param mixed $expect + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allSame($value, $expect, $message = '') { - static::__callStatic('allUniqueValues', array($values, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::same($entry, $expect, $message); + } } /** + * @psalm-pure + * * @param mixed $value * @param mixed $expect * @param string $message @@ -1141,12 +2102,18 @@ public static function allUniqueValues($values, $message = '') * * @return void */ - public static function nullOrEq($value, $expect, $message = '') + public static function allNullOrSame($value, $expect, $message = '') { - static::__callStatic('nullOrEq', array($value, $expect, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::same($entry, $expect, $message); + } } /** + * @psalm-pure + * * @param mixed $value * @param mixed $expect * @param string $message @@ -1155,12 +2122,14 @@ public static function nullOrEq($value, $expect, $message = '') * * @return void */ - public static function allEq($value, $expect, $message = '') + public static function nullOrNotSame($value, $expect, $message = '') { - static::__callStatic('allEq', array($value, $expect, $message)); + null === $value || static::notSame($value, $expect, $message); } /** + * @psalm-pure + * * @param mixed $value * @param mixed $expect * @param string $message @@ -1169,12 +2138,18 @@ public static function allEq($value, $expect, $message = '') * * @return void */ - public static function nullOrNotEq($value, $expect, $message = '') + public static function allNotSame($value, $expect, $message = '') { - static::__callStatic('nullOrNotEq', array($value, $expect, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notSame($entry, $expect, $message); + } } /** + * @psalm-pure + * * @param mixed $value * @param mixed $expect * @param string $message @@ -1183,73 +2158,85 @@ public static function nullOrNotEq($value, $expect, $message = '') * * @return void */ - public static function allNotEq($value, $expect, $message = '') + public static function allNullOrNotSame($value, $expect, $message = '') { - static::__callStatic('allNotEq', array($value, $expect, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notSame($entry, $expect, $message); + } } /** * @psalm-pure * * @param mixed $value - * @param mixed $expect + * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrSame($value, $expect, $message = '') + public static function nullOrGreaterThan($value, $limit, $message = '') { - static::__callStatic('nullOrSame', array($value, $expect, $message)); + null === $value || static::greaterThan($value, $limit, $message); } /** * @psalm-pure * * @param mixed $value - * @param mixed $expect + * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allSame($value, $expect, $message = '') + public static function allGreaterThan($value, $limit, $message = '') { - static::__callStatic('allSame', array($value, $expect, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::greaterThan($entry, $limit, $message); + } } /** * @psalm-pure * * @param mixed $value - * @param mixed $expect + * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrNotSame($value, $expect, $message = '') + public static function allNullOrGreaterThan($value, $limit, $message = '') { - static::__callStatic('nullOrNotSame', array($value, $expect, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::greaterThan($entry, $limit, $message); + } } /** * @psalm-pure * * @param mixed $value - * @param mixed $expect + * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allNotSame($value, $expect, $message = '') + public static function nullOrGreaterThanEq($value, $limit, $message = '') { - static::__callStatic('allNotSame', array($value, $expect, $message)); + null === $value || static::greaterThanEq($value, $limit, $message); } /** @@ -1263,9 +2250,13 @@ public static function allNotSame($value, $expect, $message = '') * * @return void */ - public static function nullOrGreaterThan($value, $limit, $message = '') + public static function allGreaterThanEq($value, $limit, $message = '') { - static::__callStatic('nullOrGreaterThan', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::greaterThanEq($entry, $limit, $message); + } } /** @@ -1279,9 +2270,13 @@ public static function nullOrGreaterThan($value, $limit, $message = '') * * @return void */ - public static function allGreaterThan($value, $limit, $message = '') + public static function allNullOrGreaterThanEq($value, $limit, $message = '') { - static::__callStatic('allGreaterThan', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::greaterThanEq($entry, $limit, $message); + } } /** @@ -1295,9 +2290,9 @@ public static function allGreaterThan($value, $limit, $message = '') * * @return void */ - public static function nullOrGreaterThanEq($value, $limit, $message = '') + public static function nullOrLessThan($value, $limit, $message = '') { - static::__callStatic('nullOrGreaterThanEq', array($value, $limit, $message)); + null === $value || static::lessThan($value, $limit, $message); } /** @@ -1311,9 +2306,13 @@ public static function nullOrGreaterThanEq($value, $limit, $message = '') * * @return void */ - public static function allGreaterThanEq($value, $limit, $message = '') + public static function allLessThan($value, $limit, $message = '') { - static::__callStatic('allGreaterThanEq', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::lessThan($entry, $limit, $message); + } } /** @@ -1327,9 +2326,13 @@ public static function allGreaterThanEq($value, $limit, $message = '') * * @return void */ - public static function nullOrLessThan($value, $limit, $message = '') + public static function allNullOrLessThan($value, $limit, $message = '') { - static::__callStatic('nullOrLessThan', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::lessThan($entry, $limit, $message); + } } /** @@ -1343,9 +2346,9 @@ public static function nullOrLessThan($value, $limit, $message = '') * * @return void */ - public static function allLessThan($value, $limit, $message = '') + public static function nullOrLessThanEq($value, $limit, $message = '') { - static::__callStatic('allLessThan', array($value, $limit, $message)); + null === $value || static::lessThanEq($value, $limit, $message); } /** @@ -1359,9 +2362,13 @@ public static function allLessThan($value, $limit, $message = '') * * @return void */ - public static function nullOrLessThanEq($value, $limit, $message = '') + public static function allLessThanEq($value, $limit, $message = '') { - static::__callStatic('nullOrLessThanEq', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::lessThanEq($entry, $limit, $message); + } } /** @@ -1375,9 +2382,13 @@ public static function nullOrLessThanEq($value, $limit, $message = '') * * @return void */ - public static function allLessThanEq($value, $limit, $message = '') + public static function allNullOrLessThanEq($value, $limit, $message = '') { - static::__callStatic('allLessThanEq', array($value, $limit, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::lessThanEq($entry, $limit, $message); + } } /** @@ -1394,7 +2405,7 @@ public static function allLessThanEq($value, $limit, $message = '') */ public static function nullOrRange($value, $min, $max, $message = '') { - static::__callStatic('nullOrRange', array($value, $min, $max, $message)); + null === $value || static::range($value, $min, $max, $message); } /** @@ -1411,7 +2422,32 @@ public static function nullOrRange($value, $min, $max, $message = '') */ public static function allRange($value, $min, $max, $message = '') { - static::__callStatic('allRange', array($value, $min, $max, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::range($entry, $min, $max, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param mixed $min + * @param mixed $max + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrRange($value, $min, $max, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::range($entry, $min, $max, $message); + } } /** @@ -1427,7 +2463,7 @@ public static function allRange($value, $min, $max, $message = '') */ public static function nullOrOneOf($value, $values, $message = '') { - static::__callStatic('nullOrOneOf', array($value, $values, $message)); + null === $value || static::oneOf($value, $values, $message); } /** @@ -1443,7 +2479,31 @@ public static function nullOrOneOf($value, $values, $message = '') */ public static function allOneOf($value, $values, $message = '') { - static::__callStatic('allOneOf', array($value, $values, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::oneOf($entry, $values, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param array $values + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrOneOf($value, $values, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::oneOf($entry, $values, $message); + } } /** @@ -1459,7 +2519,7 @@ public static function allOneOf($value, $values, $message = '') */ public static function nullOrInArray($value, $values, $message = '') { - static::__callStatic('nullOrInArray', array($value, $values, $message)); + null === $value || static::inArray($value, $values, $message); } /** @@ -1475,7 +2535,31 @@ public static function nullOrInArray($value, $values, $message = '') */ public static function allInArray($value, $values, $message = '') { - static::__callStatic('allInArray', array($value, $values, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::inArray($entry, $values, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param array $values + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrInArray($value, $values, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::inArray($entry, $values, $message); + } } /** @@ -1491,7 +2575,7 @@ public static function allInArray($value, $values, $message = '') */ public static function nullOrContains($value, $subString, $message = '') { - static::__callStatic('nullOrContains', array($value, $subString, $message)); + null === $value || static::contains($value, $subString, $message); } /** @@ -1507,7 +2591,31 @@ public static function nullOrContains($value, $subString, $message = '') */ public static function allContains($value, $subString, $message = '') { - static::__callStatic('allContains', array($value, $subString, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::contains($entry, $subString, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $subString + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrContains($value, $subString, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::contains($entry, $subString, $message); + } } /** @@ -1523,7 +2631,7 @@ public static function allContains($value, $subString, $message = '') */ public static function nullOrNotContains($value, $subString, $message = '') { - static::__callStatic('nullOrNotContains', array($value, $subString, $message)); + null === $value || static::notContains($value, $subString, $message); } /** @@ -1539,7 +2647,31 @@ public static function nullOrNotContains($value, $subString, $message = '') */ public static function allNotContains($value, $subString, $message = '') { - static::__callStatic('allNotContains', array($value, $subString, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notContains($entry, $subString, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $subString + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotContains($value, $subString, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notContains($entry, $subString, $message); + } } /** @@ -1554,7 +2686,7 @@ public static function allNotContains($value, $subString, $message = '') */ public static function nullOrNotWhitespaceOnly($value, $message = '') { - static::__callStatic('nullOrNotWhitespaceOnly', array($value, $message)); + null === $value || static::notWhitespaceOnly($value, $message); } /** @@ -1569,7 +2701,30 @@ public static function nullOrNotWhitespaceOnly($value, $message = '') */ public static function allNotWhitespaceOnly($value, $message = '') { - static::__callStatic('allNotWhitespaceOnly', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notWhitespaceOnly($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotWhitespaceOnly($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notWhitespaceOnly($entry, $message); + } } /** @@ -1585,7 +2740,7 @@ public static function allNotWhitespaceOnly($value, $message = '') */ public static function nullOrStartsWith($value, $prefix, $message = '') { - static::__callStatic('nullOrStartsWith', array($value, $prefix, $message)); + null === $value || static::startsWith($value, $prefix, $message); } /** @@ -1601,7 +2756,31 @@ public static function nullOrStartsWith($value, $prefix, $message = '') */ public static function allStartsWith($value, $prefix, $message = '') { - static::__callStatic('allStartsWith', array($value, $prefix, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::startsWith($entry, $prefix, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $prefix + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrStartsWith($value, $prefix, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::startsWith($entry, $prefix, $message); + } } /** @@ -1617,7 +2796,7 @@ public static function allStartsWith($value, $prefix, $message = '') */ public static function nullOrNotStartsWith($value, $prefix, $message = '') { - static::__callStatic('nullOrNotStartsWith', array($value, $prefix, $message)); + null === $value || static::notStartsWith($value, $prefix, $message); } /** @@ -1633,7 +2812,31 @@ public static function nullOrNotStartsWith($value, $prefix, $message = '') */ public static function allNotStartsWith($value, $prefix, $message = '') { - static::__callStatic('allNotStartsWith', array($value, $prefix, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notStartsWith($entry, $prefix, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $prefix + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotStartsWith($value, $prefix, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notStartsWith($entry, $prefix, $message); + } } /** @@ -1648,7 +2851,7 @@ public static function allNotStartsWith($value, $prefix, $message = '') */ public static function nullOrStartsWithLetter($value, $message = '') { - static::__callStatic('nullOrStartsWithLetter', array($value, $message)); + null === $value || static::startsWithLetter($value, $message); } /** @@ -1663,7 +2866,30 @@ public static function nullOrStartsWithLetter($value, $message = '') */ public static function allStartsWithLetter($value, $message = '') { - static::__callStatic('allStartsWithLetter', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::startsWithLetter($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrStartsWithLetter($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::startsWithLetter($entry, $message); + } } /** @@ -1679,7 +2905,7 @@ public static function allStartsWithLetter($value, $message = '') */ public static function nullOrEndsWith($value, $suffix, $message = '') { - static::__callStatic('nullOrEndsWith', array($value, $suffix, $message)); + null === $value || static::endsWith($value, $suffix, $message); } /** @@ -1695,7 +2921,31 @@ public static function nullOrEndsWith($value, $suffix, $message = '') */ public static function allEndsWith($value, $suffix, $message = '') { - static::__callStatic('allEndsWith', array($value, $suffix, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::endsWith($entry, $suffix, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $suffix + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrEndsWith($value, $suffix, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::endsWith($entry, $suffix, $message); + } } /** @@ -1709,25 +2959,105 @@ public static function allEndsWith($value, $suffix, $message = '') * * @return void */ - public static function nullOrNotEndsWith($value, $suffix, $message = '') + public static function nullOrNotEndsWith($value, $suffix, $message = '') + { + null === $value || static::notEndsWith($value, $suffix, $message); + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $suffix + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNotEndsWith($value, $suffix, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::notEndsWith($entry, $suffix, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $suffix + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrNotEndsWith($value, $suffix, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notEndsWith($entry, $suffix, $message); + } + } + + /** + * @psalm-pure + * + * @param string|null $value + * @param string $pattern + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrRegex($value, $pattern, $message = '') + { + null === $value || static::regex($value, $pattern, $message); + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $pattern + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allRegex($value, $pattern, $message = '') { - static::__callStatic('nullOrNotEndsWith', array($value, $suffix, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::regex($entry, $pattern, $message); + } } /** * @psalm-pure * - * @param iterable $value - * @param string $suffix - * @param string $message + * @param iterable $value + * @param string $pattern + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allNotEndsWith($value, $suffix, $message = '') + public static function allNullOrRegex($value, $pattern, $message = '') { - static::__callStatic('allNotEndsWith', array($value, $suffix, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::regex($entry, $pattern, $message); + } } /** @@ -1741,9 +3071,9 @@ public static function allNotEndsWith($value, $suffix, $message = '') * * @return void */ - public static function nullOrRegex($value, $pattern, $message = '') + public static function nullOrNotRegex($value, $pattern, $message = '') { - static::__callStatic('nullOrRegex', array($value, $pattern, $message)); + null === $value || static::notRegex($value, $pattern, $message); } /** @@ -1757,41 +3087,48 @@ public static function nullOrRegex($value, $pattern, $message = '') * * @return void */ - public static function allRegex($value, $pattern, $message = '') + public static function allNotRegex($value, $pattern, $message = '') { - static::__callStatic('allRegex', array($value, $pattern, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::notRegex($entry, $pattern, $message); + } } /** * @psalm-pure * - * @param string|null $value - * @param string $pattern - * @param string $message + * @param iterable $value + * @param string $pattern + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function nullOrNotRegex($value, $pattern, $message = '') + public static function allNullOrNotRegex($value, $pattern, $message = '') { - static::__callStatic('nullOrNotRegex', array($value, $pattern, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::notRegex($entry, $pattern, $message); + } } /** * @psalm-pure * - * @param iterable $value - * @param string $pattern - * @param string $message + * @param mixed $value + * @param string $message * * @throws InvalidArgumentException * * @return void */ - public static function allNotRegex($value, $pattern, $message = '') + public static function nullOrUnicodeLetters($value, $message = '') { - static::__callStatic('allNotRegex', array($value, $pattern, $message)); + null === $value || static::unicodeLetters($value, $message); } /** @@ -1804,9 +3141,13 @@ public static function allNotRegex($value, $pattern, $message = '') * * @return void */ - public static function nullOrUnicodeLetters($value, $message = '') + public static function allUnicodeLetters($value, $message = '') { - static::__callStatic('nullOrUnicodeLetters', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::unicodeLetters($entry, $message); + } } /** @@ -1819,9 +3160,13 @@ public static function nullOrUnicodeLetters($value, $message = '') * * @return void */ - public static function allUnicodeLetters($value, $message = '') + public static function allNullOrUnicodeLetters($value, $message = '') { - static::__callStatic('allUnicodeLetters', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::unicodeLetters($entry, $message); + } } /** @@ -1836,7 +3181,7 @@ public static function allUnicodeLetters($value, $message = '') */ public static function nullOrAlpha($value, $message = '') { - static::__callStatic('nullOrAlpha', array($value, $message)); + null === $value || static::alpha($value, $message); } /** @@ -1851,7 +3196,30 @@ public static function nullOrAlpha($value, $message = '') */ public static function allAlpha($value, $message = '') { - static::__callStatic('allAlpha', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::alpha($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrAlpha($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::alpha($entry, $message); + } } /** @@ -1866,7 +3234,7 @@ public static function allAlpha($value, $message = '') */ public static function nullOrDigits($value, $message = '') { - static::__callStatic('nullOrDigits', array($value, $message)); + null === $value || static::digits($value, $message); } /** @@ -1881,7 +3249,30 @@ public static function nullOrDigits($value, $message = '') */ public static function allDigits($value, $message = '') { - static::__callStatic('allDigits', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::digits($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrDigits($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::digits($entry, $message); + } } /** @@ -1896,7 +3287,7 @@ public static function allDigits($value, $message = '') */ public static function nullOrAlnum($value, $message = '') { - static::__callStatic('nullOrAlnum', array($value, $message)); + null === $value || static::alnum($value, $message); } /** @@ -1911,7 +3302,30 @@ public static function nullOrAlnum($value, $message = '') */ public static function allAlnum($value, $message = '') { - static::__callStatic('allAlnum', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::alnum($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrAlnum($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::alnum($entry, $message); + } } /** @@ -1927,7 +3341,7 @@ public static function allAlnum($value, $message = '') */ public static function nullOrLower($value, $message = '') { - static::__callStatic('nullOrLower', array($value, $message)); + null === $value || static::lower($value, $message); } /** @@ -1943,7 +3357,31 @@ public static function nullOrLower($value, $message = '') */ public static function allLower($value, $message = '') { - static::__callStatic('allLower', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::lower($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrLower($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::lower($entry, $message); + } } /** @@ -1958,7 +3396,7 @@ public static function allLower($value, $message = '') */ public static function nullOrUpper($value, $message = '') { - static::__callStatic('nullOrUpper', array($value, $message)); + null === $value || static::upper($value, $message); } /** @@ -1973,7 +3411,31 @@ public static function nullOrUpper($value, $message = '') */ public static function allUpper($value, $message = '') { - static::__callStatic('allUpper', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::upper($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrUpper($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::upper($entry, $message); + } } /** @@ -1989,7 +3451,7 @@ public static function allUpper($value, $message = '') */ public static function nullOrLength($value, $length, $message = '') { - static::__callStatic('nullOrLength', array($value, $length, $message)); + null === $value || static::length($value, $length, $message); } /** @@ -2005,7 +3467,31 @@ public static function nullOrLength($value, $length, $message = '') */ public static function allLength($value, $length, $message = '') { - static::__callStatic('allLength', array($value, $length, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::length($entry, $length, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param int $length + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrLength($value, $length, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::length($entry, $length, $message); + } } /** @@ -2021,7 +3507,7 @@ public static function allLength($value, $length, $message = '') */ public static function nullOrMinLength($value, $min, $message = '') { - static::__callStatic('nullOrMinLength', array($value, $min, $message)); + null === $value || static::minLength($value, $min, $message); } /** @@ -2037,7 +3523,31 @@ public static function nullOrMinLength($value, $min, $message = '') */ public static function allMinLength($value, $min, $message = '') { - static::__callStatic('allMinLength', array($value, $min, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::minLength($entry, $min, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param int|float $min + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMinLength($value, $min, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::minLength($entry, $min, $message); + } } /** @@ -2053,7 +3563,7 @@ public static function allMinLength($value, $min, $message = '') */ public static function nullOrMaxLength($value, $max, $message = '') { - static::__callStatic('nullOrMaxLength', array($value, $max, $message)); + null === $value || static::maxLength($value, $max, $message); } /** @@ -2069,7 +3579,31 @@ public static function nullOrMaxLength($value, $max, $message = '') */ public static function allMaxLength($value, $max, $message = '') { - static::__callStatic('allMaxLength', array($value, $max, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::maxLength($entry, $max, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param int|float $max + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMaxLength($value, $max, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::maxLength($entry, $max, $message); + } } /** @@ -2086,7 +3620,7 @@ public static function allMaxLength($value, $max, $message = '') */ public static function nullOrLengthBetween($value, $min, $max, $message = '') { - static::__callStatic('nullOrLengthBetween', array($value, $min, $max, $message)); + null === $value || static::lengthBetween($value, $min, $max, $message); } /** @@ -2103,7 +3637,32 @@ public static function nullOrLengthBetween($value, $min, $max, $message = '') */ public static function allLengthBetween($value, $min, $max, $message = '') { - static::__callStatic('allLengthBetween', array($value, $min, $max, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::lengthBetween($entry, $min, $max, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param int|float $min + * @param int|float $max + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrLengthBetween($value, $min, $max, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::lengthBetween($entry, $min, $max, $message); + } } /** @@ -2116,7 +3675,7 @@ public static function allLengthBetween($value, $min, $max, $message = '') */ public static function nullOrFileExists($value, $message = '') { - static::__callStatic('nullOrFileExists', array($value, $message)); + null === $value || static::fileExists($value, $message); } /** @@ -2129,7 +3688,28 @@ public static function nullOrFileExists($value, $message = '') */ public static function allFileExists($value, $message = '') { - static::__callStatic('allFileExists', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::fileExists($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrFileExists($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::fileExists($entry, $message); + } } /** @@ -2142,7 +3722,7 @@ public static function allFileExists($value, $message = '') */ public static function nullOrFile($value, $message = '') { - static::__callStatic('nullOrFile', array($value, $message)); + null === $value || static::file($value, $message); } /** @@ -2155,7 +3735,28 @@ public static function nullOrFile($value, $message = '') */ public static function allFile($value, $message = '') { - static::__callStatic('allFile', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::file($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrFile($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::file($entry, $message); + } } /** @@ -2168,7 +3769,7 @@ public static function allFile($value, $message = '') */ public static function nullOrDirectory($value, $message = '') { - static::__callStatic('nullOrDirectory', array($value, $message)); + null === $value || static::directory($value, $message); } /** @@ -2181,7 +3782,28 @@ public static function nullOrDirectory($value, $message = '') */ public static function allDirectory($value, $message = '') { - static::__callStatic('allDirectory', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::directory($entry, $message); + } + } + + /** + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrDirectory($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::directory($entry, $message); + } } /** @@ -2194,7 +3816,7 @@ public static function allDirectory($value, $message = '') */ public static function nullOrReadable($value, $message = '') { - static::__callStatic('nullOrReadable', array($value, $message)); + null === $value || static::readable($value, $message); } /** @@ -2207,7 +3829,28 @@ public static function nullOrReadable($value, $message = '') */ public static function allReadable($value, $message = '') { - static::__callStatic('allReadable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::readable($entry, $message); + } + } + + /** + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrReadable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::readable($entry, $message); + } } /** @@ -2220,7 +3863,7 @@ public static function allReadable($value, $message = '') */ public static function nullOrWritable($value, $message = '') { - static::__callStatic('nullOrWritable', array($value, $message)); + null === $value || static::writable($value, $message); } /** @@ -2233,7 +3876,28 @@ public static function nullOrWritable($value, $message = '') */ public static function allWritable($value, $message = '') { - static::__callStatic('allWritable', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::writable($entry, $message); + } + } + + /** + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrWritable($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::writable($entry, $message); + } } /** @@ -2248,7 +3912,7 @@ public static function allWritable($value, $message = '') */ public static function nullOrClassExists($value, $message = '') { - static::__callStatic('nullOrClassExists', array($value, $message)); + null === $value || static::classExists($value, $message); } /** @@ -2263,7 +3927,30 @@ public static function nullOrClassExists($value, $message = '') */ public static function allClassExists($value, $message = '') { - static::__callStatic('allClassExists', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::classExists($entry, $message); + } + } + + /** + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrClassExists($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::classExists($entry, $message); + } } /** @@ -2282,7 +3969,7 @@ public static function allClassExists($value, $message = '') */ public static function nullOrSubclassOf($value, $class, $message = '') { - static::__callStatic('nullOrSubclassOf', array($value, $class, $message)); + null === $value || static::subclassOf($value, $class, $message); } /** @@ -2299,13 +3986,55 @@ public static function nullOrSubclassOf($value, $class, $message = '') * * @return void */ - public static function allSubclassOf($value, $class, $message = '') + public static function allSubclassOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + static::subclassOf($entry, $class, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $class + * @psalm-assert iterable|ExpectedType|null> $value + * + * @param mixed $value + * @param string|object $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrSubclassOf($value, $class, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::subclassOf($entry, $class, $message); + } + } + + /** + * @psalm-assert class-string|null $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function nullOrInterfaceExists($value, $message = '') { - static::__callStatic('allSubclassOf', array($value, $class, $message)); + null === $value || static::interfaceExists($value, $message); } /** - * @psalm-assert class-string|null $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -2314,13 +4043,17 @@ public static function allSubclassOf($value, $class, $message = '') * * @return void */ - public static function nullOrInterfaceExists($value, $message = '') + public static function allInterfaceExists($value, $message = '') { - static::__callStatic('nullOrInterfaceExists', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::interfaceExists($entry, $message); + } } /** - * @psalm-assert iterable $value + * @psalm-assert iterable $value * * @param mixed $value * @param string $message @@ -2329,9 +4062,13 @@ public static function nullOrInterfaceExists($value, $message = '') * * @return void */ - public static function allInterfaceExists($value, $message = '') + public static function allNullOrInterfaceExists($value, $message = '') { - static::__callStatic('allInterfaceExists', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::interfaceExists($entry, $message); + } } /** @@ -2350,7 +4087,7 @@ public static function allInterfaceExists($value, $message = '') */ public static function nullOrImplementsInterface($value, $interface, $message = '') { - static::__callStatic('nullOrImplementsInterface', array($value, $interface, $message)); + null === $value || static::implementsInterface($value, $interface, $message); } /** @@ -2369,7 +4106,34 @@ public static function nullOrImplementsInterface($value, $interface, $message = */ public static function allImplementsInterface($value, $interface, $message = '') { - static::__callStatic('allImplementsInterface', array($value, $interface, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::implementsInterface($entry, $interface, $message); + } + } + + /** + * @psalm-pure + * @psalm-template ExpectedType of object + * @psalm-param class-string $interface + * @psalm-assert iterable|null> $value + * + * @param mixed $value + * @param mixed $interface + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrImplementsInterface($value, $interface, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::implementsInterface($entry, $interface, $message); + } } /** @@ -2386,7 +4150,7 @@ public static function allImplementsInterface($value, $interface, $message = '') */ public static function nullOrPropertyExists($classOrObject, $property, $message = '') { - static::__callStatic('nullOrPropertyExists', array($classOrObject, $property, $message)); + null === $classOrObject || static::propertyExists($classOrObject, $property, $message); } /** @@ -2403,7 +4167,32 @@ public static function nullOrPropertyExists($classOrObject, $property, $message */ public static function allPropertyExists($classOrObject, $property, $message = '') { - static::__callStatic('allPropertyExists', array($classOrObject, $property, $message)); + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + static::propertyExists($entry, $property, $message); + } + } + + /** + * @psalm-pure + * @psalm-param iterable $classOrObject + * + * @param iterable $classOrObject + * @param mixed $property + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrPropertyExists($classOrObject, $property, $message = '') + { + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + null === $entry || static::propertyExists($entry, $property, $message); + } } /** @@ -2420,7 +4209,7 @@ public static function allPropertyExists($classOrObject, $property, $message = ' */ public static function nullOrPropertyNotExists($classOrObject, $property, $message = '') { - static::__callStatic('nullOrPropertyNotExists', array($classOrObject, $property, $message)); + null === $classOrObject || static::propertyNotExists($classOrObject, $property, $message); } /** @@ -2437,7 +4226,32 @@ public static function nullOrPropertyNotExists($classOrObject, $property, $messa */ public static function allPropertyNotExists($classOrObject, $property, $message = '') { - static::__callStatic('allPropertyNotExists', array($classOrObject, $property, $message)); + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + static::propertyNotExists($entry, $property, $message); + } + } + + /** + * @psalm-pure + * @psalm-param iterable $classOrObject + * + * @param iterable $classOrObject + * @param mixed $property + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrPropertyNotExists($classOrObject, $property, $message = '') + { + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + null === $entry || static::propertyNotExists($entry, $property, $message); + } } /** @@ -2454,7 +4268,7 @@ public static function allPropertyNotExists($classOrObject, $property, $message */ public static function nullOrMethodExists($classOrObject, $method, $message = '') { - static::__callStatic('nullOrMethodExists', array($classOrObject, $method, $message)); + null === $classOrObject || static::methodExists($classOrObject, $method, $message); } /** @@ -2471,7 +4285,32 @@ public static function nullOrMethodExists($classOrObject, $method, $message = '' */ public static function allMethodExists($classOrObject, $method, $message = '') { - static::__callStatic('allMethodExists', array($classOrObject, $method, $message)); + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + static::methodExists($entry, $method, $message); + } + } + + /** + * @psalm-pure + * @psalm-param iterable $classOrObject + * + * @param iterable $classOrObject + * @param mixed $method + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMethodExists($classOrObject, $method, $message = '') + { + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + null === $entry || static::methodExists($entry, $method, $message); + } } /** @@ -2488,7 +4327,7 @@ public static function allMethodExists($classOrObject, $method, $message = '') */ public static function nullOrMethodNotExists($classOrObject, $method, $message = '') { - static::__callStatic('nullOrMethodNotExists', array($classOrObject, $method, $message)); + null === $classOrObject || static::methodNotExists($classOrObject, $method, $message); } /** @@ -2505,7 +4344,32 @@ public static function nullOrMethodNotExists($classOrObject, $method, $message = */ public static function allMethodNotExists($classOrObject, $method, $message = '') { - static::__callStatic('allMethodNotExists', array($classOrObject, $method, $message)); + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + static::methodNotExists($entry, $method, $message); + } + } + + /** + * @psalm-pure + * @psalm-param iterable $classOrObject + * + * @param iterable $classOrObject + * @param mixed $method + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMethodNotExists($classOrObject, $method, $message = '') + { + static::isIterable($classOrObject); + + foreach ($classOrObject as $entry) { + null === $entry || static::methodNotExists($entry, $method, $message); + } } /** @@ -2521,7 +4385,7 @@ public static function allMethodNotExists($classOrObject, $method, $message = '' */ public static function nullOrKeyExists($array, $key, $message = '') { - static::__callStatic('nullOrKeyExists', array($array, $key, $message)); + null === $array || static::keyExists($array, $key, $message); } /** @@ -2537,7 +4401,31 @@ public static function nullOrKeyExists($array, $key, $message = '') */ public static function allKeyExists($array, $key, $message = '') { - static::__callStatic('allKeyExists', array($array, $key, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::keyExists($entry, $key, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $array + * @param string|int $key + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrKeyExists($array, $key, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::keyExists($entry, $key, $message); + } } /** @@ -2553,7 +4441,7 @@ public static function allKeyExists($array, $key, $message = '') */ public static function nullOrKeyNotExists($array, $key, $message = '') { - static::__callStatic('nullOrKeyNotExists', array($array, $key, $message)); + null === $array || static::keyNotExists($array, $key, $message); } /** @@ -2569,7 +4457,31 @@ public static function nullOrKeyNotExists($array, $key, $message = '') */ public static function allKeyNotExists($array, $key, $message = '') { - static::__callStatic('allKeyNotExists', array($array, $key, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::keyNotExists($entry, $key, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $array + * @param string|int $key + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrKeyNotExists($array, $key, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::keyNotExists($entry, $key, $message); + } } /** @@ -2585,7 +4497,7 @@ public static function allKeyNotExists($array, $key, $message = '') */ public static function nullOrValidArrayKey($value, $message = '') { - static::__callStatic('nullOrValidArrayKey', array($value, $message)); + null === $value || static::validArrayKey($value, $message); } /** @@ -2601,7 +4513,31 @@ public static function nullOrValidArrayKey($value, $message = '') */ public static function allValidArrayKey($value, $message = '') { - static::__callStatic('allValidArrayKey', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::validArrayKey($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $value + * + * @param mixed $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrValidArrayKey($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::validArrayKey($entry, $message); + } } /** @@ -2615,7 +4551,7 @@ public static function allValidArrayKey($value, $message = '') */ public static function nullOrCount($array, $number, $message = '') { - static::__callStatic('nullOrCount', array($array, $number, $message)); + null === $array || static::count($array, $number, $message); } /** @@ -2629,7 +4565,29 @@ public static function nullOrCount($array, $number, $message = '') */ public static function allCount($array, $number, $message = '') { - static::__callStatic('allCount', array($array, $number, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::count($entry, $number, $message); + } + } + + /** + * @param iterable $array + * @param int $number + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrCount($array, $number, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::count($entry, $number, $message); + } } /** @@ -2643,7 +4601,7 @@ public static function allCount($array, $number, $message = '') */ public static function nullOrMinCount($array, $min, $message = '') { - static::__callStatic('nullOrMinCount', array($array, $min, $message)); + null === $array || static::minCount($array, $min, $message); } /** @@ -2657,7 +4615,29 @@ public static function nullOrMinCount($array, $min, $message = '') */ public static function allMinCount($array, $min, $message = '') { - static::__callStatic('allMinCount', array($array, $min, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::minCount($entry, $min, $message); + } + } + + /** + * @param iterable $array + * @param int|float $min + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMinCount($array, $min, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::minCount($entry, $min, $message); + } } /** @@ -2671,7 +4651,7 @@ public static function allMinCount($array, $min, $message = '') */ public static function nullOrMaxCount($array, $max, $message = '') { - static::__callStatic('nullOrMaxCount', array($array, $max, $message)); + null === $array || static::maxCount($array, $max, $message); } /** @@ -2685,7 +4665,29 @@ public static function nullOrMaxCount($array, $max, $message = '') */ public static function allMaxCount($array, $max, $message = '') { - static::__callStatic('allMaxCount', array($array, $max, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::maxCount($entry, $max, $message); + } + } + + /** + * @param iterable $array + * @param int|float $max + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrMaxCount($array, $max, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::maxCount($entry, $max, $message); + } } /** @@ -2700,7 +4702,7 @@ public static function allMaxCount($array, $max, $message = '') */ public static function nullOrCountBetween($array, $min, $max, $message = '') { - static::__callStatic('nullOrCountBetween', array($array, $min, $max, $message)); + null === $array || static::countBetween($array, $min, $max, $message); } /** @@ -2715,7 +4717,30 @@ public static function nullOrCountBetween($array, $min, $max, $message = '') */ public static function allCountBetween($array, $min, $max, $message = '') { - static::__callStatic('allCountBetween', array($array, $min, $max, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::countBetween($entry, $min, $max, $message); + } + } + + /** + * @param iterable $array + * @param int|float $min + * @param int|float $max + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrCountBetween($array, $min, $max, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::countBetween($entry, $min, $max, $message); + } } /** @@ -2731,7 +4756,7 @@ public static function allCountBetween($array, $min, $max, $message = '') */ public static function nullOrIsList($array, $message = '') { - static::__callStatic('nullOrIsList', array($array, $message)); + null === $array || static::isList($array, $message); } /** @@ -2747,7 +4772,31 @@ public static function nullOrIsList($array, $message = '') */ public static function allIsList($array, $message = '') { - static::__callStatic('allIsList', array($array, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::isList($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $array + * + * @param mixed $array + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsList($array, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::isList($entry, $message); + } } /** @@ -2763,7 +4812,7 @@ public static function allIsList($array, $message = '') */ public static function nullOrIsNonEmptyList($array, $message = '') { - static::__callStatic('nullOrIsNonEmptyList', array($array, $message)); + null === $array || static::isNonEmptyList($array, $message); } /** @@ -2779,7 +4828,31 @@ public static function nullOrIsNonEmptyList($array, $message = '') */ public static function allIsNonEmptyList($array, $message = '') { - static::__callStatic('allIsNonEmptyList', array($array, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::isNonEmptyList($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-assert iterable $array + * + * @param mixed $array + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsNonEmptyList($array, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::isNonEmptyList($entry, $message); + } } /** @@ -2797,7 +4870,7 @@ public static function allIsNonEmptyList($array, $message = '') */ public static function nullOrIsMap($array, $message = '') { - static::__callStatic('nullOrIsMap', array($array, $message)); + null === $array || static::isMap($array, $message); } /** @@ -2815,7 +4888,33 @@ public static function nullOrIsMap($array, $message = '') */ public static function allIsMap($array, $message = '') { - static::__callStatic('allIsMap', array($array, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::isMap($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-template T + * @psalm-param iterable|null> $array + * @psalm-assert iterable|null> $array + * + * @param mixed $array + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsMap($array, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::isMap($entry, $message); + } } /** @@ -2832,7 +4931,7 @@ public static function allIsMap($array, $message = '') */ public static function nullOrIsNonEmptyMap($array, $message = '') { - static::__callStatic('nullOrIsNonEmptyMap', array($array, $message)); + null === $array || static::isNonEmptyMap($array, $message); } /** @@ -2849,7 +4948,34 @@ public static function nullOrIsNonEmptyMap($array, $message = '') */ public static function allIsNonEmptyMap($array, $message = '') { - static::__callStatic('allIsNonEmptyMap', array($array, $message)); + static::isIterable($array); + + foreach ($array as $entry) { + static::isNonEmptyMap($entry, $message); + } + } + + /** + * @psalm-pure + * @psalm-template T + * @psalm-param iterable|null> $array + * @psalm-assert iterable|null> $array + * @psalm-assert iterable $array + * + * @param mixed $array + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrIsNonEmptyMap($array, $message = '') + { + static::isIterable($array); + + foreach ($array as $entry) { + null === $entry || static::isNonEmptyMap($entry, $message); + } } /** @@ -2864,7 +4990,7 @@ public static function allIsNonEmptyMap($array, $message = '') */ public static function nullOrUuid($value, $message = '') { - static::__callStatic('nullOrUuid', array($value, $message)); + null === $value || static::uuid($value, $message); } /** @@ -2879,7 +5005,30 @@ public static function nullOrUuid($value, $message = '') */ public static function allUuid($value, $message = '') { - static::__callStatic('allUuid', array($value, $message)); + static::isIterable($value); + + foreach ($value as $entry) { + static::uuid($entry, $message); + } + } + + /** + * @psalm-pure + * + * @param iterable $value + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrUuid($value, $message = '') + { + static::isIterable($value); + + foreach ($value as $entry) { + null === $entry || static::uuid($entry, $message); + } } /** @@ -2895,7 +5044,7 @@ public static function allUuid($value, $message = '') */ public static function nullOrThrows($expression, $class = 'Exception', $message = '') { - static::__callStatic('nullOrThrows', array($expression, $class, $message)); + null === $expression || static::throws($expression, $class, $message); } /** @@ -2911,6 +5060,30 @@ public static function nullOrThrows($expression, $class = 'Exception', $message */ public static function allThrows($expression, $class = 'Exception', $message = '') { - static::__callStatic('allThrows', array($expression, $class, $message)); + static::isIterable($expression); + + foreach ($expression as $entry) { + static::throws($entry, $class, $message); + } + } + + /** + * @psalm-param class-string $class + * + * @param iterable $expression + * @param string $class + * @param string $message + * + * @throws InvalidArgumentException + * + * @return void + */ + public static function allNullOrThrows($expression, $class = 'Exception', $message = '') + { + static::isIterable($expression); + + foreach ($expression as $entry) { + null === $entry || static::throws($entry, $class, $message); + } } }