diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae39631..4c3d3a5 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', '8.3', '8.4' ] + php-versions: [ '8.2', '8.3', '8.4', '8.5' ] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 3514e2e..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,41 +0,0 @@ -filter: - paths: [ "src/*" ] - excluded_paths: [ "vendor/*", "tests/*" ] - -checks: - php: - code_rating: true - duplication: true - -tools: - external_code_coverage: false - -build: - environment: - php: - version: 8.1.2 - ini: - xdebug.mode: coverage - mysql: false - node: false - postgresql: false - mongodb: false - elasticsearch: false - redis: false - memcached: false - neo4j: false - rabbitmq: false - nodes: - analysis: - tests: - override: - - php-scrutinizer-run - dependencies: - before: - - composer self-update - tests: - before: - - command: composer test:coverage - coverage: - file: 'build/logs/clover.xml' - format: 'clover' diff --git a/LICENSE b/LICENSE index bfcf021..2013f40 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2025 odan +Copyright (c) 2026 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 diff --git a/README.md b/README.md index 28a86fc..3e05c15 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ Image type detection library for PHP. [![Latest Version on Packagist](https://img.shields.io/github/release/selective-php/image-type.svg?style=flat-square)](https://packagist.org/packages/selective/image-type) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) [![Build Status](https://github.com/selective-php/image-type/workflows/build/badge.svg)](https://github.com/selective-php/image-type/actions) -[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/selective-php/image-type.svg?style=flat-square)](https://scrutinizer-ci.com/g/selective-php/image-type/code-structure) -[![Quality Score](https://img.shields.io/scrutinizer/quality/g/selective-php/image-type.svg?style=flat-square)](https://scrutinizer-ci.com/g/selective-php/image-type/?branch=master) [![Total Downloads](https://img.shields.io/packagist/dt/selective/image-type.svg?style=flat-square)](https://packagist.org/packages/selective/image-type/stats) @@ -77,7 +75,7 @@ Image type detection library for PHP. ## Requirements -* PHP 8.1+ +* PHP 8.2 - 8.5 ## Installation diff --git a/composer.json b/composer.json index 45e5230..4df19f9 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,12 @@ ], "homepage": "https://github.com/selective-php/image-type", "require": { - "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*" + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", "phpstan/phpstan": "^2", - "phpunit/phpunit": "^10", + "phpunit/phpunit": "^11", "squizlabs/php_codesniffer": "^4" }, "autoload": { @@ -42,7 +42,7 @@ "sniffer:check": "phpcs --standard=phpcs.xml", "sniffer:fix": "phpcbf --standard=phpcs.xml", "stan": "phpstan analyse -c phpstan.neon --no-progress --ansi", - "test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always", + "test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations", "test:all": [ "@cs:check", "@sniffer:check", diff --git a/phpunit.xml b/phpunit.xml index 2927473..7b7ad74 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -3,7 +3,7 @@ bootstrap="vendor/autoload.php" colors="true" backupGlobals="false" - xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> diff --git a/tests/ImageTypeDetectorTest.php b/tests/ImageTypeDetectorTest.php index fd1dad1..5f036ce 100644 --- a/tests/ImageTypeDetectorTest.php +++ b/tests/ImageTypeDetectorTest.php @@ -2,6 +2,7 @@ namespace Selective\ImageType\Test; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Selective\ImageType\ImageFormat; use Selective\ImageType\ImageType; @@ -42,14 +43,13 @@ private function createDetector(): ImageTypeDetector /** * Test. * - * @dataProvider providerGetImageTypeFromFile - * * @param string $file The file * @param string $format The expected format * @param string $mime The expected mime type * * @return void */ + #[DataProvider('providerGetImageTypeFromFile')] public function testGetImageTypeFromFile(string $file, string $format, string $mime): void { $this->assertFileExists($file);