From 3eb63462a49c71d2a2e7742ad69fc67e8ce6ef32 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:37:06 +0200 Subject: [PATCH 1/8] updating year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index bf7a9a3..bfcf021 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 odan +Copyright (c) 2025 odan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 7e05b78fd7f6ec496247485f26077580fa60ed96 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:41:24 +0200 Subject: [PATCH 2/8] Add support for PHP 8.4 and update test:coverage --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c3c4185..9606199 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "homepage": "https://github.com/selective-php/image-type", "require": { - "php": "^8.1" + "php": "8.1.* || 8.1.* || 8.2.* || 8.4.*" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", @@ -51,6 +51,9 @@ "@stan", "@test" ], - "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" + "test:coverage": [ + "@putenv XDEBUG_MODE=coverage", + "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" + ] } } From 9a57c531978eed5a17698ec14ba5de1f9aeeca2f Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:44:16 +0200 Subject: [PATCH 3/8] fixed PHP_CS_FIXER_IGNORE_ENV deprecation --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 9606199..974a51e 100644 --- a/composer.json +++ b/composer.json @@ -34,12 +34,10 @@ }, "scripts": { "cs:check": [ - "@putenv PHP_CS_FIXER_IGNORE_ENV=1", - "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi" + "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes" ], "cs:fix": [ - "@putenv PHP_CS_FIXER_IGNORE_ENV=1", - "php-cs-fixer fix --config=.cs.php --ansi --verbose" + "php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes" ], "sniffer:check": "phpcs --standard=phpcs.xml", "sniffer:fix": "phpcbf --standard=phpcs.xml", From 00d28561ba3ac9dd10bb8cee5d6cbed34cadf6b7 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:45:55 +0200 Subject: [PATCH 4/8] upgrading from phpstan 1x to 2x --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 974a51e..b0621d9 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^10", "squizlabs/php_codesniffer": "^3" }, From 436ff937565f455ef264648781ebbbbbe2e79d53 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:51:34 +0200 Subject: [PATCH 5/8] upgrading squizlabs/php_codesniffer from ^3 to ^4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b0621d9..4414b60 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "friendsofphp/php-cs-fixer": "^3", "phpstan/phpstan": "^2", "phpunit/phpunit": "^10", - "squizlabs/php_codesniffer": "^3" + "squizlabs/php_codesniffer": "^4" }, "autoload": { "psr-4": { From 3a84dd8247de6e5d3972937812845d9ba831aafc Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Fri, 17 Oct 2025 12:51:50 +0200 Subject: [PATCH 6/8] fixed compact_nullable_typehint deprecation --- .cs.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.cs.php b/.cs.php index 2bba5e9..52c4c3e 100644 --- a/.cs.php +++ b/.cs.php @@ -19,7 +19,7 @@ 'array_syntax' => ['syntax' => 'short'], 'cast_spaces' => ['space' => 'none'], 'concat_space' => ['spacing' => 'one'], - 'compact_nullable_typehint' => true, + 'compact_nullable_type_declaration' => true, 'declare_equal_normalize' => ['space' => 'single'], 'general_phpdoc_annotation_remove' => [ 'annotations' => [ @@ -36,7 +36,11 @@ 'phpdoc_order' => true, // psr-5 'phpdoc_no_useless_inheritdoc' => false, 'protected_to_private' => false, - 'yoda_style' => false, + 'yoda_style' => [ + 'equal' => false, + 'identical' => false, + 'less_and_greater' => false + ], 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 'ordered_imports' => [ 'sort_algorithm' => 'alpha', From 10934cbd3804348b68217f15d832934991629b68 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Mon, 20 Oct 2025 17:08:04 +0200 Subject: [PATCH 7/8] added php versions 8.3 and 8.4 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4bf3d5..ae39631 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '8.1', '8.2' ] + php-versions: [ '8.1', '8.2', '8.3', '8.4' ] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: From d8d4dbae012e83880176175634dc57911cbb5065 Mon Sep 17 00:00:00 2001 From: heinrichschiller Date: Tue, 21 Oct 2025 11:05:15 +0200 Subject: [PATCH 8/8] fix, Don't we support PHP8.3 version? --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4414b60..45e5230 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "homepage": "https://github.com/selective-php/image-type", "require": { - "php": "8.1.* || 8.1.* || 8.2.* || 8.4.*" + "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3",