Add PHP 8.4 as supported (#900)

* Add PHP 8.4 as supported

* Add temporary workaround that manually install psalm on currently supported versions
This commit is contained in:
Zach Borboa
2024-12-04 09:39:33 -05:00
committed by GitHub
parent e5dac1de0e
commit a041ac97db
5 changed files with 27 additions and 5 deletions
+5 -2
View File
@@ -20,9 +20,10 @@ jobs:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
future-release: [false]
include:
- php-version: '8.4'
- php-version: '8.5'
future-release: true
fail-fast: false
name: PHP ${{ matrix.php-version }}
@@ -47,4 +48,6 @@ jobs:
- name: Static analysis
run: 'vendor/bin/psalm --config="tests/psalm.xml"'
if: ${{ !matrix.future-release }}
# TODO: Remove exclusion that skips running psalm on PHP 8.4 when psalm
# supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107).
if: ${{ !matrix.future-release && matrix.php-version < 8.4 }}
+1 -1
View File
@@ -37,7 +37,7 @@ Installation instructions to use the `composer` command can be found on https://
### 📋 Requirements
PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, and 7.4.
PHP Curl Class works with PHP 8.4, 8.3, 8.2, 8.1, 8.0, and 7.4.
### 🚀 Quick Start and Examples
+1 -2
View File
@@ -28,8 +28,7 @@
"phpcompatibility/php-compatibility": "dev-develop",
"phpcsstandards/phpcsutils": "@alpha",
"phpunit/phpunit": "*",
"squizlabs/php_codesniffer": "*",
"vimeo/psalm": ">=5.26.1"
"squizlabs/php_codesniffer": "*"
},
"suggest": {
"ext-mbstring": "*"
+7
View File
@@ -114,6 +114,11 @@ if [[ "${?}" -ne 0 ]]; then
errors+=("found PHP_CodeSniffer coding standard violation(s)")
fi
# TODO: Remove this workaround that only runs php-cs-fixer on PHP < 8.4 when
# php-cs-fixer supports PHP 8.4.
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8300
if [[ $(echo "${CI_PHP_VERSION} < 8.4" | bc -l) -eq 1 ]]; then
# Run PHP-CS-Fixer.
vendor/bin/php-cs-fixer --version
vendor/bin/php-cs-fixer fix --ansi --config="tests/.php-cs-fixer.php" --diff --dry-run
@@ -121,3 +126,5 @@ if [[ "${?}" -ne 0 ]]; then
echo "Error: found PHP-CS-Fixer coding standard violation(s)"
errors+=("found PHP-CS-Fixer coding standard violation(s)")
fi
fi
+13
View File
@@ -60,6 +60,19 @@ phpunit_v10_shim() {
set -x
composer self-update
# TODO: Add "vimeo/psalm" back into composer.json under "require-dev" when
# vimeo/psalm supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107):
# "require-dev": {
# "vimeo/psalm": ">=5.26.1"
# },
#
# TODO: Remove this workaround that only installs vimeo/psalm on PHP < 8.4 when
# vimeo/psalm supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107):
if [[ $(echo "${CI_PHP_VERSION} < 8.4" | bc -l) -eq 1 ]]; then
composer require --dev "vimeo/psalm:>=5.26.1"
fi
composer install --prefer-source --no-interaction
# Use composer's phpunit and phpcs by adding composer bin directory to the path environment variable.