Skip to content

Commit 31920b5

Browse files
committed
Merge branch 'release/5.0.0'
2 parents e241573 + 95df6b8 commit 31920b5

14 files changed

+40
-45
lines changed

.github/workflows/tests.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [7.4, '8.0', 8.1, 8.2]
18-
laravel: [8, 9, 10]
19-
exclude:
20-
- php: 7.4
21-
laravel: 9
22-
- php: 7.4
23-
laravel: 10
24-
- php: '8.0'
25-
laravel: 10
17+
php: [8.1, 8.2]
18+
laravel: [9, 10]
19+
phpunit: [9.5, 10]
2620

2721
steps:
2822
- name: Checkout Code
@@ -39,6 +33,9 @@ jobs:
3933
- name: Set Laravel Version
4034
run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
4135

36+
- name: Set PHPUnit Version
37+
run: composer require "phpunit/phpunit:^${{ matrix.laravel }}" --no-update
38+
4239
- name: Install dependencies
4340
uses: nick-fields/retry@v2
4441
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/
22
composer.lock
33
.phpunit.result.cache
4+
.phpunit.cache

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file. This project adheres to
44
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
55

6+
## [5.0.0] - 2023-02-18
7+
8+
### Changed
9+
10+
- Package now supports PHPUnit 9 and 10 - this adds PHPUnit 10 and drops support for PHPUnit 8.
11+
- Minimum PHP version is now 8.1 - dropping support for PHP 7.4 and 8.0.
12+
- Drop support for Laravel 8.
13+
614
## [4.1.0] - 2023-02-14
715

816
### Added

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.4|^8.0",
24+
"php": "^8.1",
2525
"ext-json": "*",
26-
"illuminate/contracts": "^8.0|^9.0|^10.0",
27-
"illuminate/support": "^8.0|^9.0|^10.0",
28-
"phpunit/phpunit": "^9.5.10"
26+
"illuminate/contracts": "^9.0|^10.0",
27+
"illuminate/support": "^9.0|^10.0",
28+
"phpunit/phpunit": "^9.5.10|^10.0"
2929
},
3030
"autoload": {
3131
"psr-4": {
@@ -39,7 +39,7 @@
3939
},
4040
"extra": {
4141
"branch-alias": {
42-
"dev-develop": "4.x-dev"
42+
"dev-develop": "5.x-dev"
4343
}
4444
},
4545
"minimum-stability": "stable",

phpunit.xml

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
beStrictAboutTestsThatDoNotTestAnything="true"
6-
bootstrap="vendor/autoload.php"
7-
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
convertDeprecationsToExceptions="true"
12-
processIsolation="false"
13-
stopOnError="false"
14-
stopOnFailure="false"
15-
verbose="true"
16-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
17-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3+
beStrictAboutTestsThatDoNotTestAnything="true" bootstrap="vendor/autoload.php" colors="true"
4+
processIsolation="false" stopOnError="false" stopOnFailure="false"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache"
6+
backupStaticProperties="false">
187
<coverage>
198
<include>
209
<directory suffix="Test.php">src/</directory>

src/Constraints/OnlyExactInList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class OnlyExactInList extends OnlySubsetsInList
3434
/**
3535
* @inheritdoc
3636
*/
37-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void
37+
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
3838
{
3939
$comparisonFailure = Compare::failure(
4040
$this->expected,

src/Constraints/OnlyIdentifiersInList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class OnlyIdentifiersInList extends OnlySubsetsInList
3434
/**
3535
* @inheritdoc
3636
*/
37-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void
37+
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
3838
{
3939
$comparisonFailure = Compare::failure(
4040
$this->expected,

src/Constraints/OnlySubsetsInList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function toString(): string
100100
/**
101101
* @inheritdoc
102102
*/
103-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void
103+
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
104104
{
105105
if (!$comparisonFailure) {
106106
$comparisonFailure = Compare::failure(

tests/Assertions/FetchedManyTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function testFetchedManyWithStrings(): void
231231
/**
232232
* @return array
233233
*/
234-
public function fetchedManyArrayProvider(): array
234+
public static function fetchedManyArrayProvider(): array
235235
{
236236
return [
237237
'identifiers (any order)' => [
@@ -515,7 +515,7 @@ public function testFetchedManyInOrderWithStrings(): void
515515
/**
516516
* @return array
517517
*/
518-
public function fetchedManyInOrderArrayProvider(): array
518+
public static function fetchedManyInOrderArrayProvider(): array
519519
{
520520
return [
521521
'identifiers' => [
@@ -777,7 +777,7 @@ public function testFetchedManyExactWithStrings(): void
777777
/**
778778
* @return array
779779
*/
780-
public function fetchedManyExactArrayProvider(): array
780+
public static function fetchedManyExactArrayProvider(): array
781781
{
782782
return [
783783
'identifiers' => [

tests/Assertions/FetchedOneTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function testFetchedOneWithIntegerAndString(): void
130130
/**
131131
* @return array
132132
*/
133-
public function fetchedOneArrayProvider(): array
133+
public static function fetchedOneArrayProvider(): array
134134
{
135135
return [
136136
'identifier' => [
@@ -326,7 +326,7 @@ public function testFetchOneExactWithStringAndInteger(): void
326326
/**
327327
* @return array
328328
*/
329-
public function fetchedOneExactArrayProvider(): array
329+
public static function fetchedOneExactArrayProvider(): array
330330
{
331331
return [
332332
'identifier' => [

tests/Assertions/FetchedToManyTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function testFetchedToManyWithStrings(): void
165165
/**
166166
* @return array[]
167167
*/
168-
public function fetchedToManyArrayProvider(): array
168+
public static function fetchedToManyArrayProvider(): array
169169
{
170170
return [
171171
'in order' => [
@@ -349,7 +349,7 @@ public function testFetchedToManyInOrderWithStrings(): void
349349
/**
350350
* @return array[]
351351
*/
352-
public function fetchedToManyInOrderArrayProvider(): array
352+
public static function fetchedToManyInOrderArrayProvider(): array
353353
{
354354
return [
355355
'in order' => [

tests/Assertions/FetchedToOneTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testFetchedToOneWithIntegerAndString(): void
110110
/**
111111
* @return array
112112
*/
113-
public function fetchedToOneArrayProvider(): array
113+
public static function fetchedToOneArrayProvider(): array
114114
{
115115
return [
116116
'identifier' => [
@@ -183,7 +183,7 @@ public function testFetchedOneWithObject(bool $expected, Closure $provider): voi
183183
/**
184184
* @return array[]
185185
*/
186-
public function resourceProvider(): array
186+
public static function resourceProvider(): array
187187
{
188188
return [
189189
'full' => [

tests/Assertions/IncludedTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected function setUp(): void
134134
/**
135135
* @return array
136136
*/
137-
public function isIncludedProvider(): array
137+
public static function isIncludedProvider(): array
138138
{
139139
return [
140140
'author' => [

tests/Assertions/MetaTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function setUp(): void
7777
/**
7878
* @return array
7979
*/
80-
public function statusCodeProvider(): array
80+
public static function statusCodeProvider(): array
8181
{
8282
return [
8383
'200' => [200],
@@ -148,7 +148,7 @@ public function testExactMetaWithoutData(int $status): void
148148
/**
149149
* @return array
150150
*/
151-
public function invalidStatusCodeProvider(): array
151+
public static function invalidStatusCodeProvider(): array
152152
{
153153
return [
154154
'100' => [100],

0 commit comments

Comments
 (0)