Skip to content

Commit a041ac9

Browse files
authored
Add PHP 8.4 as supported (#900)
* Add PHP 8.4 as supported * Add temporary workaround that manually install psalm on currently supported versions
1 parent e5dac1d commit a041ac9

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ jobs:
2020
- '8.1'
2121
- '8.2'
2222
- '8.3'
23+
- '8.4'
2324
future-release: [false]
2425
include:
25-
- php-version: '8.4'
26+
- php-version: '8.5'
2627
future-release: true
2728
fail-fast: false
2829
name: PHP ${{ matrix.php-version }}
@@ -47,4 +48,6 @@ jobs:
4748

4849
- name: Static analysis
4950
run: 'vendor/bin/psalm --config="tests/psalm.xml"'
50-
if: ${{ !matrix.future-release }}
51+
# TODO: Remove exclusion that skips running psalm on PHP 8.4 when psalm
52+
# supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107).
53+
if: ${{ !matrix.future-release && matrix.php-version < 8.4 }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Installation instructions to use the `composer` command can be found on https://
3737

3838
### 📋 Requirements
3939

40-
PHP Curl Class works with PHP 8.3, 8.2, 8.1, 8.0, and 7.4.
40+
PHP Curl Class works with PHP 8.4, 8.3, 8.2, 8.1, 8.0, and 7.4.
4141

4242
### 🚀 Quick Start and Examples
4343

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"phpcompatibility/php-compatibility": "dev-develop",
2929
"phpcsstandards/phpcsutils": "@alpha",
3030
"phpunit/phpunit": "*",
31-
"squizlabs/php_codesniffer": "*",
32-
"vimeo/psalm": ">=5.26.1"
31+
"squizlabs/php_codesniffer": "*"
3332
},
3433
"suggest": {
3534
"ext-mbstring": "*"

tests/check_coding_standards.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,17 @@ if [[ "${?}" -ne 0 ]]; then
114114
errors+=("found PHP_CodeSniffer coding standard violation(s)")
115115
fi
116116

117+
# TODO: Remove this workaround that only runs php-cs-fixer on PHP < 8.4 when
118+
# php-cs-fixer supports PHP 8.4.
119+
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8300
120+
if [[ $(echo "${CI_PHP_VERSION} < 8.4" | bc -l) -eq 1 ]]; then
121+
117122
# Run PHP-CS-Fixer.
118123
vendor/bin/php-cs-fixer --version
119124
vendor/bin/php-cs-fixer fix --ansi --config="tests/.php-cs-fixer.php" --diff --dry-run
120125
if [[ "${?}" -ne 0 ]]; then
121126
echo "Error: found PHP-CS-Fixer coding standard violation(s)"
122127
errors+=("found PHP-CS-Fixer coding standard violation(s)")
123128
fi
129+
130+
fi

tests/ci.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ phpunit_v10_shim() {
6060
set -x
6161

6262
composer self-update
63+
64+
# TODO: Add "vimeo/psalm" back into composer.json under "require-dev" when
65+
# vimeo/psalm supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107):
66+
# "require-dev": {
67+
# "vimeo/psalm": ">=5.26.1"
68+
# },
69+
#
70+
# TODO: Remove this workaround that only installs vimeo/psalm on PHP < 8.4 when
71+
# vimeo/psalm supports PHP 8.4 (https://github.com/vimeo/psalm/issues/11107):
72+
if [[ $(echo "${CI_PHP_VERSION} < 8.4" | bc -l) -eq 1 ]]; then
73+
composer require --dev "vimeo/psalm:>=5.26.1"
74+
fi
75+
6376
composer install --prefer-source --no-interaction
6477

6578
# Use composer's phpunit and phpcs by adding composer bin directory to the path environment variable.

0 commit comments

Comments
 (0)