diff --git a/README.md b/README.md index 3988656e9..bfe20561b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Better Reflection ================= -[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FRoave%2FBetterReflection%2F6.0.x)](https://dashboard.stryker-mutator.io/reports/github.com/Roave/BetterReflection/6.0.x) +[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FRoave%2FBetterReflection%2F6.6.x)](https://dashboard.stryker-mutator.io/reports/github.com/Roave/BetterReflection/6.6.x) [![Type Coverage](https://shepherd.dev/github/Roave/BetterReflection/coverage.svg)](https://shepherd.dev/github/Roave/BetterReflection) [![Latest Stable Version](https://poser.pugx.org/roave/better-reflection/v/stable)](https://packagist.org/packages/roave/better-reflection) [![License](https://poser.pugx.org/roave/better-reflection/license)](https://packagist.org/packages/roave/better-reflection) diff --git a/composer.lock b/composer.lock index 75427ce01..718cfd9f5 100644 --- a/composer.lock +++ b/composer.lock @@ -320,16 +320,16 @@ }, { "name": "colinodell/json5", - "version": "v2.2.2", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/colinodell/json5.git", - "reference": "2b0fabd1ba71fe8079a832d6097ec5c6fd92361d" + "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinodell/json5/zipball/2b0fabd1ba71fe8079a832d6097ec5c6fd92361d", - "reference": "2b0fabd1ba71fe8079a832d6097ec5c6fd92361d", + "url": "https://api.github.com/repos/colinodell/json5/zipball/15b063f8cb5e6deb15f0cd39123264ec0d19c710", + "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710", "shasum": "" }, "require": { @@ -342,11 +342,11 @@ }, "require-dev": { "mikehaertl/php-shellcommand": "^1.2.5", - "phpstan/phpstan": "^0.12.58", + "phpstan/phpstan": "^1.4", "scrutinizer/ocular": "^1.6", - "squizlabs/php_codesniffer": "^2.3", - "symfony/finder": "^4.4|^5.2", - "symfony/phpunit-bridge": "^5.1" + "squizlabs/php_codesniffer": "^2.3 || ^3.0", + "symfony/finder": "^4.4|^5.4|^6.0", + "symfony/phpunit-bridge": "^5.4|^6.0" }, "bin": [ "bin/json5" @@ -387,7 +387,7 @@ ], "support": { "issues": "https://github.com/colinodell/json5/issues", - "source": "https://github.com/colinodell/json5/tree/v2.2.2" + "source": "https://github.com/colinodell/json5/tree/v2.3.0" }, "funding": [ { @@ -407,7 +407,7 @@ "type": "patreon" } ], - "time": "2022-02-22T14:42:16+00:00" + "time": "2022-12-27T16:44:40+00:00" }, { "name": "composer/pcre", @@ -629,35 +629,38 @@ }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -673,7 +676,7 @@ }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -697,10 +700,10 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -741,20 +744,20 @@ }, { "name": "doctrine/coding-standard", - "version": "11.0.0", + "version": "11.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/coding-standard.git", - "reference": "b6660e1e57dd1c0a38d335b7f6495b0c06abc270" + "reference": "4bcfa9d922e13cb3b8078d4752e3ba276f959c88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/b6660e1e57dd1c0a38d335b7f6495b0c06abc270", - "reference": "b6660e1e57dd1c0a38d335b7f6495b0c06abc270", + "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/4bcfa9d922e13cb3b8078d4752e3ba276f959c88", + "reference": "4bcfa9d922e13cb3b8078d4752e3ba276f959c88", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0.0", "php": "^7.2 || ^8.0", "slevomat/coding-standard": "^8.6.2", "squizlabs/php_codesniffer": "^3.7" @@ -791,36 +794,36 @@ ], "support": { "issues": "https://github.com/doctrine/coding-standard/issues", - "source": "https://github.com/doctrine/coding-standard/tree/11.0.0" + "source": "https://github.com/doctrine/coding-standard/tree/11.1.0" }, - "time": "2022-12-11T22:31:43+00:00" + "time": "2023-01-06T09:12:24+00:00" }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -847,7 +850,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -863,7 +866,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -1973,16 +1976,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.4", + "version": "1.9.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", "shasum": "" }, "require": { @@ -2012,7 +2015,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.4" + "source": "https://github.com/phpstan/phpstan/tree/1.9.14" }, "funding": [ { @@ -2028,20 +2031,20 @@ "type": "tidelift" } ], - "time": "2022-12-17T13:33:52+00:00" + "time": "2023-01-19T10:47:09+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088" + "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088", - "reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/54a24bd23e9e80ee918cdc24f909d376c2e273f7", + "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7", "shasum": "" }, "require": { @@ -2078,22 +2081,22 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.2" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.3" }, - "time": "2022-12-13T15:08:22+00:00" + "time": "2022-12-21T15:25:00+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.21", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3f893e19712bb0c8bc86665d1562e9fd509c4ef0", - "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -2149,7 +2152,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.21" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -2157,7 +2160,7 @@ "type": "github" } ], - "time": "2022-12-14T13:26:54+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2402,20 +2405,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.27", + "version": "9.6.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" + "reference": "1a461cabfbd5b464f5d41c49a9959c63b4ecd2d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a461cabfbd5b464f5d41c49a9959c63b4ecd2d1", + "reference": "1a461cabfbd5b464f5d41c49a9959c63b4ecd2d1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2453,7 +2456,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -2484,7 +2487,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.2" }, "funding": [ { @@ -2500,7 +2503,7 @@ "type": "tidelift" } ], - "time": "2022-12-09T07:31:23+00:00" + "time": "2023-02-04T06:59:53+00:00" }, { "name": "psr/container", @@ -2607,16 +2610,16 @@ }, { "name": "roave/infection-static-analysis-plugin", - "version": "1.26.0", + "version": "1.28.0", "source": { "type": "git", "url": "https://github.com/Roave/infection-static-analysis-plugin.git", - "reference": "63f3fe01f0d29409501a9999f60ef0602ddfb4cb" + "reference": "3724bbe9afe0dc1eddb2fb2c425d4acd64cb9c10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/63f3fe01f0d29409501a9999f60ef0602ddfb4cb", - "reference": "63f3fe01f0d29409501a9999f60ef0602ddfb4cb", + "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/3724bbe9afe0dc1eddb2fb2c425d4acd64cb9c10", + "reference": "3724bbe9afe0dc1eddb2fb2c425d4acd64cb9c10", "shasum": "" }, "require": { @@ -2627,8 +2630,8 @@ "vimeo/psalm": "^4.30.0 || ^5.0.0" }, "require-dev": { - "doctrine/coding-standard": "^10.0.0", - "phpunit/phpunit": "^9.5.26" + "doctrine/coding-standard": "^11.0.0", + "phpunit/phpunit": "^9.5.27" }, "bin": [ "bin/roave-infection-static-analysis-plugin" @@ -2652,9 +2655,9 @@ "description": "Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis", "support": { "issues": "https://github.com/Roave/infection-static-analysis-plugin/issues", - "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.26.0" + "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.28.0" }, - "time": "2022-11-30T16:04:59+00:00" + "time": "2022-12-30T16:05:23+00:00" }, { "name": "sanmai/later", @@ -3145,16 +3148,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -3196,7 +3199,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -3204,7 +3207,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -3518,16 +3521,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -3566,10 +3569,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -3577,7 +3580,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -3636,16 +3639,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -3680,7 +3683,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -3688,7 +3691,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -3745,30 +3748,30 @@ }, { "name": "slevomat/coding-standard", - "version": "8.7.1", + "version": "8.8.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "c51edb898bebd36aac70a190c6a41a7c056bb5b9" + "reference": "59e25146a4ef0a7b194c5bc55b32dd414345db89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/c51edb898bebd36aac70a190c6a41a7c056bb5b9", - "reference": "c51edb898bebd36aac70a190c6a41a7c056bb5b9", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/59e25146a4ef0a7b194c5bc55b32dd414345db89", + "reference": "59e25146a4ef0a7b194c5bc55b32dd414345db89", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": ">=1.15.0 <1.16.0", + "phpstan/phpdoc-parser": ">=1.15.2 <1.16.0", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.9.3", - "phpstan/phpstan-deprecation-rules": "1.1.0", - "phpstan/phpstan-phpunit": "1.0.0|1.3.1", + "phpstan/phpstan": "1.4.10|1.9.6", + "phpstan/phpstan-deprecation-rules": "1.1.1", + "phpstan/phpstan-phpunit": "1.0.0|1.3.3", "phpstan/phpstan-strict-rules": "1.4.4", "phpunit/phpunit": "7.5.20|8.5.21|9.5.27" }, @@ -3794,7 +3797,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.7.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.8.0" }, "funding": [ { @@ -3806,7 +3809,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:18+00:00" + "time": "2023-01-09T10:46:13+00:00" }, { "name": "spatie/array-to-xml", @@ -3930,16 +3933,16 @@ }, { "name": "symfony/console", - "version": "v6.2.3", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06" + "reference": "3e294254f2191762c1d137aed4b94e966965e985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0f579613e771dba2dbb8211c382342a641f5da06", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06", + "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", + "reference": "3e294254f2191762c1d137aed4b94e966965e985", "shasum": "" }, "require": { @@ -4006,7 +4009,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.3" + "source": "https://github.com/symfony/console/tree/v6.2.5" }, "funding": [ { @@ -4022,7 +4025,7 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:26:22+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4093,16 +4096,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016" + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593", + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593", "shasum": "" }, "require": { @@ -4136,7 +4139,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.0" + "source": "https://github.com/symfony/filesystem/tree/v6.2.5" }, "funding": [ { @@ -4152,20 +4155,20 @@ "type": "tidelift" } ], - "time": "2022-11-20T13:01:27+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "symfony/finder", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570" + "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/eb2355f69519e4ef33f1835bca4c935f5d42e570", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570", + "url": "https://api.github.com/repos/symfony/finder/zipball/c90dc446976a612e3312a97a6ec0069ab0c2099c", + "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c", "shasum": "" }, "require": { @@ -4200,7 +4203,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.0" + "source": "https://github.com/symfony/finder/tree/v6.2.5" }, "funding": [ { @@ -4216,7 +4219,7 @@ "type": "tidelift" } ], - "time": "2022-10-09T08:55:40+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4550,16 +4553,16 @@ }, { "name": "symfony/process", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" + "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", + "url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", + "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", "shasum": "" }, "require": { @@ -4591,7 +4594,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.0" + "source": "https://github.com/symfony/process/tree/v6.2.5" }, "funding": [ { @@ -4607,7 +4610,7 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/service-contracts", @@ -4696,16 +4699,16 @@ }, { "name": "symfony/string", - "version": "v6.2.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d" + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d", + "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", "shasum": "" }, "require": { @@ -4762,7 +4765,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.2" + "source": "https://github.com/symfony/string/tree/v6.2.5" }, "funding": [ { @@ -4778,7 +4781,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "thecodingmachine/safe", diff --git a/infection.json.dist b/infection.json.dist index e725cb391..e72003964 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -13,6 +13,6 @@ "mutators": { "@default": true }, - "minMsi": 99, + "minMsi": 100, "minCoveredMsi": 100 } diff --git a/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php b/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php index 2d86b61ae..162cca291 100644 --- a/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php +++ b/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php @@ -72,7 +72,7 @@ public static function withStreamWrapperOverride( $result = $executeMeWithinStreamWrapperOverride(); } finally { foreach ($streamWrapperProtocols as $protocol) { - stream_wrapper_restore($protocol); + @stream_wrapper_restore($protocol); } self::$registeredStreamWrapperProtocols = null; @@ -101,6 +101,7 @@ public function stream_open($path, $mode, $options, &$opened_path): bool { self::$autoloadLocatedFile = $path; + // @infection-ignore-all FalseValue return false; } @@ -130,7 +131,7 @@ public function url_stat($path, $flags): array|bool stream_wrapper_restore($protocol); } - if ($flags & STREAM_URL_STAT_QUIET) { + if (($flags & STREAM_URL_STAT_QUIET) === STREAM_URL_STAT_QUIET) { $result = @stat($path); } else { $result = stat($path); diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php index 78078e8bc..79beb32cc 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php @@ -25,6 +25,7 @@ use function is_array; use function is_dir; use function is_file; +use function is_string; use function json_decode; use function realpath; @@ -61,8 +62,11 @@ public function __invoke(string $installationPath, Locator $astLocator): SourceL throw MissingComposerJson::inProjectPath($installationPath); } + $composerJsonContent = file_get_contents($composerJsonPath); + assert(is_string($composerJsonContent)); + /** @psalm-var array{autoload: ComposerAutoload}|null $composer */ - $composer = json_decode((string) file_get_contents($composerJsonPath), true); + $composer = json_decode($composerJsonContent, true); if (! is_array($composer)) { throw FailedToParseJson::inFile($composerJsonPath); diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php index 86ded4286..3ea93001b 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php @@ -27,6 +27,7 @@ use function is_array; use function is_dir; use function is_file; +use function is_string; use function json_decode; use function realpath; use function rtrim; @@ -52,8 +53,11 @@ public function __invoke(string $installationPath, Locator $astLocator): SourceL throw MissingComposerJson::inProjectPath($installationPath); } + $composerJsonContent = file_get_contents($composerJsonPath); + assert(is_string($composerJsonContent)); + /** @psalm-var Composer|null $composer */ - $composer = json_decode((string) file_get_contents($composerJsonPath), true); + $composer = json_decode($composerJsonContent, true); $vendorDir = $composer['config']['vendor-dir'] ?? 'vendor'; $vendorDir = rtrim($vendorDir, '/'); @@ -63,8 +67,11 @@ public function __invoke(string $installationPath, Locator $astLocator): SourceL throw MissingInstalledJson::inProjectPath($realInstallationPath . '/' . $vendorDir); } + $jsonContent = file_get_contents($installedJsonPath); + assert(is_string($jsonContent)); + /** @psalm-var array{packages: list}|list|null $installedJson */ - $installedJson = json_decode((string) file_get_contents($installedJsonPath), true); + $installedJson = json_decode($jsonContent, true); if (! is_array($composer)) { throw FailedToParseJson::inFile($composerJsonPath); diff --git a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php index 9fb27b5c3..10ed689b8 100644 --- a/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php +++ b/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php @@ -27,6 +27,7 @@ use function is_array; use function is_dir; use function is_file; +use function is_string; use function json_decode; use function realpath; use function rtrim; @@ -52,8 +53,11 @@ public function __invoke(string $installationPath, Locator $astLocator): SourceL throw MissingComposerJson::inProjectPath($installationPath); } + $composerJsonContent = file_get_contents($composerJsonPath); + assert(is_string($composerJsonContent)); + /** @psalm-var Composer|null $composer */ - $composer = json_decode((string) file_get_contents($composerJsonPath), true); + $composer = json_decode($composerJsonContent, true); $vendorDir = $composer['config']['vendor-dir'] ?? 'vendor'; $vendorDir = rtrim($vendorDir, '/'); @@ -63,8 +67,11 @@ public function __invoke(string $installationPath, Locator $astLocator): SourceL throw MissingInstalledJson::inProjectPath($realInstallationPath . '/' . $vendorDir); } + $jsonContent = file_get_contents($installedJsonPath); + assert(is_string($jsonContent)); + /** @var array{packages: list}|list|null $installedJson */ - $installedJson = json_decode((string) file_get_contents($installedJsonPath), true); + $installedJson = json_decode($jsonContent, true); if (! is_array($installedJson)) { throw FailedToParseJson::inFile($installedJsonPath); diff --git a/src/SourceLocator/Type/FileIteratorSourceLocator.php b/src/SourceLocator/Type/FileIteratorSourceLocator.php index 8836fe696..5bef9a5d8 100644 --- a/src/SourceLocator/Type/FileIteratorSourceLocator.php +++ b/src/SourceLocator/Type/FileIteratorSourceLocator.php @@ -53,6 +53,7 @@ public function __construct(Iterator $fileInfoIterator, private Locator $astLoca /** @throws InvalidFileLocation */ private function getAggregatedSourceLocator(): AggregateSourceLocator { + // @infection-ignore-all Coalesce: There's no difference, it's just optimization return $this->aggregateSourceLocator ?? $this->aggregateSourceLocator = new AggregateSourceLocator(array_values(array_filter(array_map( function (SplFileInfo $item): SingleFileSourceLocator|null { diff --git a/src/Util/FileHelper.php b/src/Util/FileHelper.php index 793f82ae2..6277240a9 100644 --- a/src/Util/FileHelper.php +++ b/src/Util/FileHelper.php @@ -6,6 +6,7 @@ use function assert; use function preg_match; +use function sprintf; use function str_replace; use const DIRECTORY_SEPARATOR; @@ -43,6 +44,7 @@ public static function normalizeSystemPath(string $originalPath): string [, $scheme, $path] = $matches; } + // @infection-ignore-all Identical Needed only on Windows if (DIRECTORY_SEPARATOR === '\\') { // @infection-ignore-all UnwrapStrReplace Needed only on Windows $path = str_replace('/', DIRECTORY_SEPARATOR, $path); @@ -50,6 +52,6 @@ public static function normalizeSystemPath(string $originalPath): string assert($path !== ''); - return ($scheme !== null ? $scheme . '://' : '') . $path; + return ($scheme !== null ? sprintf('%s://', $scheme) : '') . $path; } } diff --git a/test/unit/Fixture/InitializedProperties.php b/test/unit/Fixture/InitializedProperties.php index b6b3b9672..c586d33cf 100644 --- a/test/unit/Fixture/InitializedProperties.php +++ b/test/unit/Fixture/InitializedProperties.php @@ -24,6 +24,6 @@ public function __construct() public function __get($property) { - throw new Error(); + throw new Error('Removed property'); } } diff --git a/test/unit/Reflection/ReflectionPropertyTest.php b/test/unit/Reflection/ReflectionPropertyTest.php index 20ad06361..f97d2c698 100644 --- a/test/unit/Reflection/ReflectionPropertyTest.php +++ b/test/unit/Reflection/ReflectionPropertyTest.php @@ -778,6 +778,7 @@ public function testIsInitializedThrowsError(): void $classReflection = $this->reflector->reflectClass(InitializedProperties::class); self::expectException(Error::class); + self::expectExceptionMessage('Removed property'); $classReflection->getProperty('toBeRemoved')->isInitialized($object); } diff --git a/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php b/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php index b5c1a6bb5..def10bd64 100644 --- a/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php +++ b/test/unit/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapperTest.php @@ -13,9 +13,13 @@ use function file_get_contents; use function is_file; +use function restore_error_handler; +use function set_error_handler; use function sprintf; use function uniqid; +use const E_WARNING; + /** * @covers \Roave\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper * @@ -177,28 +181,38 @@ static function () use ($thrown): string { public function testWillRaiseWarningWhenTryingToCheckFileExistenceForNonExistingFileWithoutSilencingModifier(): void { + set_error_handler(static function (int $errno, string $errstr): bool { + throw new Exception($errstr, $errno); + }, E_WARNING); + $nonExistingFile = __DIR__ . uniqid('non-existing-file', true); - self::assertSame( - 'another value produced by the function', - FileReadTrapStreamWrapper::withStreamWrapperOverride( - static function () use ($nonExistingFile): string { - if (is_file($nonExistingFile)) { - throw new UnexpectedValueException('is_file() should report `false` for a non-existing file'); - } + self::expectExceptionMessageMatches('~stat\(\): stat failed for~'); - if (@file_get_contents($nonExistingFile) !== false) { - throw new UnexpectedValueException('file_get_contents() should report `false` for a non-existing file'); - } + try { + self::assertSame( + 'another value produced by the function', + FileReadTrapStreamWrapper::withStreamWrapperOverride( + static function () use ($nonExistingFile): string { + if (is_file($nonExistingFile)) { + throw new UnexpectedValueException('is_file() should report `false` for a non-existing file'); + } - return 'another value produced by the function'; - }, - ['file'], - ), - ); + if (file_get_contents($nonExistingFile) !== false) { + throw new UnexpectedValueException('file_get_contents() should report `false` for a non-existing file'); + } - self::assertNull(FileReadTrapStreamWrapper::$autoloadLocatedFile); - self::assertNotEmpty(file_get_contents(__FILE__), 'Stream wrapper was removed, file reads work again'); + return 'another value produced by the function'; + }, + ['file'], + ), + ); + } finally { + self::assertNull(FileReadTrapStreamWrapper::$autoloadLocatedFile); + self::assertNotEmpty(file_get_contents(__FILE__), 'Stream wrapper was removed, file reads work again'); + + restore_error_handler(); + } } public function testUrlStatThrowsExceptionWhenCalledDirectly(): void diff --git a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php index 8b22b3ebb..a4825eb43 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerInstalledJsonTest.php @@ -268,6 +268,7 @@ public function testWillFailToProduceLocatorForProjectWithoutComposerJson(): voi public function testWillFailToProduceLocatorForProjectWithoutInstalledJson(): void { $this->expectException(MissingInstalledJson::class); + $this->expectExceptionMessageMatches('~^Could not locate a "composer/installed.json" file in "[^"]+[\\\\/]Assets[\\\\/]ComposerLocators[\\\\/]project-without-installed.json/vendor"$~'); (new MakeLocatorForInstalledJson()) ->__invoke( diff --git a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php index 15177d61a..abaf465a4 100644 --- a/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php +++ b/test/unit/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJsonTest.php @@ -320,6 +320,7 @@ public function testWillFailToProduceLocatorForProjectWithoutComposerJson(): voi public function testWillFailToProduceLocatorForProjectWithoutInstalledJson(): void { $this->expectException(MissingInstalledJson::class); + $this->expectExceptionMessageMatches('~^Could not locate a "composer/installed.json" file in "[^"]+[\\\\/]Assets[\\\\/]ComposerLocators[\\\\/]project-without-installed.json/vendor"$~'); (new MakeLocatorForComposerJsonAndInstalledJson()) ->__invoke( diff --git a/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php b/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php index f5cc3165a..37571a5c7 100644 --- a/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php +++ b/test/unit/SourceLocator/Type/FileIteratorSourceLocatorTest.php @@ -34,7 +34,7 @@ public function setUp(): void new RecursiveIteratorIterator(new RecursiveDirectoryIterator( __DIR__ . '/../../Assets/DirectoryScannerAssets', RecursiveDirectoryIterator::SKIP_DOTS, - )), + ), RecursiveIteratorIterator::SELF_FIRST), BetterReflectionSingleton::instance()->astLocator(), ); } diff --git a/test/unit/Util/FileHelperTest.php b/test/unit/Util/FileHelperTest.php index be04af13e..213a1482a 100644 --- a/test/unit/Util/FileHelperTest.php +++ b/test/unit/Util/FileHelperTest.php @@ -7,10 +7,6 @@ use PHPUnit\Framework\TestCase; use Roave\BetterReflection\Util\FileHelper; -use function strtr; - -use const DIRECTORY_SEPARATOR; - /** @covers \Roave\BetterReflection\Util\FileHelper */ class FileHelperTest extends TestCase { @@ -20,19 +16,29 @@ public function testNormalizeWindowsPath(): void self::assertSame('directory/foo/boo/file.php', FileHelper::normalizeWindowsPath('directory/foo/boo/file.php')); } - public function testSystemWindowsPath(): void + /** @return list */ + public function dataNormalizeSystemPath(): array { - $path = 'directory\\foo/boo\\foo/file.php'; - - self::assertSame(strtr($path, '\\/', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR), FileHelper::normalizeSystemPath($path)); + return [ + ['directory\\foo/boo\\foo/file.php', 'directory/foo/boo/foo/file.php'], + ['phar://C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php', 'phar://C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php'], + ['C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php', 'C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php'], + ['/directory/strange-path-c://file.php', '/directory/strange-path-c://file.php'], + ]; } - public function testSystemWindowsPathWithProtocol(): void + /** + * @dataProvider dataNormalizeSystemPath + * @requires OS Linux + */ + public function testSystemWindowsPath(string $path, string $expectedPath): void { - if (DIRECTORY_SEPARATOR !== '\\') { - $this->markTestSkipped('Test runs only on Windows'); - } + self::assertSame($expectedPath, FileHelper::normalizeSystemPath($path)); + } + /** @requires OSFAMILY Windows */ + public function testSystemWindowsPathOnWindows(): void + { $path = 'phar://C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php'; self::assertSame( 'phar://C:\Users\ondrej\phpstan.phar\src\TrinaryLogic.php', diff --git a/tools/roave-backward-compatibility-check/composer.lock b/tools/roave-backward-compatibility-check/composer.lock index 668817abc..ebf9d0e24 100644 --- a/tools/roave-backward-compatibility-check/composer.lock +++ b/tools/roave-backward-compatibility-check/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "azjezz/psl", - "version": "2.3.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/azjezz/psl.git", - "reference": "82f241ea8ad997701e2fdcd130e8a9433eeaeafa" + "reference": "eacc90cfdfd7eafffd630e81ab69b113309e594b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/azjezz/psl/zipball/82f241ea8ad997701e2fdcd130e8a9433eeaeafa", - "reference": "82f241ea8ad997701e2fdcd130e8a9433eeaeafa", + "url": "https://api.github.com/repos/azjezz/psl/zipball/eacc90cfdfd7eafffd630e81ab69b113309e594b", + "reference": "eacc90cfdfd7eafffd630e81ab69b113309e594b", "shasum": "" }, "require": { @@ -32,7 +32,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.4.0", "php-coveralls/php-coveralls": "^2.5.2", - "php-standard-library/psalm-plugin": "^2.1.0", + "php-standard-library/psalm-plugin": "^2.2", "phpbench/phpbench": "^1.2.3", "phpunit/phpunit": "^9.5.16", "roave/infection-static-analysis-plugin": "^1.26.0", @@ -70,7 +70,7 @@ "description": "PHP Standard Library", "support": { "issues": "https://github.com/azjezz/psl/issues", - "source": "https://github.com/azjezz/psl/tree/2.3.0" + "source": "https://github.com/azjezz/psl/tree/2.4.1" }, "funding": [ { @@ -78,7 +78,7 @@ "type": "open_collective" } ], - "time": "2022-12-01T07:52:14+00:00" + "time": "2023-01-26T12:53:04+00:00" }, { "name": "beberlei/assert", @@ -149,16 +149,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.4", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd", "shasum": "" }, "require": { @@ -205,7 +205,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.4" + "source": "https://github.com/composer/ca-bundle/tree/1.3.5" }, "funding": [ { @@ -221,7 +221,7 @@ "type": "tidelift" } ], - "time": "2022-10-12T12:08:29+00:00" + "time": "2023-01-11T08:27:00+00:00" }, { "name": "composer/class-map-generator", @@ -298,23 +298,23 @@ }, { "name": "composer/composer", - "version": "2.4.4", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "e8d9087229bcdbc5867594d3098091412f1130cf" + "reference": "923278ad13e1621946eb76ab2882655d2cc396a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e8d9087229bcdbc5867594d3098091412f1130cf", - "reference": "e8d9087229bcdbc5867594d3098091412f1130cf", + "url": "https://api.github.com/repos/composer/composer/zipball/923278ad13e1621946eb76ab2882655d2cc396a4", + "reference": "923278ad13e1621946eb76ab2882655d2cc396a4", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", "composer/class-map-generator": "^1.0", "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2 || ^3", + "composer/pcre": "^2.1 || ^3.1", "composer/semver": "^3.0", "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", @@ -330,10 +330,11 @@ "symfony/finder": "^5.4 || ^6.0", "symfony/polyfill-php73": "^1.24", "symfony/polyfill-php80": "^1.24", + "symfony/polyfill-php81": "^1.24", "symfony/process": "^5.4 || ^6.0" }, "require-dev": { - "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan": "^1.9.3", "phpstan/phpstan-deprecation-rules": "^1", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1", @@ -351,7 +352,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "phpstan": { "includes": [ @@ -390,7 +391,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.4.4" + "source": "https://github.com/composer/composer/tree/2.5.1" }, "funding": [ { @@ -406,7 +407,7 @@ "type": "tidelift" } ], - "time": "2022-10-27T12:39:29+00:00" + "time": "2022-12-22T14:33:54+00:00" }, { "name": "composer/metadata-minifier", @@ -895,16 +896,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.2", + "version": "v4.15.3", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", "shasum": "" }, "require": { @@ -945,9 +946,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" }, - "time": "2022-11-12T15:38:23+00:00" + "time": "2023-01-16T22:05:37+00:00" }, { "name": "nikolaposa/version", @@ -1325,16 +1326,16 @@ }, { "name": "roave/backward-compatibility-check", - "version": "8.2.0", + "version": "8.2.1", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "4a98f2f339d7eadaf57a5e08f41c657245a8df12" + "reference": "9deff3cb411062a56e07dfa8c8f214c09cf9a55d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/4a98f2f339d7eadaf57a5e08f41c657245a8df12", - "reference": "4a98f2f339d7eadaf57a5e08f41c657245a8df12", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/9deff3cb411062a56e07dfa8c8f214c09cf9a55d", + "reference": "9deff3cb411062a56e07dfa8c8f214c09cf9a55d", "shasum": "" }, "require": { @@ -1387,9 +1388,9 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "support": { "issues": "https://github.com/Roave/BackwardCompatibilityCheck/issues", - "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.2.0" + "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.2.1" }, - "time": "2022-12-15T23:38:26+00:00" + "time": "2022-12-21T01:16:55+00:00" }, { "name": "roave/better-reflection", @@ -1680,16 +1681,16 @@ }, { "name": "symfony/console", - "version": "v6.2.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5a9bd5c543f00157c55face973c149957467db31" + "reference": "3e294254f2191762c1d137aed4b94e966965e985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5a9bd5c543f00157c55face973c149957467db31", - "reference": "5a9bd5c543f00157c55face973c149957467db31", + "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", + "reference": "3e294254f2191762c1d137aed4b94e966965e985", "shasum": "" }, "require": { @@ -1756,7 +1757,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.2" + "source": "https://github.com/symfony/console/tree/v6.2.5" }, "funding": [ { @@ -1772,7 +1773,7 @@ "type": "tidelift" } ], - "time": "2022-12-16T15:08:36+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1843,16 +1844,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016" + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593", + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593", "shasum": "" }, "require": { @@ -1886,7 +1887,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.0" + "source": "https://github.com/symfony/filesystem/tree/v6.2.5" }, "funding": [ { @@ -1902,20 +1903,20 @@ "type": "tidelift" } ], - "time": "2022-11-20T13:01:27+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "symfony/finder", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570" + "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/eb2355f69519e4ef33f1835bca4c935f5d42e570", - "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570", + "url": "https://api.github.com/repos/symfony/finder/zipball/c90dc446976a612e3312a97a6ec0069ab0c2099c", + "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c", "shasum": "" }, "require": { @@ -1950,7 +1951,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.0" + "source": "https://github.com/symfony/finder/tree/v6.2.5" }, "funding": [ { @@ -1966,7 +1967,7 @@ "type": "tidelift" } ], - "time": "2022-10-09T08:55:40+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2460,18 +2461,97 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/process", - "version": "v6.2.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" + "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", + "url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", + "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", "shasum": "" }, "require": { @@ -2503,7 +2583,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.0" + "source": "https://github.com/symfony/process/tree/v6.2.5" }, "funding": [ { @@ -2519,7 +2599,7 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/service-contracts", @@ -2608,16 +2688,16 @@ }, { "name": "symfony/string", - "version": "v6.2.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d" + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d", + "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", "shasum": "" }, "require": { @@ -2674,7 +2754,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.2" + "source": "https://github.com/symfony/string/tree/v6.2.5" }, "funding": [ { @@ -2690,7 +2770,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-01-01T08:38:09+00:00" } ], "packages-dev": [],