Skip to content

Commit a6bbbbc

Browse files
Add support for PHP 8.5
1 parent 5c3de6e commit a6bbbbc

12 files changed

Lines changed: 24 additions & 67 deletions

.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', '8.3', '8.4' ]
11+
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:

.scrutinizer.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

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) 2025 odan
3+
Copyright (c) 2026 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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the [notification pattern](https://martinfowler.com/articles/replaceThrowWithNot
2323

2424
## Requirements
2525

26-
* PHP 8.1 - 8.4
26+
* PHP 8.2 - 8.5
2727

2828
## Installation
2929

composer.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
"psr15"
1212
],
1313
"require": {
14-
"php": "8.1.* || 8.2.* || 8.3.* || 8.4.*",
14+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
1515
"ext-json": "*",
16-
"psr/http-factory": "^1.0.1",
16+
"psr/http-factory": "^1.1.0",
1717
"psr/http-server-middleware": "^1.0.1"
1818
},
1919
"require-dev": {
20-
"cakephp/validation": "^4.2",
20+
"cakephp/validation": "^5.3",
2121
"fig/http-message-util": "^1.1",
2222
"friendsofphp/php-cs-fixer": "^3",
2323
"nyholm/psr7": "^1.4",
24-
"phpstan/phpstan": "^1 || ^2",
25-
"phpunit/phpunit": "^10",
26-
"relay/relay": "^2.0",
24+
"phpstan/phpstan": "^2",
25+
"phpunit/phpunit": "^11",
26+
"relay/relay": "^3.0",
2727
"slim/psr7": "^1",
2828
"squizlabs/php_codesniffer": "^3"
2929
},
@@ -43,12 +43,10 @@
4343
},
4444
"scripts": {
4545
"cs:check": [
46-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
47-
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi"
46+
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes"
4847
],
4948
"cs:fix": [
50-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
51-
"php-cs-fixer fix --config=.cs.php --ansi --verbose"
49+
"php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes"
5250
],
5351
"sniffer:check": "phpcs --standard=phpcs.xml",
5452
"sniffer:fix": "phpcbf --standard=phpcs.xml",

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bootstrap="vendor/autoload.php"
44
colors="true"
55
backupGlobals="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
77
cacheDirectory=".phpunit.cache"
88
backupStaticProperties="false">
99
<coverage/>

tests/Encoder/JsonEncoderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Selective\Validation\Test\Encoder;
44

5+
use PHPUnit\Framework\Attributes\CoversClass;
56
use PHPUnit\Framework\TestCase;
67
use Selective\Validation\Encoder\JsonEncoder;
78
use UnexpectedValueException;
89

910
/**
1011
* Tests.
11-
*
12-
* @coversDefaultClass \Selective\Validation\Encoder\JsonEncoder
1312
*/
13+
#[CoversClass(JsonEncoder::class)]
1414
class JsonEncoderTest extends TestCase
1515
{
1616
/**

tests/Exception/ValidationExceptionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Selective\Validation\Test\Exception;
44

5+
use PHPUnit\Framework\Attributes\CoversClass;
56
use PHPUnit\Framework\TestCase;
67
use Selective\Validation\Exception\ValidationException;
78
use Selective\Validation\Test\TestService;
89

910
/**
1011
* Tests.
11-
*
12-
* @coversDefaultClass \Selective\Validation\Exception\ValidationException
1312
*/
13+
#[CoversClass(ValidationException::class)]
1414
class ValidationExceptionTest extends TestCase
1515
{
1616
/**

tests/Middleware/ValidationExceptionMiddlewareTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
use Fig\Http\Message\StatusCodeInterface;
66
use Nyholm\Psr7\Factory\Psr17Factory;
7+
use PHPUnit\Framework\Attributes\CoversClass;
78
use PHPUnit\Framework\TestCase;
89
use Selective\Validation\Encoder\JsonEncoder;
910
use Selective\Validation\Middleware\ValidationExceptionMiddleware;
1011
use Selective\Validation\Transformer\ErrorDetailsResultTransformer;
1112

1213
/**
1314
* Tests.
14-
*
15-
* @coversDefaultClass \Selective\Validation\Middleware\ValidationExceptionMiddleware
1615
*/
16+
#[CoversClass(ValidationExceptionMiddleware::class)]
1717
class ValidationExceptionMiddlewareTest extends TestCase
1818
{
1919
use MiddlewareTestTrait;

tests/Transformer/ErrorDetailsTransformerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Selective\Validation\Test\Transformer;
44

5+
use PHPUnit\Framework\Attributes\CoversClass;
56
use PHPUnit\Framework\TestCase;
67
use Selective\Validation\Transformer\ErrorDetailsResultTransformer;
78
use Selective\Validation\ValidationResult;
89

910
/**
1011
* Tests.
11-
*
12-
* @coversDefaultClass \Selective\Validation\Transformer\ErrorDetailsResultTransformer
1312
*/
13+
#[CoversClass(ErrorDetailsResultTransformer::class)]
1414
class ErrorDetailsTransformerTest extends TestCase
1515
{
1616
/**

0 commit comments

Comments
 (0)