From 11db58e7d284e48c3f921580adbd587d041d68d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 5 Sep 2023 10:46:28 +0200 Subject: [PATCH] Fix: Drop support for PHP 7.4 --- .github/workflows/branch-alias.yaml | 2 +- .github/workflows/coding-standards.yaml | 2 +- .github/workflows/static-analysis.yaml | 4 ++-- .github/workflows/tests.yaml | 1 - CHANGELOG.md | 2 ++ composer.json | 2 +- phpstan-baseline.neon | 28 ++++++++----------------- 7 files changed, 16 insertions(+), 25 deletions(-) diff --git a/.github/workflows/branch-alias.yaml b/.github/workflows/branch-alias.yaml index 87d0cc0c2d..7697b1d9e7 100644 --- a/.github/workflows/branch-alias.yaml +++ b/.github/workflows/branch-alias.yaml @@ -13,7 +13,7 @@ jobs: - name: "Set up PHP" uses: "shivammathur/setup-php@v2" with: - php-version: "7.4" + php-version: "8.0" coverage: "none" - name: "Checkout code" diff --git a/.github/workflows/coding-standards.yaml b/.github/workflows/coding-standards.yaml index 45055acb01..7f03e10149 100644 --- a/.github/workflows/coding-standards.yaml +++ b/.github/workflows/coding-standards.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" steps: - name: "Checkout code" diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 27b676cefd..9dd7a57e33 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php-version: ["7.4"] + php-version: ["8.0"] steps: - name: "Checkout code" @@ -55,7 +55,7 @@ jobs: strategy: matrix: - php-version: ["7.4"] + php-version: ["8.0"] steps: - name: "Checkout" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 64807579bb..c7138d2b86 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,7 +18,6 @@ jobs: experimental: - false php-version: - - "7.4" - "8.0" - "8.1" - "8.2" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0900d4798e..fbca510403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.0...main) +- Dropped support for PHP 7.4 (#733) + ## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0) - Update `randomElements` to return random number of elements when no count is provided (#658) diff --git a/composer.json b/composer.json index 9b85ce9d43..0acca4c915 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f5e829a001..ee87670472 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#" count: 1 path: src/Faker/Calculator/Iban.php @@ -605,11 +605,6 @@ parameters: count: 1 path: src/Faker/ORM/Spot/Populator.php - - - message: "#^Class UnitEnum not found\\.$#" - count: 2 - path: src/Faker/Provider/Base.php - - message: """ #^Instantiation of deprecated class Faker\\\\DefaultGenerator\\: @@ -624,7 +619,7 @@ parameters: path: src/Faker/Provider/Base.php - - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#" count: 1 path: src/Faker/Provider/Base.php @@ -674,12 +669,12 @@ parameters: path: src/Faker/Provider/Lorem.php - - message: "#^Parameter \\#1 \\$str of function md5 expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function md5 expects string, int given\\.$#" count: 1 path: src/Faker/Provider/Miscellaneous.php - - message: "#^Parameter \\#1 \\$str of function sha1 expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function sha1 expects string, int given\\.$#" count: 1 path: src/Faker/Provider/Miscellaneous.php @@ -769,7 +764,7 @@ parameters: path: src/Faker/Provider/en_NG/Address.php - - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#" count: 1 path: src/Faker/Provider/en_ZA/Person.php @@ -894,12 +889,7 @@ parameters: path: src/Faker/Provider/pt_PT/Address.php - - message: "#^Left side of \\|\\| is always true\\.$#" - count: 1 - path: src/Faker/Provider/pt_PT/Person.php - - - - message: "#^Right side of \\|\\| is always false\\.$#" + message: "#^Binary operation \"\\*\" between string and int results in an error\\.$#" count: 1 path: src/Faker/Provider/pt_PT/Person.php @@ -909,7 +899,7 @@ parameters: path: src/Faker/Provider/ro_RO/Person.php - - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#" count: 1 path: src/Faker/Provider/ru_RU/Company.php @@ -929,7 +919,7 @@ parameters: path: src/Faker/Provider/sv_SE/Municipality.php - - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" + message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#" count: 1 path: src/Faker/Provider/zh_CN/Address.php @@ -939,7 +929,7 @@ parameters: path: src/Faker/Provider/zh_CN/Address.php - - message: "#^Parameter \\#1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\)\\: void, Closure\\(mixed\\)\\: bool given\\.$#" + message: "#^Parameter \\#1 \\$callback of function spl_autoload_register expects \\(callable\\(string\\)\\: void\\)\\|null, Closure\\(mixed\\)\\: bool given\\.$#" count: 1 path: src/autoload.php