From 60f80fd49e6f7c5130d2f5ffe70637bf656a1ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 14 Nov 2024 21:42:04 -0300 Subject: [PATCH] Bump PHP minimum version to 7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- .github/workflows/lint-and-analyse-php.yml | 8 ++++---- .github/workflows/tests.yml | 2 +- .scrutinizer.yml | 2 +- CHANGELOG.md | 3 +++ composer.json | 8 ++++---- phpstan-baseline.neon | 9 +++++++-- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint-and-analyse-php.yml b/.github/workflows/lint-and-analyse-php.yml index 24dd987..909e666 100644 --- a/.github/workflows/lint-and-analyse-php.yml +++ b/.github/workflows/lint-and-analyse-php.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up PHP 7.1 + - name: Set up PHP 7.2 uses: shivammathur/setup-php@v2 with: - php-version: 7.1 + php-version: 7.2 tools: composer:v2 - name: Validate composer.json and composer.lock @@ -34,10 +34,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up PHP 7.1 + - name: Set up PHP 7.2 uses: shivammathur/setup-php@v2 with: - php-version: 7.1 + php-version: 7.2 tools: composer:v2 - name: Install Composer dependencies diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5ff1cbf..48c25fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} strategy: matrix: - php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] extensions: [':apcu, mbstring', 'apcu, mbstring'] os: [ubuntu-latest] experimental: [false] diff --git a/.scrutinizer.yml b/.scrutinizer.yml index f707aaf..5e2e829 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -17,7 +17,7 @@ build: nodes: analysis: environment: - php: 7.1 + php: 7.2 dependencies: before: - composer install diff --git a/CHANGELOG.md b/CHANGELOG.md index 0338e53..5e1bfb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +* Bump PHP minimum version to 7.2 +* Add support for Symfony 7 + ## [5.3.1] - 2023-08-23 * Add function guards to the global functions (#44) diff --git a/composer.json b/composer.json index 07ddfb3..5b3cbc6 100644 --- a/composer.json +++ b/composer.json @@ -27,13 +27,13 @@ ] }, "require": { - "php": "^7.1 || ^8.0", - "symfony/expression-language": "^4.0 || ^5.0 || ^6.0" + "php": "^7.2 || ^8.0", + "symfony/expression-language": "^5.0 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.3", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5", "phpmyadmin/coding-standard": "^3.0.0", - "phpstan/phpstan": "^1.4.6" + "phpstan/phpstan": "^1.12" }, "autoload": { "psr-4": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ffb5d79..aaeb8c4 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,15 +1,20 @@ parameters: ignoreErrors: - - message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#" + message: "#^Offset 'lang' on array\\{0\\: string, lang\\: non\\-falsy\\-string, 1\\: non\\-falsy\\-string, country\\?\\: string, 2\\?\\: string, charset\\?\\: string, 3\\?\\: string, modifier\\?\\: non\\-empty\\-string, \\.\\.\\.\\} on left side of \\?\\? always exists and is not nullable\\.$#" count: 1 - path: src/StringReader.php + path: src/Loader.php - message: "#^Cannot cast mixed to int\\.$#" count: 1 path: src/Translator.php + - + message: "#^Parameter \\#1 \\$str of function ltrim expects string, string\\|false given\\.$#" + count: 1 + path: src/Translator.php + - message: "#^Strict comparison using \\=\\=\\= between non\\-empty\\-array\\ and false will always evaluate to false\\.$#" count: 1