diff --git a/composer.json b/composer.json index b891ea100..d24569c42 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "deepdiver/zipstreamer": "^v2.0.2", "deepdiver1975/tarstreamer": "^2.1.0", "doctrine/dbal": "^3.7.0", - "egulias/email-validator": "^3.2.5", + "egulias/email-validator": "^3.2.6", "fusonic/opengraph": "^2.2", "giggsey/libphonenumber-for-php-lite": "^8.13.12", "guzzlehttp/guzzle": "^7.5.0", diff --git a/composer.lock b/composer.lock index 71710208d..dee9574d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "240cb2ea01f958680bf88737a3d64a45", + "content-hash": "2b3af795199c68767292dcbbffa36c99", "packages": [ { "name": "aws/aws-crt-php", @@ -822,31 +822,33 @@ }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -878,7 +880,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -894,20 +896,20 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "egulias/email-validator", - "version": "3.2.5", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "b531a2311709443320c786feb4519cfaf94af796" + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796", - "reference": "b531a2311709443320c786feb4519cfaf94af796", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", "shasum": "" }, "require": { @@ -953,7 +955,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.2.5" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.6" }, "funding": [ { @@ -961,7 +963,7 @@ "type": "github" } ], - "time": "2023-01-02T17:26:14+00:00" + "time": "2023-06-01T07:04:22+00:00" }, { "name": "fgrosse/phpasn1", @@ -5320,16 +5322,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", "shasum": "" }, "require": { @@ -5343,7 +5345,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5387,7 +5389,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -5403,20 +5405,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:30:37+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -5428,7 +5430,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5471,7 +5473,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -5487,7 +5489,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -5574,16 +5576,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", "shasum": "" }, "require": { @@ -5592,7 +5594,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5630,7 +5632,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -5646,7 +5648,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php73", diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 1b90a36a0..2cb5503dd 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -1054,7 +1054,8 @@ 'Doctrine\\Common\\EventArgs' => $vendorDir . '/doctrine/event-manager/src/EventArgs.php', 'Doctrine\\Common\\EventManager' => $vendorDir . '/doctrine/event-manager/src/EventManager.php', 'Doctrine\\Common\\EventSubscriber' => $vendorDir . '/doctrine/event-manager/src/EventSubscriber.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php', + 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/src/AbstractLexer.php', + 'Doctrine\\Common\\Lexer\\Token' => $vendorDir . '/doctrine/lexer/src/Token.php', 'Doctrine\\DBAL\\ArrayParameterType' => $vendorDir . '/doctrine/dbal/src/ArrayParameterType.php', 'Doctrine\\DBAL\\ArrayParameters\\Exception' => $vendorDir . '/doctrine/dbal/src/ArrayParameters/Exception.php', 'Doctrine\\DBAL\\ArrayParameters\\Exception\\MissingNamedParameter' => $vendorDir . '/doctrine/dbal/src/ArrayParameters/Exception/MissingNamedParameter.php', diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php index d210b9cb3..c5fa437f9 100644 --- a/composer/autoload_psr4.php +++ b/composer/autoload_psr4.php @@ -80,7 +80,7 @@ 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'), 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/src'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/src'), 'Cose\\' => array($vendorDir . '/web-auth/cose-lib/src'), diff --git a/composer/autoload_static.php b/composer/autoload_static.php index 7f1c967ae..74f057d02 100644 --- a/composer/autoload_static.php +++ b/composer/autoload_static.php @@ -591,7 +591,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 ), 'Doctrine\\Common\\Lexer\\' => array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', + 0 => __DIR__ . '/..' . '/doctrine/lexer/src', ), 'Doctrine\\Common\\Cache\\' => array ( @@ -1711,7 +1711,8 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Doctrine\\Common\\EventArgs' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventArgs.php', 'Doctrine\\Common\\EventManager' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventManager.php', 'Doctrine\\Common\\EventSubscriber' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventSubscriber.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php', + 'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/src/AbstractLexer.php', + 'Doctrine\\Common\\Lexer\\Token' => __DIR__ . '/..' . '/doctrine/lexer/src/Token.php', 'Doctrine\\DBAL\\ArrayParameterType' => __DIR__ . '/..' . '/doctrine/dbal/src/ArrayParameterType.php', 'Doctrine\\DBAL\\ArrayParameters\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/src/ArrayParameters/Exception.php', 'Doctrine\\DBAL\\ArrayParameters\\Exception\\MissingNamedParameter' => __DIR__ . '/..' . '/doctrine/dbal/src/ArrayParameters/Exception/MissingNamedParameter.php', diff --git a/composer/installed.json b/composer/installed.json index 947ba519d..423eb3de2 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -852,34 +852,36 @@ }, { "name": "doctrine/lexer", - "version": "1.2.3", - "version_normalized": "1.2.3.0", + "version": "2.1.0", + "version_normalized": "2.1.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, - "time": "2022-02-28T11:07:21+00:00", + "time": "2022-12-14T08:49:07+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -911,7 +913,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -931,17 +933,17 @@ }, { "name": "egulias/email-validator", - "version": "3.2.5", - "version_normalized": "3.2.5.0", + "version": "3.2.6", + "version_normalized": "3.2.6.0", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "b531a2311709443320c786feb4519cfaf94af796" + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796", - "reference": "b531a2311709443320c786feb4519cfaf94af796", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", "shasum": "" }, "require": { @@ -956,7 +958,7 @@ "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" }, - "time": "2023-01-02T17:26:14+00:00", + "time": "2023-06-01T07:04:22+00:00", "type": "library", "extra": { "branch-alias": { @@ -989,7 +991,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.2.5" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.6" }, "funding": [ { @@ -5548,17 +5550,17 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", "shasum": "" }, "require": { @@ -5569,11 +5571,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:30:37+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5618,7 +5620,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -5638,17 +5640,17 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -5657,11 +5659,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5705,7 +5707,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -5811,27 +5813,27 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5870,7 +5872,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { diff --git a/composer/installed.php b/composer/installed.php index fce2b2881..167acfedd 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'nextcloud/3rdparty', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '5800d0a02ef227821ed36141224d344a0d42c689', + 'reference' => '8ac22da788906c86727312c98819b008d76a4a84', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), @@ -119,18 +119,18 @@ 'dev_requirement' => false, ), 'doctrine/lexer' => array( - 'pretty_version' => '1.2.3', - 'version' => '1.2.3.0', - 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229', + 'pretty_version' => '2.1.0', + 'version' => '2.1.0.0', + 'reference' => '39ab8fcf5a51ce4b85ca97c7a7d033eb12831124', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/lexer', 'aliases' => array(), 'dev_requirement' => false, ), 'egulias/email-validator' => array( - 'pretty_version' => '3.2.5', - 'version' => '3.2.5.0', - 'reference' => 'b531a2311709443320c786feb4519cfaf94af796', + 'pretty_version' => '3.2.6', + 'version' => '3.2.6.0', + 'reference' => 'e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7', 'type' => 'library', 'install_path' => __DIR__ . '/../egulias/email-validator', 'aliases' => array(), @@ -319,7 +319,7 @@ 'nextcloud/3rdparty' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '5800d0a02ef227821ed36141224d344a0d42c689', + 'reference' => '8ac22da788906c86727312c98819b008d76a4a84', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), @@ -794,18 +794,18 @@ 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '639084e360537a19f9ee352433b84ce831f3d2da', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), @@ -821,9 +821,9 @@ 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '869329b1e9894268a8a61dabb69153029b7a8c97', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '70f4aebd92afca2f865444d30a4d2151c13c3179', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), diff --git a/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/doctrine/lexer/src/AbstractLexer.php similarity index 83% rename from doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php rename to doctrine/lexer/src/AbstractLexer.php index 7e8a11d44..eed4c5139 100644 --- a/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ b/doctrine/lexer/src/AbstractLexer.php @@ -5,9 +5,10 @@ namespace Doctrine\Common\Lexer; use ReflectionClass; +use UnitEnum; +use function get_class; use function implode; -use function in_array; use function preg_split; use function sprintf; use function substr; @@ -19,7 +20,8 @@ /** * Base class for writing simple lexers, i.e. for creating small DSLs. * - * @psalm-type Token = array{value: int|string, type:string|int|null, position:int} + * @template T of UnitEnum|string|int + * @template V of string|int */ abstract class AbstractLexer { @@ -33,14 +35,7 @@ abstract class AbstractLexer /** * Array of scanned tokens. * - * Each token is an associative array containing three items: - * - 'value' : the string value of the token in the input string - * - 'type' : the type of the token (identifier, numeric, string, input - * parameter, none) - * - 'position' : the position of the token in the input string - * - * @var mixed[][] - * @psalm-var list + * @var list> */ private $tokens = []; @@ -62,7 +57,7 @@ abstract class AbstractLexer * The next token in the input. * * @var mixed[]|null - * @psalm-var Token|null + * @psalm-var Token|null */ public $lookahead; @@ -70,7 +65,7 @@ abstract class AbstractLexer * The last matched/seen token. * * @var mixed[]|null - * @psalm-var Token|null + * @psalm-var Token|null */ public $token; @@ -150,31 +145,37 @@ public function getInputUntilPosition($position) /** * Checks whether a given token matches the current lookahead. * - * @param int|string $type + * @param T $type * * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead */ public function isNextToken($type) { - return $this->lookahead !== null && $this->lookahead['type'] === $type; + return $this->lookahead !== null && $this->lookahead->isA($type); } /** * Checks whether any of the given tokens matches the current lookahead. * - * @param list $types + * @param list $types * * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead */ public function isNextTokenAny(array $types) { - return $this->lookahead !== null && in_array($this->lookahead['type'], $types, true); + return $this->lookahead !== null && $this->lookahead->isA(...$types); } /** * Moves to the next token in the input string. * * @return bool + * + * @psalm-assert-if-true !null $this->lookahead */ public function moveNext() { @@ -189,13 +190,13 @@ public function moveNext() /** * Tells the lexer to skip input tokens until it sees a token with the given value. * - * @param string $type The token type to skip until. + * @param T $type The token type to skip until. * * @return void */ public function skipUntil($type) { - while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { + while ($this->lookahead !== null && ! $this->lookahead->isA($type)) { $this->moveNext(); } } @@ -203,7 +204,7 @@ public function skipUntil($type) /** * Checks if given value is identical to the given token. * - * @param mixed $value + * @param string $value * @param int|string $token * * @return bool @@ -217,7 +218,7 @@ public function isA($value, $token) * Moves the lookahead token forward. * * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null + * @psalm-return Token|null */ public function peek() { @@ -232,7 +233,7 @@ public function peek() * Peeks at the next token, returns it and immediately resets the peek. * * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null + * @psalm-return Token|null */ public function glimpse() { @@ -270,26 +271,32 @@ protected function scan($input) foreach ($matches as $match) { // Must remain before 'value' assignment since it can change content - $type = $this->getType($match[0]); + $firstMatch = $match[0]; + $type = $this->getType($firstMatch); - $this->tokens[] = [ - 'value' => $match[0], - 'type' => $type, - 'position' => $match[1], - ]; + $this->tokens[] = new Token( + $firstMatch, + $type, + $match[1] + ); } } /** * Gets the literal for a given token. * - * @param int|string $token + * @param T $token * * @return int|string */ public function getLiteral($token) { + if ($token instanceof UnitEnum) { + return get_class($token) . '::' . $token->name; + } + $className = static::class; + $reflClass = new ReflectionClass($className); $constants = $reflClass->getConstants(); @@ -331,7 +338,9 @@ abstract protected function getNonCatchablePatterns(); * * @param string $value * - * @return int|string|null + * @return T|null + * + * @param-out V $value */ abstract protected function getType(&$value); } diff --git a/doctrine/lexer/src/Token.php b/doctrine/lexer/src/Token.php new file mode 100644 index 000000000..4fbbf4e40 --- /dev/null +++ b/doctrine/lexer/src/Token.php @@ -0,0 +1,145 @@ + + */ +final class Token implements ArrayAccess +{ + /** + * The string value of the token in the input string + * + * @readonly + * @var V + */ + public $value; + + /** + * The type of the token (identifier, numeric, string, input parameter, none) + * + * @readonly + * @var T|null + */ + public $type; + + /** + * The position of the token in the input string + * + * @readonly + * @var int + */ + public $position; + + /** + * @param V $value + * @param T|null $type + */ + public function __construct($value, $type, int $position) + { + $this->value = $value; + $this->type = $type; + $this->position = $position; + } + + /** @param T ...$types */ + public function isA(...$types): bool + { + return in_array($this->type, $types, true); + } + + /** + * @deprecated Use the value, type or position property instead + * {@inheritDoc} + */ + public function offsetExists($offset): bool + { + Deprecation::trigger( + 'doctrine/lexer', + 'https://github.com/doctrine/lexer/pull/79', + 'Accessing %s properties via ArrayAccess is deprecated, use the value, type or position property instead', + self::class + ); + + return in_array($offset, ['value', 'type', 'position'], true); + } + + /** + * @deprecated Use the value, type or position property instead + * {@inheritDoc} + * + * @param O $offset + * + * @return mixed + * @psalm-return ( + * O is 'value' + * ? V + * : ( + * O is 'type' + * ? T|null + * : ( + * O is 'position' + * ? int + * : mixed + * ) + * ) + * ) + * + * @template O of array-key + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + Deprecation::trigger( + 'doctrine/lexer', + 'https://github.com/doctrine/lexer/pull/79', + 'Accessing %s properties via ArrayAccess is deprecated, use the value, type or position property instead', + self::class + ); + + return $this->$offset; + } + + /** + * @deprecated no replacement planned + * {@inheritDoc} + */ + public function offsetSet($offset, $value): void + { + Deprecation::trigger( + 'doctrine/lexer', + 'https://github.com/doctrine/lexer/pull/79', + 'Setting %s properties via ArrayAccess is deprecated', + self::class + ); + + $this->$offset = $value; + } + + /** + * @deprecated no replacement planned + * {@inheritDoc} + */ + public function offsetUnset($offset): void + { + Deprecation::trigger( + 'doctrine/lexer', + 'https://github.com/doctrine/lexer/pull/79', + 'Setting %s properties via ArrayAccess is deprecated', + self::class + ); + + $this->$offset = null; + } +} diff --git a/egulias/email-validator/src/EmailLexer.php b/egulias/email-validator/src/EmailLexer.php index 6add6bd2b..4099758ce 100644 --- a/egulias/email-validator/src/EmailLexer.php +++ b/egulias/email-validator/src/EmailLexer.php @@ -213,13 +213,11 @@ public function find($type) : bool public function moveNext() : bool { if ($this->hasToRecord && $this->previous === self::$nullToken) { - $this->accumulator .= $this->token['value']; + $this->accumulator .= ((array) $this->token)['value']; } - $this->previous = $this->token instanceof Token - ? ['value' => $this->token->value, 'type' => $this->token->type, 'position' => $this->token->position] - : $this->token; - + $this->previous = (array) $this->token; + if($this->lookahead === null) { $this->lookahead = self::$nullToken; } @@ -227,7 +225,7 @@ public function moveNext() : bool $hasNext = parent::moveNext(); if ($this->hasToRecord) { - $this->accumulator .= $this->token['value']; + $this->accumulator .= ((array) $this->token)['value']; } return $hasNext; diff --git a/egulias/email-validator/src/Parser.php b/egulias/email-validator/src/Parser.php index b1905f9ab..4e5ac7d1f 100644 --- a/egulias/email-validator/src/Parser.php +++ b/egulias/email-validator/src/Parser.php @@ -29,7 +29,7 @@ abstract protected function preLeftParsing() : Result; public function __construct(EmailLexer $lexer) { - $this->lexer = $lexer; + $this->lexer = $lexer; } public function parse(string $str) : Result @@ -51,7 +51,7 @@ public function parse(string $str) : Result return $localPartResult; } - $domainPartResult = $this->parseRightFromAt(); + $domainPartResult = $this->parseRightFromAt(); if ($domainPartResult->isInvalid()) { return $domainPartResult; @@ -73,6 +73,6 @@ protected function hasAtToken() : bool $this->lexer->moveNext(); $this->lexer->moveNext(); - return $this->lexer->token['type'] !== EmailLexer::S_AT; + return ((array) $this->lexer->token)['type'] !== EmailLexer::S_AT; } } diff --git a/egulias/email-validator/src/Parser/Comment.php b/egulias/email-validator/src/Parser/Comment.php index d6f3032fc..34ef97263 100644 --- a/egulias/email-validator/src/Parser/Comment.php +++ b/egulias/email-validator/src/Parser/Comment.php @@ -31,15 +31,15 @@ public function __construct(EmailLexer $lexer, CommentStrategy $commentStrategy) public function parse() : Result { - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS) { $this->openedParenthesis++; if($this->noClosingParenthesis()) { - return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); + return new InvalidEmail(new UnclosedComment(), ((array) $this->lexer->token)['value']); } } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { - return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEPARENTHESIS) { + return new InvalidEmail(new UnOpenedComment(), ((array) $this->lexer->token)['value']); } $this->warnings[WarningComment::CODE] = new WarningComment(); @@ -58,10 +58,10 @@ public function parse() : Result } if($this->openedParenthesis >= 1) { - return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); + return new InvalidEmail(new UnclosedComment(), ((array) $this->lexer->token)['value']); } if ($this->openedParenthesis < 0) { - return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); + return new InvalidEmail(new UnOpenedComment(), ((array) $this->lexer->token)['value']); } $finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer); @@ -78,7 +78,7 @@ public function parse() : Result private function warnEscaping() : bool { //Backslash found - if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { + if (((array) $this->lexer->token)['type'] !== EmailLexer::S_BACKSLASH) { return false; } @@ -87,12 +87,12 @@ private function warnEscaping() : bool } $this->warnings[QuotedPart::CODE] = - new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']); + new QuotedPart($this->lexer->getPrevious()['type'], ((array) $this->lexer->token)['type']); return true; } - private function noClosingParenthesis() : bool + private function noClosingParenthesis() : bool { try { $this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS); diff --git a/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php b/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php index cbbe3f201..17b686be1 100644 --- a/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php +++ b/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php @@ -23,7 +23,7 @@ public function endOfLoopValidations(EmailLexer $lexer) : Result { //test for end of string if (!$lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), ((array) $lexer->token)['value']); } //add warning //Address is valid within the message but cannot be used unmodified for the envelope diff --git a/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php b/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php index e72319a21..179802b83 100644 --- a/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php +++ b/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php @@ -24,7 +24,7 @@ public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool public function endOfLoopValidations(EmailLexer $lexer) : Result { if (!$lexer->isNextToken(EmailLexer::S_AT)) { - return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), ((array) $lexer->token)['value']); } $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); return new ValidEmail(); diff --git a/egulias/email-validator/src/Parser/DomainLiteral.php b/egulias/email-validator/src/Parser/DomainLiteral.php index e6d66d0bd..10486346a 100644 --- a/egulias/email-validator/src/Parser/DomainLiteral.php +++ b/egulias/email-validator/src/Parser/DomainLiteral.php @@ -39,14 +39,14 @@ public function parse() : Result $addressLiteral = ''; do { - if ($this->lexer->token['type'] === EmailLexer::C_NUL) { - return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::C_NUL) { + return new InvalidEmail(new ExpectingDTEXT(), ((array) $this->lexer->token)['value']); } $this->addObsoleteWarnings(); if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENBRACKET, EmailLexer::S_OPENBRACKET))) { - return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingDTEXT(), ((array) $this->lexer->token)['value']); } if ($this->lexer->isNextTokenAny( @@ -57,21 +57,21 @@ public function parse() : Result } if ($this->lexer->isNextToken(EmailLexer::S_CR)) { - return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']); + return new InvalidEmail(new CRNoLF(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) { - return new InvalidEmail(new UnusualElements($this->lexer->token['value']), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH) { + return new InvalidEmail(new UnusualElements(((array) $this->lexer->token)['value']), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_IPV6TAG) { $IPv6TAG = true; } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEBRACKET) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEBRACKET) { break; } - $addressLiteral .= $this->lexer->token['value']; + $addressLiteral .= ((array) $this->lexer->token)['value']; } while ($this->lexer->moveNext()); @@ -144,7 +144,7 @@ public function checkIPV6Tag($addressLiteral, $maxGroups = 8) : void $this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated(); } } - + public function convertIPv4ToIPv6(string $addressLiteralIPv4) : string { $matchesIP = []; @@ -189,7 +189,7 @@ protected function checkIPV4Tag($addressLiteral) : bool private function addObsoleteWarnings() : void { - if(in_array($this->lexer->token['type'], self::OBSOLETE_WARNINGS)) { + if(in_array(((array) $this->lexer->token)['type'], self::OBSOLETE_WARNINGS)) { $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); } } diff --git a/egulias/email-validator/src/Parser/DomainPart.php b/egulias/email-validator/src/Parser/DomainPart.php index e1f5b3bef..84a4180f3 100644 --- a/egulias/email-validator/src/Parser/DomainPart.php +++ b/egulias/email-validator/src/Parser/DomainPart.php @@ -50,8 +50,8 @@ public function parse() : Result return $domainChecks; } - if ($this->lexer->token['type'] === EmailLexer::S_AT) { - return new InvalidEmail(new ConsecutiveAt(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_AT) { + return new InvalidEmail(new ConsecutiveAt(), ((array) $this->lexer->token)['value']); } $result = $this->doParseDomainPart(); @@ -69,7 +69,7 @@ public function parse() : Result $length = strlen($this->domainPart); if ($length > self::DOMAIN_MAX_LENGTH) { - return new InvalidEmail(new DomainTooLong(), $this->lexer->token['value']); + return new InvalidEmail(new DomainTooLong(), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -79,13 +79,13 @@ private function checkEndOfDomain() : Result { $prev = $this->lexer->getPrevious(); if ($prev['type'] === EmailLexer::S_DOT) { - return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); + return new InvalidEmail(new DotAtEnd(), ((array) $this->lexer->token)['value']); } if ($prev['type'] === EmailLexer::S_HYPHEN) { return new InvalidEmail(new DomainHyphened('Hypen found at the end of the domain'), $prev['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_SP) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_SP) { return new InvalidEmail(new CRLFAtTheEnd(), $prev['value']); } return new ValidEmail(); @@ -98,13 +98,13 @@ private function performDomainStartChecks() : Result if ($invalidTokens->isInvalid()) { return $invalidTokens; } - + $missingDomain = $this->checkEmptyDomain(); if ($missingDomain->isInvalid()) { return $missingDomain; } - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS) { $this->warnings[DeprecatedComment::CODE] = new DeprecatedComment(); } return new ValidEmail(); @@ -112,12 +112,12 @@ private function performDomainStartChecks() : Result private function checkEmptyDomain() : Result { - $thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY || - ($this->lexer->token['type'] === EmailLexer::S_SP && + $thereIsNoDomain = ((array) $this->lexer->token)['type'] === EmailLexer::S_EMPTY || + (((array) $this->lexer->token)['type'] === EmailLexer::S_SP && !$this->lexer->isNextToken(EmailLexer::GENERIC)); if ($thereIsNoDomain) { - return new InvalidEmail(new NoDomainPart(), $this->lexer->token['value']); + return new InvalidEmail(new NoDomainPart(), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -125,11 +125,11 @@ private function checkEmptyDomain() : Result private function checkInvalidTokensAfterAT() : Result { - if ($this->lexer->token['type'] === EmailLexer::S_DOT) { - return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT) { + return new InvalidEmail(new DotAtStart(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { - return new InvalidEmail(new DomainHyphened('After AT'), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_HYPHEN) { + return new InvalidEmail(new DomainHyphened('After AT'), ((array) $this->lexer->token)['value']); } return new ValidEmail(); } @@ -156,8 +156,8 @@ protected function doParseDomainPart() : Result return $notAllowedChars; } - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || - $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS || + ((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { $hasComments = true; $commentsResult = $this->parseComments(); @@ -172,7 +172,7 @@ protected function doParseDomainPart() : Result return $dotsResult; } - if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENBRACKET) { $literalResult = $this->parseDomainLiteral(); $this->addTLDWarnings($tldMissing); @@ -189,9 +189,9 @@ protected function doParseDomainPart() : Result return $FwsResult; } - $domain .= $this->lexer->token['value']; + $domain .= ((array) $this->lexer->token)['value']; - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::GENERIC)) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::GENERIC)) { $tldMissing = false; } @@ -201,7 +201,7 @@ protected function doParseDomainPart() : Result } $this->lexer->moveNext(); - } while (null !== $this->lexer->token['type']); + } while (null !== ((array) $this->lexer->token)['type']); $labelCheck = $this->checkLabelLength(true); if ($labelCheck->isInvalid()) { @@ -219,8 +219,8 @@ protected function doParseDomainPart() : Result private function checkNotAllowedChars($token) : Result { $notAllowed = [EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH=> true]; - if (isset($notAllowed[$token['type']])) { - return new InvalidEmail(new CharNotAllowed(), $token['value']); + if (isset($notAllowed[((array) $token)['type']])) { + return new InvalidEmail(new CharNotAllowed(), ((array) $token)['value']); } return new ValidEmail(); } @@ -233,7 +233,7 @@ protected function parseDomainLiteral() : Result try { $this->lexer->find(EmailLexer::S_CLOSEBRACKET); } catch (\RuntimeException $e) { - return new InvalidEmail(new ExpectingDomainLiteralClose(), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingDomainLiteralClose(), ((array) $this->lexer->token)['value']); } $domainLiteralParser = new DomainLiteralParser($this->lexer); @@ -244,17 +244,17 @@ protected function parseDomainLiteral() : Result protected function checkDomainPartExceptions(array $prev, bool $hasComments) : Result { - if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET && $prev['type'] !== EmailLexer::S_AT) { - return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENBRACKET && $prev['type'] !== EmailLexer::S_AT) { + return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH + if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::GENERIC)) { - return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), ((array) $this->lexer->token)['value']); } return $this->validateTokens($hasComments); @@ -273,8 +273,8 @@ protected function validateTokens(bool $hasComments) : Result $validDomainTokens[EmailLexer::S_CLOSEPARENTHESIS] = true; } - if (!isset($validDomainTokens[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']); + if (!isset($validDomainTokens[((array) $this->lexer->token)['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . ((array) $this->lexer->token)['value']), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -282,13 +282,13 @@ protected function validateTokens(bool $hasComments) : Result private function checkLabelLength(bool $isEndOfDomain = false) : Result { - if ($this->lexer->token['type'] === EmailLexer::S_DOT || $isEndOfDomain) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT || $isEndOfDomain) { if ($this->isLabelTooLong($this->label)) { - return new InvalidEmail(new LabelTooLong(), $this->lexer->token['value']); + return new InvalidEmail(new LabelTooLong(), ((array) $this->lexer->token)['value']); } $this->label = ''; } - $this->label .= $this->lexer->token['value']; + $this->label .= ((array) $this->lexer->token)['value']; return new ValidEmail(); } diff --git a/egulias/email-validator/src/Parser/DoubleQuote.php b/egulias/email-validator/src/Parser/DoubleQuote.php index b32e2b6b2..d722292d4 100644 --- a/egulias/email-validator/src/Parser/DoubleQuote.php +++ b/egulias/email-validator/src/Parser/DoubleQuote.php @@ -30,24 +30,24 @@ public function parse() : Result EmailLexer::S_CR => true, EmailLexer::S_LF => true ]; - + $setSpecialsWarning = true; $this->lexer->moveNext(); - while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) { - if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { + while (((array) $this->lexer->token)['type'] !== EmailLexer::S_DQUOTE && null !== ((array) $this->lexer->token)['type']) { + if (isset($special[((array) $this->lexer->token)['type']]) && $setSpecialsWarning) { $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); $setSpecialsWarning = false; } - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) { $this->lexer->moveNext(); } $this->lexer->moveNext(); - if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); + if (!$this->escaped() && isset($invalid[((array) $this->lexer->token)['type']])) { + return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), ((array) $this->lexer->token)['value']); } } @@ -59,7 +59,7 @@ public function parse() : Result } if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { - return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -71,15 +71,15 @@ protected function checkDQUOTE() : Result if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { $description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit'; - return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT($description), ((array) $this->lexer->token)['value']); } try { $this->lexer->find(EmailLexer::S_DQUOTE); } catch (\Exception $e) { - return new InvalidEmail(new UnclosedQuotedString(), $this->lexer->token['value']); + return new InvalidEmail(new UnclosedQuotedString(), ((array) $this->lexer->token)['value']); } - $this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], $this->lexer->token['value']); + $this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], ((array) $this->lexer->token)['value']); return new ValidEmail(); } diff --git a/egulias/email-validator/src/Parser/FoldingWhiteSpace.php b/egulias/email-validator/src/Parser/FoldingWhiteSpace.php index fff6ec3ef..be4b05b82 100644 --- a/egulias/email-validator/src/Parser/FoldingWhiteSpace.php +++ b/egulias/email-validator/src/Parser/FoldingWhiteSpace.php @@ -36,16 +36,16 @@ public function parse() : Result return $resultCRLF; } - if ($this->lexer->token['type'] === EmailLexer::S_CR) { - return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_CR) { + return new InvalidEmail(new CRNoLF(), ((array) $this->lexer->token)['value']); } if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { - return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->token['value']); + return new InvalidEmail(new AtextAfterCFWS(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { - return new InvalidEmail(new ExpectingCTEXT(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_LF || ((array) $this->lexer->token)['type'] === EmailLexer::C_NUL) { + return new InvalidEmail(new ExpectingCTEXT(), ((array) $this->lexer->token)['value']); } if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { @@ -59,28 +59,28 @@ public function parse() : Result protected function checkCRLFInFWS() : Result { - if ($this->lexer->token['type'] !== EmailLexer::CRLF) { + if (((array) $this->lexer->token)['type'] !== EmailLexer::CRLF) { return new ValidEmail(); } if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - return new InvalidEmail(new CRLFX2(), $this->lexer->token['value']); + return new InvalidEmail(new CRLFX2(), ((array) $this->lexer->token)['value']); } //this has no coverage. Condition is repeated from above one if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - return new InvalidEmail(new CRLFAtTheEnd(), $this->lexer->token['value']); + return new InvalidEmail(new CRLFAtTheEnd(), ((array) $this->lexer->token)['value']); } return new ValidEmail(); } - + protected function isFWS() : bool { if ($this->escaped()) { return false; } - return in_array($this->lexer->token['type'], self::FWS_TYPES); + return in_array(((array) $this->lexer->token)['type'], self::FWS_TYPES); } } diff --git a/egulias/email-validator/src/Parser/IDLeftPart.php b/egulias/email-validator/src/Parser/IDLeftPart.php index 5fd9cdf99..3b01ae290 100644 --- a/egulias/email-validator/src/Parser/IDLeftPart.php +++ b/egulias/email-validator/src/Parser/IDLeftPart.php @@ -10,6 +10,6 @@ class IDLeftPart extends LocalPart { protected function parseComments(): Result { - return new InvalidEmail(new CommentsInIDRight(), $this->lexer->token['value']); + return new InvalidEmail(new CommentsInIDRight(), ((array) $this->lexer->token)['value']); } } diff --git a/egulias/email-validator/src/Parser/IDRightPart.php b/egulias/email-validator/src/Parser/IDRightPart.php index 1a1268f2d..d19e05ab6 100644 --- a/egulias/email-validator/src/Parser/IDRightPart.php +++ b/egulias/email-validator/src/Parser/IDRightPart.php @@ -20,9 +20,9 @@ protected function validateTokens(bool $hasComments) : Result EmailLexer::S_GREATERTHAN => true, EmailLexer::S_LOWERTHAN => true, ]; - - if (isset($invalidDomainTokens[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']); + + if (isset($invalidDomainTokens[((array) $this->lexer->token)['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . ((array) $this->lexer->token)['value']), ((array) $this->lexer->token)['value']); } return new ValidEmail(); } diff --git a/egulias/email-validator/src/Parser/LocalPart.php b/egulias/email-validator/src/Parser/LocalPart.php index 154521b27..3f2ef7d8e 100644 --- a/egulias/email-validator/src/Parser/LocalPart.php +++ b/egulias/email-validator/src/Parser/LocalPart.php @@ -36,12 +36,12 @@ public function parse() : Result { $this->lexer->startRecording(); - while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) { + while (((array) $this->lexer->token)['type'] !== EmailLexer::S_AT && null !== ((array) $this->lexer->token)['type']) { if ($this->hasDotAtStart()) { - return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); + return new InvalidEmail(new DotAtStart(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_DQUOTE) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DQUOTE) { $dquoteParsingResult = $this->parseDoubleQuote(); //Invalid double quote parsing @@ -50,8 +50,8 @@ public function parse() : Result } } - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || - $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { + if (((array) $this->lexer->token)['type'] === EmailLexer::S_OPENPARENTHESIS || + ((array) $this->lexer->token)['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { $commentsResult = $this->parseComments(); //Invalid comment parsing @@ -60,14 +60,14 @@ public function parse() : Result } } - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), ((array) $this->lexer->token)['value']); } - if ($this->lexer->token['type'] === EmailLexer::S_DOT && + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_AT) ) { - return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); + return new InvalidEmail(new DotAtEnd(), ((array) $this->lexer->token)['value']); } $resultEscaping = $this->validateEscaping(); @@ -99,8 +99,8 @@ public function parse() : Result protected function validateTokens(bool $hasComments) : Result { - if (isset(self::INVALID_TOKENS[$this->lexer->token['type']])) { - return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->token['value']); + if (isset(self::INVALID_TOKENS[((array) $this->lexer->token)['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token found'), ((array) $this->lexer->token)['value']); } return new ValidEmail(); } @@ -110,7 +110,7 @@ public function localPart() : string return $this->localPart; } - private function parseLocalFWS() : Result + private function parseLocalFWS() : Result { $foldingWS = new FoldingWhiteSpace($this->lexer); $resultFWS = $foldingWS->parse(); @@ -122,7 +122,7 @@ private function parseLocalFWS() : Result private function hasDotAtStart() : bool { - return $this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']; + return ((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']; } private function parseDoubleQuote() : Result @@ -148,12 +148,12 @@ protected function parseComments(): Result private function validateEscaping() : Result { //Backslash found - if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { + if (((array) $this->lexer->token)['type'] !== EmailLexer::S_BACKSLASH) { return new ValidEmail(); } if ($this->lexer->isNextToken(EmailLexer::GENERIC)) { - return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), $this->lexer->token['value']); + return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), ((array) $this->lexer->token)['value']); } if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { diff --git a/egulias/email-validator/src/Parser/PartParser.php b/egulias/email-validator/src/Parser/PartParser.php index a75a172ac..7fc6d7bf3 100644 --- a/egulias/email-validator/src/Parser/PartParser.php +++ b/egulias/email-validator/src/Parser/PartParser.php @@ -45,8 +45,8 @@ protected function parseFWS() : Result protected function checkConsecutiveDots() : Result { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + if (((array) $this->lexer->token)['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), ((array) $this->lexer->token)['value']); } return new ValidEmail(); @@ -58,6 +58,6 @@ protected function escaped() : bool return $previous && $previous['type'] === EmailLexer::S_BACKSLASH && - $this->lexer->token['type'] !== EmailLexer::GENERIC; + ((array) $this->lexer->token)['type'] !== EmailLexer::GENERIC; } } diff --git a/symfony/polyfill-intl-idn/Idn.php b/symfony/polyfill-intl-idn/Idn.php index 86710b94e..3dc061209 100644 --- a/symfony/polyfill-intl-idn/Idn.php +++ b/symfony/polyfill-intl-idn/Idn.php @@ -11,8 +11,6 @@ namespace Symfony\Polyfill\Intl\Idn; -use Exception; -use Normalizer; use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; @@ -167,7 +165,7 @@ public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, if (1 === preg_match('/[^\x00-\x7F]/', $label)) { try { $label = 'xn--'.self::punycodeEncode($label); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; } @@ -335,8 +333,8 @@ private static function process($domain, array $options, Info $info) $domain = self::mapCodePoints($domain, $options, $info); // Step 2. Normalize the domain name string to Unicode Normalization Form C. - if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { - $domain = Normalizer::normalize($domain, Normalizer::FORM_C); + if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) { + $domain = \Normalizer::normalize($domain, \Normalizer::FORM_C); } // Step 3. Break the string into labels at U+002E (.) FULL STOP. @@ -350,7 +348,7 @@ private static function process($domain, array $options, Info $info) if ('xn--' === substr($label, 0, 4)) { try { $label = self::punycodeDecode(substr($label, 4)); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; continue; @@ -496,7 +494,7 @@ private static function validateLabel($label, Info $info, array $options, $canBe } // Step 1. The label must be in Unicode Normalization Form C. - if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { + if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) { $info->errors |= self::ERROR_INVALID_ACE_LABEL; } @@ -583,7 +581,7 @@ private static function punycodeDecode($input) for ($j = 0; $j < $b; ++$j) { if ($bytes[$j] > 0x7F) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $output[$out++] = $input[$j]; @@ -599,17 +597,17 @@ private static function punycodeDecode($input) for ($k = self::BASE; /* no condition */; $k += self::BASE) { if ($in >= $inputLength) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; if ($digit < 0) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } if ($digit > intdiv(self::MAX_INT - $i, $w)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $i += $digit * $w; @@ -629,7 +627,7 @@ private static function punycodeDecode($input) $baseMinusT = self::BASE - $t; if ($w > intdiv(self::MAX_INT, $baseMinusT)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $w *= $baseMinusT; @@ -639,7 +637,7 @@ private static function punycodeDecode($input) $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $n += intdiv($i, $outPlusOne); @@ -694,7 +692,7 @@ private static function punycodeEncode($input) } if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $delta += ($m - $n) * ($h + 1); @@ -702,7 +700,7 @@ private static function punycodeEncode($input) foreach ($iter as $codePoint) { if ($codePoint < $n && 0 === ++$delta) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } if ($codePoint === $n) { diff --git a/symfony/polyfill-intl-idn/LICENSE b/symfony/polyfill-intl-idn/LICENSE index 03c5e2577..fd0a0626a 100644 --- a/symfony/polyfill-intl-idn/LICENSE +++ b/symfony/polyfill-intl-idn/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham +Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham 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/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php index 5bb70e48a..d285acd13 100644 --- a/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +++ b/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/symfony/polyfill-intl-idn/Resources/unidata/Regex.php index 5c1c51dde..3c6af0c13 100644 --- a/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +++ b/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/symfony/polyfill-intl-normalizer/LICENSE b/symfony/polyfill-intl-normalizer/LICENSE index 4cd8bdd30..6e3afce69 100644 --- a/symfony/polyfill-intl-normalizer/LICENSE +++ b/symfony/polyfill-intl-normalizer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present 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/symfony/polyfill-php72/LICENSE b/symfony/polyfill-php72/LICENSE index 4cd8bdd30..6e3afce69 100644 --- a/symfony/polyfill-php72/LICENSE +++ b/symfony/polyfill-php72/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present 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