Skip to content

Commit 4fb24ac

Browse files
PHP 8.4 update (#83)
1 parent e560bf5 commit 4fb24ac

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.cs.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'array_syntax' => ['syntax' => 'short'],
2020
'cast_spaces' => ['space' => 'none'],
2121
'concat_space' => ['spacing' => 'one'],
22-
'compact_nullable_typehint' => true,
22+
'compact_nullable_type_declaration' => true,
2323
'declare_equal_normalize' => ['space' => 'single'],
2424
'general_phpdoc_annotation_remove' => [
2525
'annotations' => [
@@ -36,7 +36,11 @@
3636
'phpdoc_order' => true, // psr-5
3737
'phpdoc_no_useless_inheritdoc' => false,
3838
'protected_to_private' => false,
39-
'yoda_style' => false,
39+
'yoda_style' => [
40+
'equal' => false,
41+
'identical' => false,
42+
'less_and_greater' => false
43+
],
4044
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
4145
'ordered_imports' => [
4246
'sort_algorithm' => 'alpha',

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: [ ubuntu-latest ]
11-
php-versions: [ '8.1', '8.2' ]
11+
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023 odan
3+
Copyright (c) 2025 odan
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
],
1111
"homepage": "https://github.com/selective-php/image-type",
1212
"require": {
13-
"php": "^8.1"
13+
"php": "8.1.* || 8.2.* || 8.3.* || 8.4.*"
1414
},
1515
"require-dev": {
1616
"friendsofphp/php-cs-fixer": "^3",
17-
"phpstan/phpstan": "^1",
17+
"phpstan/phpstan": "^2",
1818
"phpunit/phpunit": "^10",
19-
"squizlabs/php_codesniffer": "^3"
19+
"squizlabs/php_codesniffer": "^4"
2020
},
2121
"autoload": {
2222
"psr-4": {
@@ -34,12 +34,10 @@
3434
},
3535
"scripts": {
3636
"cs:check": [
37-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
38-
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi"
37+
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes"
3938
],
4039
"cs:fix": [
41-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
42-
"php-cs-fixer fix --config=.cs.php --ansi --verbose"
40+
"php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes"
4341
],
4442
"sniffer:check": "phpcs --standard=phpcs.xml",
4543
"sniffer:fix": "phpcbf --standard=phpcs.xml",
@@ -51,6 +49,9 @@
5149
"@stan",
5250
"@test"
5351
],
54-
"test:coverage": "php -d xdebug.mode=coverage -r \"require 'vendor/bin/phpunit';\" -- --configuration phpunit.xml --do-not-cache-result --colors=always --coverage-clover build/logs/clover.xml --coverage-html build/coverage"
52+
"test:coverage": [
53+
"@putenv XDEBUG_MODE=coverage",
54+
"phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations --coverage-clover build/coverage/clover.xml --coverage-html build/coverage --coverage-text"
55+
]
5556
}
5657
}

0 commit comments

Comments
 (0)