Skip to content

Commit c46ef2a

Browse files
authored
Add PHP 8.5 (#1018)
* Add PHP 8.5 to continuous integration tests * Use variable * Add temporary skip * Allow PHP CS Fixer to run on unsupported PHP versions
1 parent 4b36f45 commit c46ef2a

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

.github/workflows/ci.yml

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

README.md

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

3939
### 📋 Requirements
4040

41-
PHP Curl Class works with PHP versions 8.4, 8.3, 8.2, 8.1, and 8.0.
41+
PHP Curl Class works with PHP versions 8.5, 8.4, 8.3, 8.2, 8.1, and 8.0.
4242

4343
### 🚀 Quick Start and Examples
4444

tests/.php-cs-fixer.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
->in(dirname(__DIR__));
55

66
$config = new PhpCsFixer\Config();
7+
8+
// Turn on unsupported PHP versions when the method exists for compatibility
9+
// with older PHP CS Fixer versions.
10+
if (is_callable([$config, 'setUnsupportedPhpVersionAllowed'])) {
11+
$config->setUnsupportedPhpVersionAllowed(true);
12+
}
13+
714
$config
815
->setRiskyAllowed(true)
916
->setRules([

tests/run.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ if [[ "${CI}" == "true" ]]; then
2020
# - vimeo/psalm[6.5.1, ..., 6.8.8] require php ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 -> your php version (8.5.0-dev) does not satisfy that requirement.
2121
#
2222
# Error: Your requirements could not be resolved to an installable set of packages.
23-
if ! "${CI_PHP_FUTURE_RELEASE}"; then
23+
if "${CI_PHP_FUTURE_RELEASE}"; then
24+
install_psalm=false
25+
# Skip attempting to install psalm on PHP version 8.5 and higher as psalm
26+
# does not yet support these versions.
27+
elif [[ $(echo "${CI_PHP_VERSION} >= 8.5" | bc) -eq 1 ]]; then
28+
install_psalm=false
29+
else
30+
install_psalm=true
31+
fi
32+
33+
if ${install_psalm}; then
2434
composer require --dev "vimeo/psalm:>=5.26.1"
2535
fi
2636

0 commit comments

Comments
 (0)