Skip to content

Commit b1a3f85

Browse files
committed
Support for PHP 8.3 and 8.4 only.
1 parent 134b477 commit b1a3f85

File tree

6 files changed

+396
-401
lines changed

6 files changed

+396
-401
lines changed

.github/workflows/unit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php-version:
19-
- "8.2"
2019
- "8.3"
2120
- "8.4"
2221

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99
],
1010
"license": "MIT",
1111
"require": {
12-
"php": ">=8.2",
12+
"php": ">=8.3",
1313
"setbased/exception": "^2.6.0"
1414
},
15-
"minimum-stability": "dev",
16-
"prefer-stable": true,
1715
"require-dev": {
1816
"phing/phing": "^3.0.1",
19-
"phpunit/phpunit": "^9.6.22"
17+
"phpunit/phpunit": "^11.5.22"
2018
},
2119
"autoload": {
2220
"psr-4": {

phpunit.xml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
<?xml version="1.0"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="test/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage processUncoveredFiles="true">
4-
<include>
5-
<directory suffix=".php">src</directory>
6-
</include>
7-
<exclude>
8-
<directory suffix=".php">vendor/setbased</directory>
9-
</exclude>
10-
<report>
11-
<clover outputFile="test/coverage.xml"/>
12-
<html outputDirectory="test/report"/>
13-
</report>
14-
</coverage>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
displayDetailsOnTestsThatTriggerDeprecations="true"
5+
displayDetailsOnTestsThatTriggerErrors="true"
6+
displayDetailsOnTestsThatTriggerNotices="true"
7+
displayDetailsOnTestsThatTriggerWarnings="true"
8+
displayDetailsOnPhpunitDeprecations="true">
159
<testsuites>
16-
<testsuite name="Tests">
10+
<testsuite name="default">
1711
<directory>test</directory>
1812
</testsuite>
1913
</testsuites>
20-
<logging/>
14+
15+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
16+
<include>
17+
<directory>src</directory>
18+
</include>
19+
</source>
2120
</phpunit>

src/RijksregisternummerHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ class RijksregisternummerHelper
1818
/**
1919
* Type of identification number is Rijksregisternummer.
2020
*/
21-
const TYPE_RIJKSREGISTERNUMMER = 1;
21+
const int TYPE_RIJKSREGISTERNUMMER = 1;
2222

2323
/**
2424
* Type of identification number is bisnummer with unknown gender.
2525
*/
26-
const TYPE_BISNUMMER_UNKNOWN_GENDER = 2;
26+
const int TYPE_BISNUMMER_UNKNOWN_GENDER = 2;
2727

2828
/**
2929
* Type of identification number is bisnummer with known gender.
3030
*/
31-
const TYPE_BISNUMMER_KNOWN_GENDER = 4;
31+
const int TYPE_BISNUMMER_KNOWN_GENDER = 4;
3232

3333
/**
3434
* Type of identification number is self-assigned identification number.
3535
*/
36-
const TYPE_SELF_ASSIGNED = 5;
36+
const int TYPE_SELF_ASSIGNED = 5;
3737

3838
//--------------------------------------------------------------------------------------------------------------------
3939
/**

test/RijksregisternummerHelperTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
namespace SetBased\Rijksregisternummer\Test;
55

6+
use PHPUnit\Framework\Attributes\DataProvider;
67
use PHPUnit\Framework\TestCase;
78
use SetBased\Rijksregisternummer\RijksregisternummerHelper;
89

@@ -17,7 +18,7 @@ class RijksregisternummerHelperTest extends TestCase
1718
*
1819
* @return array[]
1920
*/
20-
public function getCleanTestCases(): array
21+
public static function getCleanTestCases(): array
2122
{
2223
return [// Null register number.
2324
['value' => null,
@@ -42,7 +43,7 @@ public function getCleanTestCases(): array
4243
*
4344
* @return array[]
4445
*/
45-
public function getFormatTestCases(): array
46+
public static function getFormatTestCases(): array
4647
{
4748
return [// Null register number.
4849
['value' => null,
@@ -67,17 +68,16 @@ public function getFormatTestCases(): array
6768
//--------------------------------------------------------------------------------------------------------------------
6869
/**
6970
* Test method clean.
70-
*
71-
* @dataProvider getCleanTestCases
7271
*/
72+
#[DataProvider('getCleanTestCases')]
7373
public function testClean01(?string $value, string $expected): void
7474
{
7575
self::assertSame($expected, RijksregisternummerHelper::clean($value));
7676
}
7777

7878
//--------------------------------------------------------------------------------------------------------------------
7979
/**
80-
* Test clean with register number with rubbish.
80+
* Test clean with register number with garbage.
8181
*/
8282
public function testClean02(): void
8383
{
@@ -87,9 +87,8 @@ public function testClean02(): void
8787
//--------------------------------------------------------------------------------------------------------------------
8888
/**
8989
* Test format.
90-
*
91-
* @dataProvider getFormatTestCases
9290
*/
91+
#[DataProvider('getFormatTestCases')]
9392
public function testFormat(?string $value, ?string $expected): void
9493
{
9594
self::assertSame($expected, RijksregisternummerHelper::format($value));

0 commit comments

Comments
 (0)