From d37e41ee177069b4226270a13cd14c1187efa10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Mon, 14 Jun 2021 23:08:00 +0200 Subject: [PATCH 1/4] Update dependencies Lock file operations: 1 install, 20 updates, 0 removals - Upgrading doctrine/annotations (1.12.1 => 1.13.1) - Upgrading phpbench/phpbench (1.0.0 => 1.0.2) - Upgrading phpstan/phpstan (0.12.86 => 0.12.89) - Upgrading phpstan/phpstan-phpunit (0.12.18 => 0.12.19) - Upgrading phpunit/phpunit (9.5.4 => 9.5.5) - Locking psr/cache (1.0.1) - Upgrading sebastian/global-state (5.0.2 => 5.0.3) - Upgrading sebastian/type (2.3.1 => 2.3.2) - Upgrading slevomat/coding-standard (7.0.8 => 7.0.9) - Upgrading symfony/console (v5.2.7 => v5.3.0) - Upgrading symfony/filesystem (v5.2.7 => v5.3.0) - Upgrading symfony/finder (v5.2.4 => v5.3.0) - Upgrading symfony/options-resolver (v5.2.4 => v5.3.0) - Upgrading symfony/polyfill-ctype (v1.22.1 => v1.23.0) - Upgrading symfony/polyfill-intl-grapheme (v1.22.1 => v1.23.0) - Upgrading symfony/polyfill-intl-normalizer (v1.22.1 => v1.23.0) - Upgrading symfony/polyfill-mbstring (v1.22.1 => v1.23.0) - Upgrading symfony/polyfill-php73 (v1.22.1 => v1.23.0) - Upgrading symfony/polyfill-php80 (v1.22.1 => v1.23.0) - Upgrading symfony/process (v5.2.7 => v5.3.0) - Upgrading symfony/string (v5.2.6 => v5.3.0) --- composer.lock | 334 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 198 insertions(+), 136 deletions(-) diff --git a/composer.lock b/composer.lock index ee4fcc1d..b1a40482 100644 --- a/composer.lock +++ b/composer.lock @@ -79,28 +79,30 @@ }, { "name": "doctrine/annotations", - "version": "1.12.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", "shasum": "" }, "require": { "doctrine/lexer": "1.*", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0" + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", + "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "type": "library", "autoload": { @@ -143,9 +145,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.12.1" + "source": "https://github.com/doctrine/annotations/tree/1.13.1" }, - "time": "2021-02-21T21:00:45+00:00" + "time": "2021-05-16T18:07:53+00:00" }, { "name": "doctrine/coding-standard", @@ -680,16 +682,16 @@ }, { "name": "phpbench/phpbench", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "60d94f4ff0a318fc857f15941d4e86f0090bc77c" + "reference": "26505debe1f1e7ed25f86eba7d65de5bd5b514ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/60d94f4ff0a318fc857f15941d4e86f0090bc77c", - "reference": "60d94f4ff0a318fc857f15941d4e86f0090bc77c", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/26505debe1f1e7ed25f86eba7d65de5bd5b514ba", + "reference": "26505debe1f1e7ed25f86eba7d65de5bd5b514ba", "shasum": "" }, "require": { @@ -754,9 +756,15 @@ "description": "PHP Benchmarking Framework", "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.0.0" + "source": "https://github.com/phpbench/phpbench/tree/1.0.2" }, - "time": "2021-05-09T10:31:28+00:00" + "funding": [ + { + "url": "https://github.com/dantleech", + "type": "github" + } + ], + "time": "2021-05-28T20:43:12+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1080,16 +1088,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.86", + "version": "0.12.89", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "a84fdc53ecca7643dbc89ef8880d8b393a6c155a" + "reference": "54c0f5a6c30511b77128d58b6369f718df250542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a84fdc53ecca7643dbc89ef8880d8b393a6c155a", - "reference": "a84fdc53ecca7643dbc89ef8880d8b393a6c155a", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/54c0f5a6c30511b77128d58b6369f718df250542", + "reference": "54c0f5a6c30511b77128d58b6369f718df250542", "shasum": "" }, "require": { @@ -1120,13 +1128,17 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.86" + "source": "https://github.com/phpstan/phpstan/tree/0.12.89" }, "funding": [ { "url": "https://github.com/ondrejmirtes", "type": "github" }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, { "url": "https://www.patreon.com/phpstan", "type": "patreon" @@ -1136,7 +1148,7 @@ "type": "tidelift" } ], - "time": "2021-05-08T11:29:01+00:00" + "time": "2021-06-09T20:23:49+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -1191,21 +1203,21 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.18", + "version": "0.12.19", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72" + "reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72", - "reference": "ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/52f7072ddc5f81492f9d2de65a24813a48c90b18", + "reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^0.12.60" + "phpstan/phpstan": "^0.12.86" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -1240,9 +1252,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.18" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.19" }, - "time": "2021-03-06T11:51:27+00:00" + "time": "2021-04-30T11:10:37+00:00" }, { "name": "phpstan/phpstan-strict-rules", @@ -1615,16 +1627,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.4", + "version": "9.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", "shasum": "" }, "require": { @@ -1654,7 +1666,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.2", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -1702,7 +1714,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" }, "funding": [ { @@ -1714,7 +1726,56 @@ "type": "github" } ], - "time": "2021-03-23T07:16:29+00:00" + "time": "2021-06-05T04:49:07+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/container", @@ -2320,16 +2381,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": { @@ -2372,7 +2433,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": [ { @@ -2380,7 +2441,7 @@ "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -2671,16 +2732,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0d1c587401514d17e8f9258a27e23527cb1b06c1", + "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1", "shasum": "" }, "require": { @@ -2715,7 +2776,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.2" }, "funding": [ { @@ -2723,7 +2784,7 @@ "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-04T13:02:07+00:00" }, { "name": "sebastian/version", @@ -2843,16 +2904,16 @@ }, { "name": "slevomat/coding-standard", - "version": "7.0.8", + "version": "7.0.9", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932" + "reference": "d59652e000bcde019459dcba677de030867d0232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/48141737f9e5ed701ef8bcea2027e701b50bd932", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d59652e000bcde019459dcba677de030867d0232", + "reference": "d59652e000bcde019459dcba677de030867d0232", "shasum": "" }, "require": { @@ -2864,16 +2925,16 @@ "require-dev": { "phing/phing": "2.16.4", "php-parallel-lint/php-parallel-lint": "1.3.0", - "phpstan/phpstan": "0.12.86", + "phpstan/phpstan": "0.12.88", "phpstan/phpstan-deprecation-rules": "0.12.6", - "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-phpunit": "0.12.19", "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "7.5.20|8.5.5|9.5.4" + "phpunit/phpunit": "7.5.20|8.5.5|9.5.5" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -2888,7 +2949,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.8" + "source": "https://github.com/slevomat/coding-standard/tree/7.0.9" }, "funding": [ { @@ -2900,7 +2961,7 @@ "type": "tidelift" } ], - "time": "2021-05-10T08:51:20+00:00" + "time": "2021-06-07T10:08:42+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2960,20 +3021,21 @@ }, { "name": "symfony/console", - "version": "v5.2.7", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629" + "reference": "058553870f7809087fa80fa734704a21b9bcaeb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/90374b8ed059325b49a29b55b3f8bb4062c87629", - "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629", + "url": "https://api.github.com/repos/symfony/console/zipball/058553870f7809087fa80fa734704a21b9bcaeb2", + "reference": "058553870f7809087fa80fa734704a21b9bcaeb2", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.15", @@ -3037,7 +3099,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.7" + "source": "https://github.com/symfony/console/tree/v5.3.0" }, "funding": [ { @@ -3053,7 +3115,7 @@ "type": "tidelift" } ], - "time": "2021-04-19T14:07:32+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3124,16 +3186,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.2.7", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0" + "reference": "348116319d7fb7d1faa781d26a48922428013eb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/056e92acc21d977c37e6ea8e97374b2a6c8551b0", - "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/348116319d7fb7d1faa781d26a48922428013eb2", + "reference": "348116319d7fb7d1faa781d26a48922428013eb2", "shasum": "" }, "require": { @@ -3166,7 +3228,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.2.7" + "source": "https://github.com/symfony/filesystem/tree/v5.3.0" }, "funding": [ { @@ -3182,20 +3244,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:42:13+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "symfony/finder", - "version": "v5.2.4", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0d639a0943822626290d169965804f79400e6a04" + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04", - "reference": "0d639a0943822626290d169965804f79400e6a04", + "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", "shasum": "" }, "require": { @@ -3227,7 +3289,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.4" + "source": "https://github.com/symfony/finder/tree/v5.3.0" }, "funding": [ { @@ -3243,20 +3305,20 @@ "type": "tidelift" } ], - "time": "2021-02-15T18:55:04+00:00" + "time": "2021-05-26T12:52:38+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.2.4", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", - "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/162e886ca035869866d233a2bfef70cc28f9bbe5", + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5", "shasum": "" }, "require": { @@ -3296,7 +3358,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" + "source": "https://github.com/symfony/options-resolver/tree/v5.3.0" }, "funding": [ { @@ -3312,20 +3374,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T12:56:27+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "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": { @@ -3337,7 +3399,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3375,7 +3437,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -3391,20 +3453,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", "shasum": "" }, "require": { @@ -3416,7 +3478,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3456,7 +3518,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" }, "funding": [ { @@ -3472,20 +3534,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -3497,7 +3559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3540,7 +3602,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" }, "funding": [ { @@ -3556,20 +3618,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", "shasum": "" }, "require": { @@ -3581,7 +3643,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3620,7 +3682,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" }, "funding": [ { @@ -3636,20 +3698,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { @@ -3658,7 +3720,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3699,7 +3761,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" }, "funding": [ { @@ -3715,20 +3777,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", "shasum": "" }, "require": { @@ -3737,7 +3799,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3782,7 +3844,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" }, "funding": [ { @@ -3798,20 +3860,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/process", - "version": "v5.2.7", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e" + "reference": "53e36cb1c160505cdaf1ef201501669c4c317191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "url": "https://api.github.com/repos/symfony/process/zipball/53e36cb1c160505cdaf1ef201501669c4c317191", + "reference": "53e36cb1c160505cdaf1ef201501669c4c317191", "shasum": "" }, "require": { @@ -3844,7 +3906,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/process/tree/v5.3.0" }, "funding": [ { @@ -3860,7 +3922,7 @@ "type": "tidelift" } ], - "time": "2021-04-08T10:27:02+00:00" + "time": "2021-05-26T12:52:38+00:00" }, { "name": "symfony/service-contracts", @@ -3943,16 +4005,16 @@ }, { "name": "symfony/string", - "version": "v5.2.6", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + "reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "url": "https://api.github.com/repos/symfony/string/zipball/a9a0f8b6aafc5d2d1c116dcccd1573a95153515b", + "reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b", "shasum": "" }, "require": { @@ -4006,7 +4068,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.6" + "source": "https://github.com/symfony/string/tree/v5.3.0" }, "funding": [ { @@ -4022,7 +4084,7 @@ "type": "tidelift" } ], - "time": "2021-03-17T17:12:15+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "theseer/tokenizer", @@ -4192,5 +4254,5 @@ "php": ">=7.4.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } From e630caace055045a5c9e3249942637b1f4671814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 15 Jun 2021 00:46:44 +0200 Subject: [PATCH 2/4] Introduce caching API Allowing users to vary the implementation of route caching according to their needs. This makes the file system based cache a bit more robust by using exclusive locking and preventing reads of partial files. We're also adding an APCu-based implementation, so that we can compare FastRoute to HackRouting. More info: - https://github.com/azjezz/hack-routing - https://github.com/azjezz/benchmark-php-routing --- composer.json | 3 ++ src/Cache.php | 14 +++++ src/Cache/ApcuCache.php | 28 ++++++++++ src/Cache/FileCache.php | 110 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+) create mode 100644 src/Cache.php create mode 100644 src/Cache/ApcuCache.php create mode 100644 src/Cache/FileCache.php diff --git a/composer.json b/composer.json index 6430eb6f..a71409df 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,9 @@ "phpstan/phpstan-strict-rules": "^0.12", "phpunit/phpunit": "^9.5" }, + "suggest": { + "ext-apcu": "To be able to use APCu cache driver" + }, "config": { "preferred-install": "dist", "sort-packages": true diff --git a/src/Cache.php b/src/Cache.php new file mode 100644 index 00000000..ebea8389 --- /dev/null +++ b/src/Cache.php @@ -0,0 +1,14 @@ +>, 1: array}>}>>} $loader + * + * @return array{0: array>, 1: array}>}>>} + */ + public function get(string $key, callable $loader): array; +} diff --git a/src/Cache/ApcuCache.php b/src/Cache/ApcuCache.php new file mode 100644 index 00000000..a20ad823 --- /dev/null +++ b/src/Cache/ApcuCache.php @@ -0,0 +1,28 @@ +>, 1: array}>}>>}|null */ + private static function readFileContents(string $path): ?array + { + // error suppression is faster than calling `file_exists()` + `is_file()` + `is_readable()`, especially because there's no need to error here + set_error_handler(self::$emptyErrorHandler); + $value = include $path; + restore_error_handler(); + + if (! is_array($value)) { + return null; + } + + return $value; + } + + private static function writeToFile(string $path, string $content): void + { + $directory = dirname($path); + + if (! self::createDirectoryIfNeeded($directory) || ! is_writable($directory)) { + throw new RuntimeException('The cache directory is not writable "' . $directory . '"'); + } + + set_error_handler(self::$emptyErrorHandler); + + $tmpFile = $path . '.tmp'; + + if (file_put_contents($tmpFile, $content, LOCK_EX) === false) { + restore_error_handler(); + + return; + } + + chmod($tmpFile, self::FILE_PERMISSIONS); + + if (! rename($tmpFile, $path)) { + unlink($tmpFile); + } + + restore_error_handler(); + } + + private static function createDirectoryIfNeeded(string $directory): bool + { + if (is_dir($directory)) { + return true; + } + + set_error_handler(self::$emptyErrorHandler); + $created = mkdir($directory, self::DIRECTORY_PERMISSIONS, true); + restore_error_handler(); + + return $created !== false || is_dir($directory); + } +} From 45848ab9604f12bc4eea6805d75d2afed48a5056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 15 Jun 2021 00:56:32 +0200 Subject: [PATCH 3/4] Expose new caching API to end-users --- benchmark/Dispatching.php | 3 +- src/functions.php | 73 ++++++++++++------------------ test/Dispatcher/CachingTest.php | 2 +- test/Dispatcher/DispatcherTest.php | 2 +- 4 files changed, 34 insertions(+), 46 deletions(-) diff --git a/benchmark/Dispatching.php b/benchmark/Dispatching.php index bfae790c..da059a6f 100644 --- a/benchmark/Dispatching.php +++ b/benchmark/Dispatching.php @@ -3,6 +3,7 @@ namespace FastRoute\Benchmark; +use FastRoute\Cache; use FastRoute\DataGenerator; use FastRoute\Dispatcher; use Generator; @@ -53,7 +54,7 @@ public function initializeDispatchers(): void ); } - /** @param array $options */ + /** @param array{routeParser?: string, dataGenerator?: string, dispatcher?: string, routeCollector?: string, cacheDisabled?: bool, cacheKey?: string, cacheDriver?: string|Cache} $options */ abstract protected function createDispatcher(array $options = []): Dispatcher; /** @return Generator> */ diff --git a/src/functions.php b/src/functions.php index 3088c81b..187ffa81 100644 --- a/src/functions.php +++ b/src/functions.php @@ -3,38 +3,25 @@ namespace FastRoute; +use FastRoute\Cache\FileCache; use LogicException; -use RuntimeException; +use function array_key_exists; use function assert; -use function file_exists; -use function file_put_contents; use function function_exists; -use function is_array; -use function var_export; +use function is_string; if (! function_exists('FastRoute\simpleDispatcher')) { - /** @param array $options */ + /** @param array{routeParser?: string, dataGenerator?: string, dispatcher?: string, routeCollector?: string, cacheDisabled?: bool, cacheKey?: string, cacheDriver?: string|Cache} $options */ function simpleDispatcher(callable $routeDefinitionCallback, array $options = []): Dispatcher { - $options += [ - 'routeParser' => RouteParser\Std::class, - 'dataGenerator' => DataGenerator\MarkBased::class, - 'dispatcher' => Dispatcher\MarkBased::class, - 'routeCollector' => RouteCollector::class, - ]; - - $routeCollector = new $options['routeCollector']( - new $options['routeParser'](), - new $options['dataGenerator']() + return \FastRoute\cachedDispatcher( + $routeDefinitionCallback, + ['cacheDisabled' => true] + $options ); - assert($routeCollector instanceof RouteCollector); - $routeDefinitionCallback($routeCollector); - - return new $options['dispatcher']($routeCollector->getData()); } - /** @param array $options */ + /** @param array{routeParser?: string, dataGenerator?: string, dispatcher?: string, routeCollector?: string, cacheDisabled?: bool, cacheKey?: string, cacheDriver?: string|Cache} $options */ function cachedDispatcher(callable $routeDefinitionCallback, array $options = []): Dispatcher { $options += [ @@ -43,36 +30,36 @@ function cachedDispatcher(callable $routeDefinitionCallback, array $options = [] 'dispatcher' => Dispatcher\MarkBased::class, 'routeCollector' => RouteCollector::class, 'cacheDisabled' => false, + 'cacheDriver' => FileCache::class, ]; - if (! isset($options['cacheFile'])) { - throw new LogicException('Must specify "cacheFile" option'); - } + $loader = static function () use ($routeDefinitionCallback, $options): array { + $routeCollector = new $options['routeCollector']( + new $options['routeParser'](), + new $options['dataGenerator']() + ); + assert($routeCollector instanceof RouteCollector); + $routeDefinitionCallback($routeCollector); - if (! $options['cacheDisabled'] && file_exists($options['cacheFile'])) { - $dispatchData = require $options['cacheFile']; - if (! is_array($dispatchData)) { - throw new RuntimeException('Invalid cache file "' . $options['cacheFile'] . '"'); - } + return $routeCollector->getData(); + }; - return new $options['dispatcher']($dispatchData); + if ($options['cacheDisabled'] === true) { + return new $options['dispatcher']($loader()); } - $routeCollector = new $options['routeCollector']( - new $options['routeParser'](), - new $options['dataGenerator']() - ); - assert($routeCollector instanceof RouteCollector); - $routeDefinitionCallback($routeCollector); + if (! array_key_exists('cacheKey', $options)) { + throw new LogicException('Must specify "cacheKey" option'); + } - $dispatchData = $routeCollector->getData(); - if (! $options['cacheDisabled']) { - file_put_contents( - $options['cacheFile'], - 'get($options['cacheKey'], $loader)); } } diff --git a/test/Dispatcher/CachingTest.php b/test/Dispatcher/CachingTest.php index c6495840..c8d68925 100644 --- a/test/Dispatcher/CachingTest.php +++ b/test/Dispatcher/CachingTest.php @@ -33,7 +33,7 @@ static function (RouteCollector $collector): void { $collector->get('/testing', ['test']); $collector->get('/admin/{page}', ['admin-page']); }, - ['cacheFile' => self::CACHE_FILE] + ['cacheKey' => self::CACHE_FILE] ); } diff --git a/test/Dispatcher/DispatcherTest.php b/test/Dispatcher/DispatcherTest.php index c58350d0..d0769897 100644 --- a/test/Dispatcher/DispatcherTest.php +++ b/test/Dispatcher/DispatcherTest.php @@ -24,7 +24,7 @@ abstract protected function getDataGeneratorClass(): string; /** * Set appropriate options for the specific Dispatcher class we're testing * - * @return array + * @return array{dataGenerator: string, dispatcher: string} */ private function generateDispatcherOptions(): array { From a53d5636b4c35acc2444da64b7b3d8dfd09a6386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 15 Jun 2021 22:20:00 +0200 Subject: [PATCH 4/4] Add APCu functions to inclusion list The APCu cache is meant to be used by users who know that APCu is installed, as it requires explicit configuration of the caching driver. --- .github/workflows/composer-json-lint.yml | 2 +- composer-require-checker.json | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 composer-require-checker.json diff --git a/.github/workflows/composer-json-lint.yml b/.github/workflows/composer-json-lint.yml index 26885a7f..bbcbcf9d 100644 --- a/.github/workflows/composer-json-lint.yml +++ b/.github/workflows/composer-json-lint.yml @@ -61,7 +61,7 @@ jobs: run: "composer-normalize --dry-run" - name: "Check composer.json explicit dependencies" - run: "composer-require-checker check" + run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)" - name: "Check composer.json unused dependencies" run: "composer-unused" diff --git a/composer-require-checker.json b/composer-require-checker.json new file mode 100644 index 00000000..4b45f88d --- /dev/null +++ b/composer-require-checker.json @@ -0,0 +1,18 @@ +{ + "symbol-whitelist" : [ + "null", "true", "false", + "static", "self", "parent", + "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "mixed" + ], + "php-core-extensions" : [ + "Core", + "date", + "pcre", + "Phar", + "Reflection", + "SPL", + "standard", + "apcu" + ], + "scan-files" : [] +}