From 4e29d240f1e3f9faaea25b34242c09f00432c88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 30 Nov 2023 09:45:36 +0100 Subject: [PATCH] Enhancement: Add support for PHP 7.4 --- .github/settings.yml | 15 +- .github/workflows/integrate.yaml | 13 +- .github/workflows/renew.yaml | 2 +- .phive/phars.xml | 2 +- .php-cs-fixer.php | 2 +- CHANGELOG.md | 2 + composer-require-checker.json | 11 +- composer.json | 14 +- composer.lock | 1068 ++++++++--------- psalm-baseline.xml | 20 +- rector.php | 2 +- src/Fixers.php | 12 +- src/PhpVersion.php | 4 +- src/RuleSet.php | 19 +- test/EndToEnd/RuleSet/Php80Test.php | 2 + test/Unit/FixersTest.php | 36 +- test/Unit/RuleSet/AbstractRuleSetTestCase.php | 8 +- test/Unit/RuleSet/ExplicitRuleSetTestCase.php | 6 +- 18 files changed, 640 insertions(+), 598 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index ae925036..70b01ba4 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -14,12 +14,15 @@ branches: required_approving_review_count: 1 required_status_checks: checks: - - context: "Code Coverage (8.0, locked)" - - context: "Coding Standards (8.0, locked)" - - context: "Dependency Analysis (8.0, locked)" - - context: "Refactoring (8.0, locked)" - - context: "Security Analysis (8.0, locked)" - - context: "Static Code Analysis (8.0, locked)" + - context: "Code Coverage (7.4, locked)" + - context: "Coding Standards (7.4, locked)" + - context: "Dependency Analysis (7.4, locked)" + - context: "Refactoring (7.4, locked)" + - context: "Security Analysis (7.4, locked)" + - context: "Static Code Analysis (7.4, locked)" + - context: "Tests (7.4, highest)" + - context: "Tests (7.4, locked)" + - context: "Tests (7.4, lowest)" - context: "Tests (8.0, highest)" - context: "Tests (8.0, locked)" - context: "Tests (8.0, lowest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index c976feef..9c9231ab 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -80,7 +80,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -152,7 +152,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -208,7 +208,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -270,7 +270,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -320,7 +320,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -373,6 +373,7 @@ jobs: strategy: matrix: php-version: + - "7.4" - "8.0" - "8.1" - "8.2" diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 4b7ccfae..03b877a9 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" diff --git a/.phive/phars.xml b/.phive/phars.xml index 65e134ce..5d753776 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,4 +1,4 @@ - + diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 720323ab..6277108b 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -26,7 +26,7 @@ $license->save(); -$ruleSet = PhpCsFixer\Config\RuleSet\Php80::create()->withHeader($license->header()); +$ruleSet = PhpCsFixer\Config\RuleSet\Php74::create()->withHeader($license->header()); $config = PhpCsFixer\Config\Factory::fromRuleSet($ruleSet); diff --git a/CHANGELOG.md b/CHANGELOG.md index 766c8ba4..bb8f3f6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ For a full diff see [`6.12.0...main`][6.12.0...main]. ### Added - Added support for PHP 8.0 ([#951]), by [@localheinz] +- Added support for PHP 7.4 ([#952]), by [@localheinz] ## [`6.12.0`][6.12.0] @@ -1384,6 +1385,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#930]: https://github.com/ergebnis/php-cs-fixer-config/pull/930 [#942]: https://github.com/ergebnis/php-cs-fixer-config/pull/942 [#951]: https://github.com/ergebnis/php-cs-fixer-config/pull/951 +[#952]: https://github.com/ergebnis/php-cs-fixer-config/pull/952 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/composer-require-checker.json b/composer-require-checker.json index b8b091ad..ebffa833 100644 --- a/composer-require-checker.json +++ b/composer-require-checker.json @@ -1,3 +1,12 @@ { - "symbol-whitelist": [] + "symbol-whitelist": [ + "array", + "bool", + "false", + "int", + "null", + "self", + "string", + "true" + ] } diff --git a/composer.json b/composer.json index 5cd5db64..44a9e1fa 100644 --- a/composer.json +++ b/composer.json @@ -17,24 +17,24 @@ "security": "https://github.com/ergebnis/php-cs-fixer-config/blob/main/.github/SECURITY.md" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "ext-filter": "*", "erickskrauch/php-cs-fixer-custom-fixers": "~1.2.1", "friendsofphp/php-cs-fixer": "~3.40.0", "kubawerlos/php-cs-fixer-custom-fixers": "~3.17.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.31.0", - "ergebnis/data-provider": "^1.3.0", - "ergebnis/license": "^2.1.0", + "ergebnis/composer-normalize": "^2.28.3", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.0.0", "ergebnis/rector-rules": "~0.3.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.26.19", + "infection/infection": "~0.26.6", "phpunit/phpunit": "^9.6.13", "psalm/plugin-phpunit": "~0.18.4", "rector/rector": "~0.18.11", - "symfony/filesystem": "^6.0.0", - "symfony/process": "^6.0.0", + "symfony/filesystem": "^5.0.0 || ^6.0.0", + "symfony/process": "^5.0.0 || ^6.0.0", "vimeo/psalm": "^5.16.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 80a3d1f9..eef44acb 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": "2e3a192f0524f492b24c344769ab6e9a", + "content-hash": "3c9e54d0799da86401d0a55e3405e337", "packages": [ { "name": "composer/pcre", @@ -427,27 +427,22 @@ }, { "name": "psr/container", - "version": "2.0.2", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -474,9 +469,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/event-dispatcher", @@ -530,30 +525,30 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -574,9 +569,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "sebastian/diff", @@ -646,42 +641,46 @@ }, { "name": "symfony/console", - "version": "v6.0.19", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.1|^6.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0|2.0|3.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -716,12 +715,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.19" + "source": "https://github.com/symfony/console/tree/v5.4.32" }, "funding": [ { @@ -737,29 +736,29 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-11-18T18:23:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -788,7 +787,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -804,42 +803,44 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.19", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", - "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { - "php": ">=8.0.2", - "symfony/event-dispatcher-contracts": "^2|^3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -871,7 +872,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -887,24 +888,24 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.2", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "psr/event-dispatcher": "^1" }, "suggest": { @@ -913,7 +914,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -950,7 +951,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" }, "funding": [ { @@ -966,26 +967,27 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.19", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -1013,7 +1015,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.19" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -1029,24 +1031,26 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/finder", - "version": "v6.0.19", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -1074,7 +1078,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.19" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -1090,25 +1094,27 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.0.19", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", "shasum": "" }, "require": { - "php": ">=8.0.2", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -1141,7 +1147,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" }, "funding": [ { @@ -1157,7 +1163,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-02-14T08:03:56+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1489,6 +1495,85 @@ ], "time": "2023-07-28T09:04:16+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "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 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.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": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/polyfill-php80", "version": "v1.28.0", @@ -1653,20 +1738,21 @@ }, { "name": "symfony/process", - "version": "v6.0.19", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", - "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", + "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -1694,7 +1780,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.0.19" + "source": "https://github.com/symfony/process/tree/v5.4.28" }, "funding": [ { @@ -1710,25 +1796,26 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-08-07T10:36:04+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.0.2", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { - "php": ">=8.0.2", - "psr/container": "^2.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -1739,7 +1826,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1776,7 +1863,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -1792,24 +1879,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:58+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.0.19", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", - "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -1838,7 +1925,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" + "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" }, "funding": [ { @@ -1854,37 +1941,38 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-02-14T08:03:56+00:00" }, { "name": "symfony/string", - "version": "v6.0.19", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": ">=3.0" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { @@ -1923,7 +2011,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.19" + "source": "https://github.com/symfony/string/tree/v5.4.32" }, "funding": [ { @@ -1939,7 +2027,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-11-26T13:43:46+00:00" } ], "packages-dev": [ @@ -2109,97 +2197,6 @@ ], "time": "2021-03-30T17:13:30+00:00" }, - { - "name": "colinodell/json5", - "version": "v2.3.0", - "source": { - "type": "git", - "url": "https://github.com/colinodell/json5.git", - "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/colinodell/json5/zipball/15b063f8cb5e6deb15f0cd39123264ec0d19c710", - "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^7.1.3|^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" - }, - "require-dev": { - "mikehaertl/php-shellcommand": "^1.2.5", - "phpstan/phpstan": "^1.4", - "scrutinizer/ocular": "^1.6", - "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" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "files": [ - "src/global.php" - ], - "psr-4": { - "ColinODell\\Json5\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Developer" - } - ], - "description": "UTF-8 compatible JSON5 parser for PHP", - "homepage": "https://github.com/colinodell/json5", - "keywords": [ - "JSON5", - "json", - "json5_decode", - "json_decode" - ], - "support": { - "issues": "https://github.com/colinodell/json5/issues", - "source": "https://github.com/colinodell/json5/tree/v2.3.0" - }, - "funding": [ - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - } - ], - "time": "2022-12-27T16:44:40+00:00" - }, { "name": "composer/package-versions-deprecated", "version": "1.11.99.5", @@ -2489,39 +2486,35 @@ }, { "name": "ergebnis/composer-normalize", - "version": "2.31.0", + "version": "2.28.3", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "da1d18bcc2ca02111359c2c76fd938a907ba0a16" + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/da1d18bcc2ca02111359c2c76fd938a907ba0a16", - "reference": "da1d18bcc2ca02111359c2c76fd938a907ba0a16", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/ec75a2bf751f6fec165e9ea0262655b8ca397e5c", + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", - "ergebnis/json": "^1.0.1", - "ergebnis/json-normalizer": "^4.1.0", - "ergebnis/json-printer": "^3.3.0", - "ext-json": "*", + "ergebnis/json-normalizer": "~2.1.0", + "ergebnis/json-printer": "^3.2.0", "justinrainbow/json-schema": "^5.2.12", "localheinz/diff": "^1.1.1", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "composer/composer": "^2.5.5", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.5.2", - "fakerphp/faker": "^1.21.0", - "infection/infection": "~0.26.19", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.15.25", - "symfony/filesystem": "^6.0.13", - "vimeo/psalm": "^5.9.0" + "composer/composer": "^2.3.9", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^4.4.0", + "fakerphp/faker": "^1.19.0", + "phpunit/phpunit": "^9.5.21", + "psalm/plugin-phpunit": "~0.17.0", + "symfony/filesystem": "^5.4.9", + "vimeo/psalm": "^4.24.0" }, "type": "composer-plugin", "extra": { @@ -2529,8 +2522,7 @@ "composer-normalize": { "indent-size": 2, "indent-style": "space" - }, - "plugin-optional": true + } }, "autoload": { "psr-4": { @@ -2557,36 +2549,35 @@ ], "support": { "issues": "https://github.com/ergebnis/composer-normalize/issues", - "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2023-05-02T14:10:33+00:00" + "time": "2022-07-05T16:09:10+00:00" }, { "name": "ergebnis/data-provider", - "version": "1.3.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/ergebnis/data-provider.git", - "reference": "867236c752235bdf1a675b1fc9e5768f4300f871" + "reference": "3fa1615fccba03596fe81876304c8f27a2d716ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/data-provider/zipball/867236c752235bdf1a675b1fc9e5768f4300f871", - "reference": "867236c752235bdf1a675b1fc9e5768f4300f871", + "url": "https://api.github.com/repos/ergebnis/data-provider/zipball/3fa1615fccba03596fe81876304c8f27a2d716ff", + "reference": "3fa1615fccba03596fe81876304c8f27a2d716ff", "shasum": "" }, "require": { - "fakerphp/faker": "^1.20.0", - "php": "^8.0" + "fakerphp/faker": "^1.19.0", + "php": "^7.4 || ^8.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.28.3", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.0.0", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "vimeo/psalm": "^4.30" + "ergebnis/composer-normalize": "^2.23.1", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^4.1.0", + "phpunit/phpunit": "^9.5.13", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.20" }, "type": "library", "extra": { @@ -2620,109 +2611,44 @@ "issues": "https://github.com/ergebnis/data-provider/issues", "source": "https://github.com/ergebnis/data-provider" }, - "time": "2022-11-28T17:18:36+00:00" - }, - { - "name": "ergebnis/json", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json.git", - "reference": "d66ea30060856d0729a4aa319a02752519ca63a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/d66ea30060856d0729a4aa319a02752519ca63a0", - "reference": "d66ea30060856d0729a4aa319a02752519ca63a0", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.29.0", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.0.0", - "ergebnis/phpstan-rules": "^1.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "^9.5.27", - "psalm/plugin-phpunit": "~0.18.4", - "vimeo/psalm": "^5.1.0" - }, - "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com" + "url": "https://github.com/localheinz", + "type": "github" } ], - "description": "Provides a Json value object for representing a valid JSON string.", - "homepage": "https://github.com/ergebnis/json", - "keywords": [ - "json" - ], - "support": { - "issues": "https://github.com/ergebnis/json/issues", - "source": "https://github.com/ergebnis/json" - }, - "time": "2022-12-10T22:38:50+00:00" + "time": "2022-02-10T18:54:18+00:00" }, { "name": "ergebnis/json-normalizer", - "version": "4.1.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "e38f8b27f908686b200e3bd68e1b7bdfb5d53061" + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/e38f8b27f908686b200e3bd68e1b7bdfb5d53061", - "reference": "e38f8b27f908686b200e3bd68e1b7bdfb5d53061", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/2039eb11131a243b9204bf51219baa08935e6b1d", + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.1", - "ergebnis/json-pointer": "^3.2.0", - "ergebnis/json-printer": "^3.3.0", - "ergebnis/json-schema-validator": "^4.0.0", + "ergebnis/json-printer": "^3.2.0", + "ergebnis/json-schema-validator": "^2.0.0", "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.4 || ^8.0" }, "require-dev": { - "composer/semver": "^3.2.1", - "ergebnis/data-provider": "^1.3.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.5.2", - "fakerphp/faker": "^1.21.0", - "infection/infection": "~0.26.19", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.15.25", - "symfony/filesystem": "^6.0.19", - "symfony/finder": "^6.0.19", - "vimeo/psalm": "^5.9.0" - }, - "suggest": { - "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.17.0" }, "type": "library", "autoload": { @@ -2750,98 +2676,41 @@ "issues": "https://github.com/ergebnis/json-normalizer/issues", "source": "https://github.com/ergebnis/json-normalizer" }, - "time": "2023-05-02T11:08:03+00:00" - }, - { - "name": "ergebnis/json-pointer", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/861516ff5afa1aa8905fdf3361315909523a1bf8", - "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.28.3", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "vimeo/psalm": "^4.30" - }, - "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Pointer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com" + "url": "https://github.com/localheinz", + "type": "github" } ], - "description": "Provides JSON pointer as a value object.", - "homepage": "https://github.com/ergebnis/json-pointer", - "keywords": [ - "RFC6901", - "json", - "pointer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-pointer/issues", - "source": "https://github.com/ergebnis/json-pointer" - }, - "time": "2022-11-28T17:03:31+00:00" + "time": "2022-01-04T11:19:55+00:00" }, { "name": "ergebnis/json-printer", - "version": "3.3.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-printer.git", - "reference": "18920367473b099633f644f0ca6dc8794345148f" + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/18920367473b099633f644f0ca6dc8794345148f", - "reference": "18920367473b099633f644f0ca6dc8794345148f", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/651cab2b7604a6b338d0d16749f5ea0851a68005", + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "ergebnis/license": "^2.0.0", - "ergebnis/php-cs-fixer-config": "^4.11.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "vimeo/psalm": "^4.30.0" + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.16.1" }, "type": "library", "autoload": { @@ -2870,39 +2739,43 @@ "issues": "https://github.com/ergebnis/json-printer/issues", "source": "https://github.com/ergebnis/json-printer" }, - "time": "2022-11-28T10:27:43+00:00" + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-27T12:39:13+00:00" }, { "name": "ergebnis/json-schema-validator", - "version": "4.0.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723" + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/a6166272ac5691a9bc791f185841e5f92a6d4723", - "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.0", - "ergebnis/json-pointer": "^3.2.0", "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "^8.0" + "justinrainbow/json-schema": "^5.2.10", + "php": "^7.4 || ^8.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.21.0", - "ergebnis/data-provider": "^1.2.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "~5.0.0", - "fakerphp/faker": "^1.20.0", - "infection/infection": "~0.26.16", - "phpunit/phpunit": "~9.5.27", - "psalm/plugin-phpunit": "~0.18.4", - "vimeo/psalm": "^5.1.0" + "ergebnis/composer-normalize": "^2.18.0", + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "~3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.3", + "phpunit/phpunit": "~9.5.10", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.15.0" }, "type": "library", "extra": { @@ -2937,36 +2810,42 @@ "issues": "https://github.com/ergebnis/json-schema-validator/issues", "source": "https://github.com/ergebnis/json-schema-validator" }, - "time": "2022-12-10T14:50:15+00:00" + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-13T16:54:56+00:00" }, { "name": "ergebnis/license", - "version": "2.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/license.git", - "reference": "7a2c4a89ebf284eab2867cd660f54d50fd049368" + "reference": "4776a6e8aa1fa62dd4fd7b2a9e339d8b74bc0018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/license/zipball/7a2c4a89ebf284eab2867cd660f54d50fd049368", - "reference": "7a2c4a89ebf284eab2867cd660f54d50fd049368", + "url": "https://api.github.com/repos/ergebnis/license/zipball/4776a6e8aa1fa62dd4fd7b2a9e339d8b74bc0018", + "reference": "4776a6e8aa1fa62dd4fd7b2a9e339d8b74bc0018", "shasum": "" }, "require": { "ext-filter": "*", - "php": "^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.28.3", "ergebnis/data-provider": "^1.2.0", - "ergebnis/php-cs-fixer-config": "^4.11.0", + "ergebnis/php-cs-fixer-config": "^4.9.0", "fakerphp/faker": "^1.20.0", "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "~0.18.3", - "symfony/filesystem": "^6.0.13", - "vimeo/psalm": "^4.29.0" + "phpunit/phpunit": "^9.5.25", + "psalm/plugin-phpunit": "~0.17.0", + "symfony/filesystem": "^5.4.13", + "vimeo/psalm": "^4.27.0" }, "type": "library", "autoload": { @@ -2993,7 +2872,7 @@ "issues": "https://github.com/ergebnis/license/issues", "source": "https://github.com/ergebnis/license" }, - "time": "2022-11-28T10:46:05+00:00" + "time": "2022-10-01T10:46:58+00:00" }, { "name": "ergebnis/rector-rules", @@ -3229,16 +3108,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.4.1", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2" + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/79261cc280aded96d098e1b0e0ba0c4881b432c2", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", "shasum": "" }, "require": { @@ -3278,7 +3157,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" }, "funding": [ { @@ -3286,7 +3165,7 @@ "type": "github" } ], - "time": "2022-12-16T22:01:02+00:00" + "time": "2022-12-24T12:35:10+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -3467,63 +3346,61 @@ }, { "name": "infection/infection", - "version": "0.26.19", + "version": "0.26.6", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f" + "reference": "de9b6b92f00ff1cb39decddf95797a4ebec3a1ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f", - "reference": "bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f", + "url": "https://api.github.com/repos/infection/infection/zipball/de9b6b92f00ff1cb39decddf95797a4ebec3a1ee", + "reference": "de9b6b92f00ff1cb39decddf95797a4ebec3a1ee", "shasum": "" }, "require": { - "colinodell/json5": "^2.2", "composer-runtime-api": "^2.0", "composer/xdebug-handler": "^2.0 || ^3.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", - "ext-mbstring": "*", - "fidry/cpu-core-counter": "^0.4.0", "infection/abstract-testframework-adapter": "^0.5.0", "infection/extension-installer": "^0.1.0", "infection/include-interceptor": "^0.2.5", "justinrainbow/json-schema": "^5.2.10", - "nikic/php-parser": "^4.15.1", + "nikic/php-parser": "^4.13.2", "ondram/ci-detector": "^4.1.0", - "php": "^8.0", + "php": "^7.4.7 || ^8.0", "sanmai/later": "^0.1.1", "sanmai/pipeline": "^5.1 || ^6", - "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/process": "^5.4 || ^6.0", - "thecodingmachine/safe": "^2.1.2", - "webmozart/assert": "^1.11" + "sebastian/diff": "^3.0.2 || ^4.0", + "seld/jsonlint": "^1.7", + "symfony/console": "^3.4.29 || ^4.1.19 || ^5.0 || ^6.0", + "symfony/filesystem": "^3.4.29 || ^4.1.19 || ^5.0 || ^6.0", + "symfony/finder": "^3.4.29 || ^4.1.19 || ^5.0 || ^6.0", + "symfony/process": "^3.4.29 || ^4.1.19 || ^5.0 || ^6.0", + "thecodingmachine/safe": "^1.1.3", + "webmozart/assert": "^1.3", + "webmozart/path-util": "^2.3" }, "conflict": { - "dg/bypass-finals": "<1.4.1", - "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" + "dg/bypass-finals": "*", + "phpunit/php-code-coverage": ">9 <9.1.4" }, "require-dev": { "brianium/paratest": "^6.3", "ext-simplexml": "*", - "fidry/makefile": "^0.2.0", "helmich/phpunit-json-assert": "^3.0", "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "^1.3.0", + "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.1.0", "phpstan/phpstan-webmozart-assert": "^1.0.2", - "phpunit/phpunit": "^9.5.5", - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.0", - "thecodingmachine/phpstan-safe-rule": "^1.2.0" + "phpunit/phpunit": "^9.3.11", + "symfony/phpunit-bridge": "^4.4.18 || ^5.1.10", + "symfony/yaml": "^5.0", + "thecodingmachine/phpstan-safe-rule": "^1.1.0" }, "bin": [ "bin/infection" @@ -3579,7 +3456,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.26.19" + "source": "https://github.com/infection/infection/tree/0.26.6" }, "funding": [ { @@ -3591,7 +3468,7 @@ "type": "open_collective" } ], - "time": "2023-02-05T21:47:26+00:00" + "time": "2022-03-07T11:40:30+00:00" }, { "name": "justinrainbow/json-schema", @@ -6006,27 +5883,92 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2023-05-11T13:16:46+00:00" + }, { "name": "spatie/array-to-xml", - "version": "3.2.2", + "version": "2.17.1", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" + "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", - "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", + "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", "shasum": "" }, "require": { "ext-dom": "*", - "php": "^8.0" + "php": "^7.4|^8.0" }, "require-dev": { "mockery/mockery": "^1.2", "pestphp/pest": "^1.21", + "phpunit/phpunit": "^9.0", "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", @@ -6055,7 +5997,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" + "source": "https://github.com/spatie/array-to-xml/tree/2.17.1" }, "funding": [ { @@ -6067,64 +6009,31 @@ "type": "github" } ], - "time": "2023-11-14T14:08:51+00:00" + "time": "2022-12-26T08:22:07+00:00" }, { "name": "symplify/rule-doc-generator-contracts", - "version": "9.4.70", + "version": "v9.3.26", "source": { "type": "git", "url": "https://github.com/symplify/rule-doc-generator-contracts.git", - "reference": "1f6ea1652dbb52d4f867f159ac12d59540f04e21" + "reference": "a6f944a49198ed3260bc941533629e917137e476" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symplify/rule-doc-generator-contracts/zipball/1f6ea1652dbb52d4f867f159ac12d59540f04e21", - "reference": "1f6ea1652dbb52d4f867f159ac12d59540f04e21", + "url": "https://api.github.com/repos/symplify/rule-doc-generator-contracts/zipball/a6f944a49198ed3260bc941533629e917137e476", + "reference": "a6f944a49198ed3260bc941533629e917137e476", "shasum": "" }, "require": { "danielstjules/stringy": "^3.1", "nette/utils": "^3.2", - "php": ">=8.0" - }, - "conflict": { - "symplify/amnesia": "<9.4.70", - "symplify/astral": "<9.4.70", - "symplify/autowire-array-parameter": "<9.4.70", - "symplify/coding-standard": "<9.4.70", - "symplify/composer-json-manipulator": "<9.4.70", - "symplify/config-transformer": "<9.4.70", - "symplify/console-color-diff": "<9.4.70", - "symplify/console-package-builder": "<9.4.70", - "symplify/easy-ci": "<9.4.70", - "symplify/easy-coding-standard": "<9.4.70", - "symplify/easy-hydrator": "<9.4.70", - "symplify/easy-testing": "<9.4.70", - "symplify/git-wrapper": "<9.4.70", - "symplify/latte-phpstan-compiler": "<9.4.70", - "symplify/markdown-diff": "<9.4.70", - "symplify/monorepo-builder": "<9.4.70", - "symplify/package-builder": "<9.4.70", - "symplify/php-config-printer": "<9.4.70", - "symplify/phpstan-extensions": "<9.4.70", - "symplify/phpstan-rules": "<9.4.70", - "symplify/psr4-switcher": "<9.4.70", - "symplify/rule-doc-generator": "<9.4.70", - "symplify/simple-php-doc-parser": "<9.4.70", - "symplify/skipper": "<9.4.70", - "symplify/smart-file-system": "<9.4.70", - "symplify/symfony-php-config": "<9.4.70", - "symplify/symfony-static-dumper": "<9.4.70", - "symplify/symplify-kernel": "<9.4.70", - "symplify/template-phpstan-compiler": "<9.4.70", - "symplify/twig-phpstan-compiler": "<9.4.70", - "symplify/vendor-patches": "<9.4.70" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "9.5-dev" + "dev-main": "9.4-dev" } }, "autoload": { @@ -6138,7 +6047,7 @@ ], "description": "Contracts for production code of RuleDocGenerator", "support": { - "source": "https://github.com/symplify/rule-doc-generator-contracts/tree/9.4.70" + "source": "https://github.com/symplify/rule-doc-generator-contracts/tree/v9.3.26" }, "funding": [ { @@ -6150,50 +6059,43 @@ "type": "github" } ], - "time": "2021-10-02T16:05:23+00:00" + "time": "2021-06-06T16:17:29+00:00" }, { "name": "thecodingmachine/safe", - "version": "v2.5.0", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/thecodingmachine/safe.git", - "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0" + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/3115ecd6b4391662b4931daac4eba6b07a2ac1f0", - "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", "shasum": "" }, "require": { - "php": "^8.0" + "php": ">=7.2" }, "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^0.12", "squizlabs/php_codesniffer": "^3.2", - "thecodingmachine/phpstan-strict-rules": "^1.0" + "thecodingmachine/phpstan-strict-rules": "^0.12" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "0.1-dev" } }, "autoload": { "files": [ "deprecated/apc.php", - "deprecated/array.php", - "deprecated/datetime.php", "deprecated/libevent.php", - "deprecated/misc.php", - "deprecated/password.php", "deprecated/mssql.php", "deprecated/stats.php", - "deprecated/strings.php", "lib/special_cases.php", - "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", "generated/array.php", @@ -6214,7 +6116,6 @@ "generated/fpm.php", "generated/ftp.php", "generated/funchand.php", - "generated/gettext.php", "generated/gmp.php", "generated/gnupg.php", "generated/hash.php", @@ -6224,6 +6125,7 @@ "generated/image.php", "generated/imap.php", "generated/info.php", + "generated/ingres-ii.php", "generated/inotify.php", "generated/json.php", "generated/ldap.php", @@ -6232,14 +6134,20 @@ "generated/mailparse.php", "generated/mbstring.php", "generated/misc.php", + "generated/msql.php", "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", "generated/network.php", "generated/oci8.php", "generated/opcache.php", "generated/openssl.php", "generated/outcontrol.php", + "generated/password.php", "generated/pcntl.php", "generated/pcre.php", + "generated/pdf.php", "generated/pgsql.php", "generated/posix.php", "generated/ps.php", @@ -6250,6 +6158,7 @@ "generated/sem.php", "generated/session.php", "generated/shmop.php", + "generated/simplexml.php", "generated/sockets.php", "generated/sodium.php", "generated/solr.php", @@ -6272,13 +6181,13 @@ "generated/zip.php", "generated/zlib.php" ], - "classmap": [ - "lib/DateTime.php", - "lib/DateTimeImmutable.php", - "lib/Exceptions/", - "deprecated/Exceptions/", - "generated/Exceptions/" - ] + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6287,9 +6196,9 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { "issues": "https://github.com/thecodingmachine/safe/issues", - "source": "https://github.com/thecodingmachine/safe/tree/v2.5.0" + "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" }, - "time": "2023-04-05T11:54:14+00:00" + "time": "2020-10-28T17:51:34+00:00" }, { "name": "theseer/tokenizer", @@ -6508,6 +6417,57 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "abandoned": "symfony/filesystem", + "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], @@ -6516,7 +6476,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "ext-filter": "*" }, "platform-dev": [], diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 6f1ecafa..68c5ce51 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,9 +1,25 @@ + + + \gettype($iterated) + + + $iterable + $value + + \gettype($iterable) + + + \is_object($iterated) + + + \is_object($iterable) + @@ -89,7 +105,9 @@ - $value + $iterable + $iterable + $iterable diff --git a/rector.php b/rector.php index 98b4293c..2d3c241f 100644 --- a/rector.php +++ b/rector.php @@ -26,7 +26,7 @@ __DIR__ . '/test/', ]); - $rectorConfig->phpVersion(Core\ValueObject\PhpVersion::PHP_80); + $rectorConfig->phpVersion(Core\ValueObject\PhpVersion::PHP_74); $rectorConfig->rules([ Rules\Arrays\SortAssociativeArrayByKeyRector::class, diff --git a/src/Fixers.php b/src/Fixers.php index 417c3a56..15319bbd 100644 --- a/src/Fixers.php +++ b/src/Fixers.php @@ -42,8 +42,16 @@ public static function fromFixers(Fixer\FixerInterface ...$value): self * * @throws \InvalidArgumentException */ - public static function fromIterable(iterable $iterable): self + public static function fromIterable($iterable): self { + if (!\is_array($iterable) && !$iterable instanceof \Traversable) { + throw new \InvalidArgumentException(\sprintf( + 'Expected iterable to be an array or implement %s, got %s instead.', + \Traversable::class, + \is_object($iterable) ? \get_class($iterable) : \gettype($iterable), + )); + } + $value = []; foreach ($iterable as $iterated) { @@ -51,7 +59,7 @@ public static function fromIterable(iterable $iterable): self throw new \InvalidArgumentException(\sprintf( 'Expected iterable to contain only instances of %s, got %s instead.', Fixer\FixerInterface::class, - \get_debug_type($iterated), + \is_object($iterated) ? \get_class($iterated) : \gettype($iterated), )); } diff --git a/src/PhpVersion.php b/src/PhpVersion.php index 3f4d9a20..2955eb47 100644 --- a/src/PhpVersion.php +++ b/src/PhpVersion.php @@ -22,7 +22,7 @@ final class PhpVersion private function __construct( PhpVersion\Major $major, PhpVersion\Minor $minor, - PhpVersion\Patch $patch, + PhpVersion\Patch $patch ) { $this->major = $major; $this->minor = $minor; @@ -32,7 +32,7 @@ private function __construct( public static function create( PhpVersion\Major $major, PhpVersion\Minor $minor, - PhpVersion\Patch $patch, + PhpVersion\Patch $patch ): self { return new self( $major, diff --git a/src/RuleSet.php b/src/RuleSet.php index a307c00d..133bb2af 100644 --- a/src/RuleSet.php +++ b/src/RuleSet.php @@ -15,19 +15,28 @@ final class RuleSet { + private Rules $rules; + private PhpVersion $phpVersion; + private Name $name; + private Fixers $customFixers; + private function __construct( - private Fixers $customFixers, - private Name $name, - private PhpVersion $phpVersion, - private Rules $rules, + Fixers $customFixers, + Name $name, + PhpVersion $phpVersion, + Rules $rules ) { + $this->customFixers = $customFixers; + $this->name = $name; + $this->phpVersion = $phpVersion; + $this->rules = $rules; } public static function create( Fixers $customFixers, Name $name, PhpVersion $phpVersion, - Rules $rules, + Rules $rules ): self { return new self( $customFixers, diff --git a/test/EndToEnd/RuleSet/Php80Test.php b/test/EndToEnd/RuleSet/Php80Test.php index bd1def4e..a1b82ad0 100644 --- a/test/EndToEnd/RuleSet/Php80Test.php +++ b/test/EndToEnd/RuleSet/Php80Test.php @@ -15,6 +15,8 @@ /** * @coversNothing + * + * @requires PHP 8.0 */ final class Php80Test extends AbstractRuleSetTestCase { diff --git a/test/Unit/FixersTest.php b/test/Unit/FixersTest.php index c8e45f68..4f270abc 100644 --- a/test/Unit/FixersTest.php +++ b/test/Unit/FixersTest.php @@ -12,6 +12,7 @@ */ use Ergebnis\PhpCsFixer\Config\Fixers; +use Ergebnis\PhpCsFixer\Config\Test; use PhpCsFixer\Fixer; use PHPUnit\Framework; @@ -20,6 +21,8 @@ */ final class FixersTest extends Framework\TestCase { + use Test\Util\Helper; + public function testEmptyReturnsFixers(): void { $fixers = Fixers::empty(); @@ -40,9 +43,36 @@ public function testFromFixersReturnsFixers(): void self::assertSame($value, $fixers->toArray()); } - public function testFromIterableRejectsInvalidValue(): void + public function testFromIterableRejectsIterableWhenItIsASimpleType(): void { - $value = [ + $iterable = self::faker()->word(); + + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage(\sprintf( + 'Expected iterable to be an array or implement %s, got string instead.', + \Traversable::class, + )); + + Fixers::fromIterable($iterable); + } + + public function testFromIterableRejectsIterableWhenItIsNotATraversable(): void + { + $iterable = new stdClass(); + + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage(\sprintf( + 'Expected iterable to be an array or implement %s, got %s instead.', + \Traversable::class, + stdClass::class, + )); + + Fixers::fromIterable($iterable); + } + + public function testFromIterableRejectsIterableWhenItDoesNotContainFixersOnly(): void + { + $iterable = [ $this->createStub(Fixer\FixerInterface::class), new \stdClass(), $this->createStub(Fixer\FixerInterface::class), @@ -55,7 +85,7 @@ public function testFromIterableRejectsInvalidValue(): void stdClass::class, )); - Fixers::fromIterable($value); + Fixers::fromIterable($iterable); } public function testFromIterableReturnsFixersWhenValueIsArray(): void diff --git a/test/Unit/RuleSet/AbstractRuleSetTestCase.php b/test/Unit/RuleSet/AbstractRuleSetTestCase.php index d89bbb7a..804a79cb 100644 --- a/test/Unit/RuleSet/AbstractRuleSetTestCase.php +++ b/test/Unit/RuleSet/AbstractRuleSetTestCase.php @@ -60,7 +60,7 @@ static function (string $nameOfRule) use ($fixersThatAreRegistered): bool { self::assertEquals($rulesWithoutRulesThatAreNotRegistered, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" does not configure rules that are not registered.', - $ruleSet::class, + \get_class($ruleSet), )); } @@ -88,7 +88,7 @@ static function (string $nameOfRule) use ($fixersThatAreRegistered): bool { self::assertEquals($rulesWithoutRulesThatAreDeprecated, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" does not configure rules that are deprecated.', - $ruleSet::class, + \get_class($ruleSet), )); } @@ -142,7 +142,7 @@ final public function testRuleSetDoesNotConfigureRulesUsingDeprecatedConfigurati self::assertEquals($rulesWithoutDeprecatedConfigurationOptions, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" does not configure rules using deprecated configuration options.', - $ruleSet::class, + \get_class($ruleSet), )); } @@ -156,7 +156,7 @@ final public function testRulesAndConfigurationOptionsAreSortedInRuleSet(): void self::assertSame($sorted, $rules->toArray(), \sprintf( 'Failed asserting that rules and configuration options are sorted by name in rule set "%s".', - $ruleSet::class, + \get_class($ruleSet), )); } diff --git a/test/Unit/RuleSet/ExplicitRuleSetTestCase.php b/test/Unit/RuleSet/ExplicitRuleSetTestCase.php index d4efc25d..ff118c20 100644 --- a/test/Unit/RuleSet/ExplicitRuleSetTestCase.php +++ b/test/Unit/RuleSet/ExplicitRuleSetTestCase.php @@ -34,7 +34,7 @@ static function (string $nameOfRule): bool { self::assertEquals($rulesWithoutRulesForRuleSets, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" does not configure rules for rule sets.', - $ruleSet::class, + \get_class($ruleSet), )); } @@ -64,7 +64,7 @@ final public function testRuleSetConfiguresAllRulesThatAreNotDeprecated(): void self::assertEquals($rulesWithRulesThatAreNotDeprecated, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" configures all non-deprecated fixers.', - $ruleSet::class, + \get_class($ruleSet), )); } @@ -136,7 +136,7 @@ final public function testRuleSetConfiguresAllRulesThatAreConfigurableAndNotDepr self::assertEquals($rulesWithAllNonDeprecatedConfigurationOptions, $rules->toArray(), \sprintf( 'Failed asserting that rule set "%s" configures configurable rules using all non-deprecated configuration options.', - $ruleSet::class, + \get_class($ruleSet), )); } }