From 34e849666eb17a28ab64df85f8e98b76a88834d8 Mon Sep 17 00:00:00 2001 From: Shankar Konar Date: Mon, 11 Oct 2021 11:22:13 +0530 Subject: [PATCH 1/5] PHP 8.1 support Signed-off-by: Shankar Konar --- composer.json | 2 +- composer.lock | 256 ++++++++++++++++++++++++----------------------- phpunit.xml.dist | 3 +- 3 files changed, 133 insertions(+), 128 deletions(-) diff --git a/composer.json b/composer.json index 4445eb9..bba3620 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "sort-packages": true }, "require": { - "php": "^7.3 || ~8.0.0", + "php": "^7.3 || ~8.0.0 || ~8.1.0", "ext-mbstring": "*", "container-interop/container-interop": "^1.2", "laminas/laminas-math": "^3.0", diff --git a/composer.lock b/composer.lock index 25abadf..f6e509e 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": "f340a945348558cb3c0cb8258912f75c", + "content-hash": "54cb5a0fe3630652246e2e51501a46d7", "packages": [ { "name": "container-interop/container-interop", @@ -44,29 +44,29 @@ }, { "name": "laminas/laminas-math", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-math.git", - "reference": "0921d16529e00b37927ba96129e49567d8bfaf31" + "reference": "79f6453a47a5774cf3736c5c66cb4818486681da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-math/zipball/0921d16529e00b37927ba96129e49567d8bfaf31", - "reference": "0921d16529e00b37927ba96129e49567d8bfaf31", + "url": "https://api.github.com/repos/laminas/laminas-math/zipball/79f6453a47a5774cf3736c5c66cb4818486681da", + "reference": "79f6453a47a5774cf3736c5c66cb4818486681da", "shasum": "" }, "require": { "ext-mbstring": "*", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, "replace": { "zendframework/zend-math": "^3.2.0" }, "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5.5" }, "suggest": { "ext-bcmath": "If using the bcmath functionality", @@ -108,33 +108,34 @@ "type": "community_bridge" } ], - "time": "2021-01-22T09:29:45+00:00" + "time": "2021-10-09T15:15:23+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.3.1", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe" + "reference": "c53d8537f108fac3fae652677a19735db730ba46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/d81c7ffe602ed0e6ecb18691019111c0f4bf1efe", - "reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/c53d8537f108fac3fae652677a19735db730ba46", + "reference": "c53d8537f108fac3fae652677a19735db730ba46", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ^8.0" + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, - "replace": { - "zendframework/zend-stdlib": "^3.2.1" + "conflict": { + "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.3.0", "phpbench/phpbench": "^0.17.1", - "phpunit/phpunit": "~9.3.7" + "phpunit/phpunit": "~9.3.7", + "psalm/plugin-phpunit": "^0.16.0", + "vimeo/psalm": "^4.7" }, "type": "library", "autoload": { @@ -166,28 +167,30 @@ "type": "community_bridge" } ], - "time": "2020-11-19T20:18:59+00:00" + "time": "2021-09-02T16:11:32+00:00" }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642" + "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", + "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "php": "^7.3 || ~8.0.0 || ~8.1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" + "phpunit/phpunit": "^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" }, "type": "library", "extra": { @@ -226,31 +229,26 @@ "type": "community_bridge" } ], - "time": "2020-09-14T14:23:00+00:00" + "time": "2021-09-03T17:53:30+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -263,7 +261,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -277,9 +275,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/1.1.1" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-03-05T17:36:06+00:00" } ], "packages-dev": [ @@ -454,16 +452,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -504,22 +502,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "time": "2020-12-20T10:01:03+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -564,22 +562,22 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2020-06-27T14:33:11+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "3.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { @@ -615,9 +613,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.0.4" + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "time": "2020-12-13T23:18:30+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -730,16 +728,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -747,7 +745,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -773,39 +772,39 @@ "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.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "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", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -840,29 +839,29 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" }, - "time": "2020-12-19T10:15:11+00:00" + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.5", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.12.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -911,7 +910,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" }, "funding": [ { @@ -919,7 +918,7 @@ "type": "github" } ], - "time": "2020-11-28T06:44:49+00:00" + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1164,16 +1163,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.2", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -1185,11 +1184,11 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1203,7 +1202,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -1251,7 +1250,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -1263,7 +1262,7 @@ "type": "github" } ], - "time": "2021-02-02T14:45:58+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "sebastian/cli-parser", @@ -1771,16 +1770,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { @@ -1823,7 +1822,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" }, "funding": [ { @@ -1831,7 +1830,7 @@ "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -2122,16 +2121,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -2166,7 +2165,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -2174,7 +2173,7 @@ "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", @@ -2314,16 +2313,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -2335,7 +2334,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2373,7 +2372,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -2389,20 +2388,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -2431,7 +2430,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -2439,34 +2438,39 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -2490,9 +2494,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -2501,9 +2505,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3 || ~8.0.0", + "php": "^7.3 || ~8.0.0 || ~8.1.0", "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index bb1cbb3..53cca46 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,8 @@ + colors="true" + convertDeprecationsToExceptions="true"> ./test From cf3d309e9f605a5782455a3f087125a22ca336c7 Mon Sep 17 00:00:00 2001 From: Shankar Konar Date: Tue, 12 Oct 2021 17:44:15 +0530 Subject: [PATCH 2/5] updated dependency version Signed-off-by: Shankar Konar --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bba3620..f28aa31 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ "php": "^7.3 || ~8.0.0 || ~8.1.0", "ext-mbstring": "*", "container-interop/container-interop": "^1.2", - "laminas/laminas-math": "^3.0", - "laminas/laminas-stdlib": "^2.7.7 || ^3.1", + "laminas/laminas-math": "^3.4", + "laminas/laminas-stdlib": "^3.6", "laminas/laminas-zendframework-bridge": "^1.0" }, "require-dev": { From c7cbe1a08d7ac0f20b3e65992a3ee75b36e2c4c0 Mon Sep 17 00:00:00 2001 From: Shankar Konar Date: Tue, 26 Oct 2021 18:38:41 +0530 Subject: [PATCH 3/5] Fixed null parameter issues Signed-off-by: Shankar Konar --- src/Hybrid.php | 2 +- src/Symmetric/Openssl.php | 2 +- test/FileCipher/AbstractFileCipherTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Hybrid.php b/src/Hybrid.php index 46b9c12..9159de0 100644 --- a/src/Hybrid.php +++ b/src/Hybrid.php @@ -102,7 +102,7 @@ public function encrypt($plaintext, $keys = null) * @return string * @throws RuntimeException */ - public function decrypt($msg, $privateKey = null, $passPhrase = null, $id = null) + public function decrypt($msg, $privateKey = null, $passPhrase = null, $id = "") { // get the session key list($encKeys, $ciphertext) = explode(';', $msg, 2); diff --git a/src/Symmetric/Openssl.php b/src/Symmetric/Openssl.php index 0b4c366..df1dd58 100644 --- a/src/Symmetric/Openssl.php +++ b/src/Symmetric/Openssl.php @@ -155,7 +155,7 @@ class Openssl implements SymmetricInterface * * @var string */ - protected $aad; + protected $aad = ''; /** * Store the tag for authentication (only for PHP 7.1+) diff --git a/test/FileCipher/AbstractFileCipherTest.php b/test/FileCipher/AbstractFileCipherTest.php index 4d29b0d..fd1bbed 100644 --- a/test/FileCipher/AbstractFileCipherTest.php +++ b/test/FileCipher/AbstractFileCipherTest.php @@ -28,12 +28,12 @@ abstract class AbstractFileCipherTest extends TestCase /** * @var string */ - protected $fileIn; + protected $fileIn = ''; /** * @var string */ - protected $fileOut; + protected $fileOut = ''; public function setUp(): void { From 06e8ee48132359e38664b367fb032b2ea20a9176 Mon Sep 17 00:00:00 2001 From: Shankar Konar Date: Sun, 21 Nov 2021 19:21:19 +0530 Subject: [PATCH 4/5] Pure implementation for mhash_keygen_s2k function Signed-off-by: Shankar Konar --- src/Key/Derivation/SaltedS2k.php | 23 ++++++++++++++++++++++- test/Key/Derivation/SaltedS2kTest.php | 12 ++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index 2bfad48..b8aa57e 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -71,6 +71,27 @@ public static function calc($hash, $password, $salt, $bytes) if (mb_strlen($salt, '8bit') < 8) { throw new Exception\InvalidArgumentException('The salt size must be at least of 8 bytes'); } - return mhash_keygen_s2k(static::$supportedMhashAlgos[$hash], $password, $salt, $bytes); + + if (PHP_VERSION_ID >= 80100) { + trigger_error('Function mhash_keygen_s2k() is deprecated starting with PHP 8.1', E_USER_DEPRECATED); + } + + $result = ''; + + foreach (range(0, ceil($bytes / strlen(hash($hash, '', true))) - 1) as $i) + { + $result .= hash( + $hash, + str_repeat("\0", $i) . str_pad( + substr($salt, 0, 8), + 8, + "\0", + STR_PAD_RIGHT + ) . $password, + true + ); + } + + return substr($result, 0, intval($bytes)); } } diff --git a/test/Key/Derivation/SaltedS2kTest.php b/test/Key/Derivation/SaltedS2kTest.php index c7d6a0f..e856d4c 100644 --- a/test/Key/Derivation/SaltedS2kTest.php +++ b/test/Key/Derivation/SaltedS2kTest.php @@ -32,6 +32,10 @@ public function testCalc() return; } + if (PHP_VERSION_ID >= 80100) { + $this->expectDeprecation(); + } + $password = SaltedS2k::calc('sha256', 'test', $this->salt, 32); $this->assertEquals(32, strlen($password)); $this->assertEquals('qzQISUBUSP1iqYtwe/druhdOVqluc/Y2TetdSHSbaw8=', base64_encode($password)); @@ -44,6 +48,10 @@ public function testCalcWithWrongHash() return; } + if (PHP_VERSION_ID >= 80100) { + $this->expectDeprecation(); + } + $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage(sprintf( 'The hash algorithm wrong is not supported by %s', @@ -59,6 +67,10 @@ public function testCalcWithWrongSalt() return; } + if (PHP_VERSION_ID >= 80100) { + $this->expectDeprecation(); + } + $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage('The salt size must be at least of 8 bytes'); SaltedS2k::calc('sha256', 'test', substr($this->salt, -1), 32); From 9e817ba5cf967162b6a7a96dfdcec6e467148bb3 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Tue, 23 Nov 2021 11:08:07 +0100 Subject: [PATCH 5/5] do not throw deprecation messages on PHP 8.1 Signed-off-by: Dennis Riehle --- src/Key/Derivation/SaltedS2k.php | 7 +------ test/Key/Derivation/SaltedS2kTest.php | 12 ------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index b8aa57e..dfaa626 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -72,14 +72,9 @@ public static function calc($hash, $password, $salt, $bytes) throw new Exception\InvalidArgumentException('The salt size must be at least of 8 bytes'); } - if (PHP_VERSION_ID >= 80100) { - trigger_error('Function mhash_keygen_s2k() is deprecated starting with PHP 8.1', E_USER_DEPRECATED); - } - $result = ''; - foreach (range(0, ceil($bytes / strlen(hash($hash, '', true))) - 1) as $i) - { + foreach (range(0, ceil($bytes / strlen(hash($hash, '', true))) - 1) as $i) { $result .= hash( $hash, str_repeat("\0", $i) . str_pad( diff --git a/test/Key/Derivation/SaltedS2kTest.php b/test/Key/Derivation/SaltedS2kTest.php index e856d4c..c7d6a0f 100644 --- a/test/Key/Derivation/SaltedS2kTest.php +++ b/test/Key/Derivation/SaltedS2kTest.php @@ -32,10 +32,6 @@ public function testCalc() return; } - if (PHP_VERSION_ID >= 80100) { - $this->expectDeprecation(); - } - $password = SaltedS2k::calc('sha256', 'test', $this->salt, 32); $this->assertEquals(32, strlen($password)); $this->assertEquals('qzQISUBUSP1iqYtwe/druhdOVqluc/Y2TetdSHSbaw8=', base64_encode($password)); @@ -48,10 +44,6 @@ public function testCalcWithWrongHash() return; } - if (PHP_VERSION_ID >= 80100) { - $this->expectDeprecation(); - } - $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage(sprintf( 'The hash algorithm wrong is not supported by %s', @@ -67,10 +59,6 @@ public function testCalcWithWrongSalt() return; } - if (PHP_VERSION_ID >= 80100) { - $this->expectDeprecation(); - } - $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage('The salt size must be at least of 8 bytes'); SaltedS2k::calc('sha256', 'test', substr($this->salt, -1), 32);