Skip to content

Commit 66ff091

Browse files
authored
feat: official support php8.4 (#488)
fixes #464 --------- Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 203fc4d commit 66ff091

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

.github/workflows/php-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727
cancel-in-progress: true
2828

2929
env:
30-
PHP_VERSION_LATEST: "8.3"
30+
PHP_VERSION_LATEST: "8.4"
3131
PHP_PROJECT_EXT: dom,filter,json,libxml,simplexml # via `composer info -pt`
3232

3333
jobs:
@@ -42,7 +42,8 @@ jobs:
4242
- "macos-latest"
4343
- "windows-latest"
4444
php:
45-
- "8.3" # highest supported
45+
- "8.4" # highest supported
46+
- "8.3"
4647
- "8.2"
4748
- "8.1" # lowest supported
4849
timeout-minutes: 10

.github/workflows/php.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
env:
21-
PHP_VERSION_LATEST: "8.3"
21+
PHP_VERSION_LOWEST: "8.1" # lowest supported
22+
PHP_VERSION_LATEST: "8.4" # highest supported
2223
PHP_PROJECT_EXT: dom,json,libxml,simplexml # via `composer info -pt`
2324
REPORTS_DIR: CI_reports
2425
TESTS_REPORTS_ARTIFACT: tests-reports
@@ -51,7 +52,8 @@ jobs:
5152
matrix:
5253
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
5354
php:
54-
- "8.3" # highest supported
55+
- "8.4" # highest supported
56+
- "8.3"
5557
- "8.2"
5658
- "8.1" # lowest supported
5759
dependencies: [ "lowest", "highest" ]
@@ -148,7 +150,7 @@ jobs:
148150
matrix:
149151
include:
150152
- # highest supported
151-
php: "8.3"
153+
php: "8.4"
152154
dependencies: "highest"
153155
- # lowest supported
154156
php: "8.1"
@@ -299,7 +301,7 @@ jobs:
299301
# see https://github.com/shivammathur/setup-php
300302
uses: shivammathur/setup-php@v2
301303
with:
302-
php-version: ${{ env.PHP_VERSION_LATEST }}
304+
php-version: ${{ env.PHP_VERSION_LOWEST }}
303305
extensions: ${{ env.PHP_PROJECT_EXT }}
304306
tools: composer:v2
305307
coverage: none
@@ -321,8 +323,7 @@ jobs:
321323
- name: Run PHP-CS-Fixer tests
322324
run: >
323325
php tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
324-
fix
325-
--dry-run
326+
check
326327
--diff
327328
--using-cache=no
328329
--show-progress=dots

.php-cs-fixer.dist.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,18 @@
3535
* assistance via tool: https://mlocati.github.io/php-cs-fixer-configurator/
3636
*/
3737
[
38+
// region migrate
39+
// lowest supported PHP
40+
'@PHP80Migration:risky' => true, // there is no `PHP81Migration:risky`
3841
'@PHP81Migration' => true,
39-
'@PHP80Migration:risky' => true,
42+
// lowest supported Phpunit
4043
'@PHPUnit100Migration:risky' => true,
44+
// endregion migrate
45+
// region general code style
4146
'@Symfony' => true,
4247
'@Symfony:risky' => true,
48+
// endregion general code style
49+
// region customs
4350
'declare_strict_types' => true,
4451
'header_comment' => ['header' => $header],
4552
'global_namespace_import' => true,
@@ -52,6 +59,7 @@
5259
// 'psalm-suppress',
5360
],
5461
],
62+
// endregion customs
5563
]
5664
)
5765
->setRiskyAllowed(true)

HISTORY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ All notable changes to this project will be documented in this file.
66

77
<!-- add unreleased items here -->
88

9+
* Added
10+
* Officially support PHP 8.4 ([#464] via [#488])
911
* Misc
1012
* Added`Override` markers where needed (via [#508])
1113
See also: <https://wiki.php.net/rfc/marking_overriden_methods>
1214

15+
[#464]: https://github.com/CycloneDX/cyclonedx-php-library/issues/464
16+
[#488]: https://github.com/CycloneDX/cyclonedx-php-library/pull/488
1317
[#508]: https://github.com/CycloneDX/cyclonedx-php-library/pull/508
1418

15-
1619
## 3.5.2 - 2025-01-27
1720

1821
* Style

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"test:composer-normalize": "@composer -d tools/composer-normalize normalize --dry-run $PWD/composer.json",
117117
"test:composer-require-checker": "@php tools/composer-require-checker/vendor/maglnet/composer-require-checker/bin/composer-require-checker",
118118
"test:composer-unused": "@php tools/composer-unused/vendor/icanhazstring/composer-unused/bin/composer-unused --excludeDir=tools",
119-
"test:cs-fixer": "@php tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --dry-run --diff",
119+
"test:cs-fixer": "@php tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer check --diff",
120120
"test:infection": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src tools/infection/vendor/infection/infection/bin/infection ",
121121
"test:phpmd": "@php tools/phpmd/vendor/phpmd/phpmd/src/bin/phpmd src ansi phpmd.xml",
122122
"test:phpunit": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src tools/phpunit/vendor/phpunit/phpunit/phpunit",

0 commit comments

Comments
 (0)