Skip to content

Commit 255eacc

Browse files
Merge pull request #30 from silarhi/app-updates
Drop php 8.0 and 8.1 support
2 parents 88c3f2e + 7af7567 commit 255eacc

File tree

9 files changed

+25
-35
lines changed

9 files changed

+25
-35
lines changed

.laminas-ci.json

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

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">= 8.0"
18+
"php": ">=8.2"
1919
},
2020
"require-dev": {
2121
"friendsofphp/php-cs-fixer": "^3.66",
22-
"phpunit/phpunit": "^9.6.19",
23-
"phpstan/phpstan": "^1.12",
24-
"rector/rector": "^1.2"
22+
"phpstan/phpstan": "^2",
23+
"phpunit/phpunit": "^10.5.5",
24+
"rector/rector": "^2"
2525
},
2626
"autoload": {
2727
"psr-4": {

phpunit.xml.dist

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
backupGlobals="false"
44
bootstrap="vendor/autoload.php"
55
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false">
10-
<coverage>
11-
<include>
12-
<directory>./src</directory>
13-
</include>
14-
</coverage>
6+
processIsolation="false"
7+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
8+
cacheDirectory=".phpunit.cache"
9+
backupStaticProperties="false"
10+
>
1511
<testsuites>
1612
<testsuite name="Test Suite">
1713
<directory>./tests</directory>
@@ -21,4 +17,9 @@
2117
<ini name="error_reporting" value="32767"/>
2218
<ini name="date.timezone" value="Europe/Paris"/>
2319
</php>
20+
<source>
21+
<include>
22+
<directory>./src</directory>
23+
</include>
24+
</source>
2425
</phpunit>

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
// uncomment to reach your current PHP version
2424
->withPhpSets()
2525
->withSets([
26-
PHPUnitSetList::PHPUNIT_90,
26+
PHPUnitSetList::PHPUNIT_100,
2727
]);

src/Exceptions/ParseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
use Exception;
1717

18-
class ParseException extends Exception
18+
final class ParseException extends Exception
1919
{
2020
}

src/Model/PaymentSlip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace Silarhi\Caf\Model;
1515

16-
class PaymentSlip
16+
final class PaymentSlip
1717
{
1818
/** @var PaymentSlipLine[] */
1919
private array $lines = [];

src/Model/PaymentSlipLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use DateTimeInterface;
1717

18-
class PaymentSlipLine
18+
final class PaymentSlipLine
1919
{
2020
private ?string $reference = null;
2121

src/Parser/PaymentSlipParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Parser for LA44ZZ file
2828
*/
29-
class PaymentSlipParser
29+
final class PaymentSlipParser
3030
{
3131
private const TABLE_CONTENT_REGEX = '/-{121}[\S\s]*-{121}\s*?([\s|\S]*)\s*-{121}[\S\s]*-{121}/U';
3232

tests/Parser/PaymentSlipParserTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Silarhi\Caf\Exceptions\ParseException;
1818
use Silarhi\Caf\Parser\PaymentSlipParser;
1919

20-
class PaymentSlipParserTest extends TestCase
20+
final class PaymentSlipParserTest extends TestCase
2121
{
2222
public function testEmptyInput(): void
2323
{
@@ -52,7 +52,7 @@ public function testParsing(): void
5252
$content = file_get_contents(__DIR__ . '/../fixtures/LA44ZZ/caf_LA44.txt');
5353
$this->assertNotFalse($content);
5454
$result = $parser->parse($content);
55-
$this->assertNotNull($result);
55+
$this->assertNotCount(0, $result->getLines());
5656
}
5757

5858
public function testParsing2(): void
@@ -61,7 +61,7 @@ public function testParsing2(): void
6161
$content = file_get_contents(__DIR__ . '/../fixtures/LA44ZZ/caf_LA44_2.txt');
6262
$this->assertNotFalse($content);
6363
$result = $parser->parse($content);
64-
$this->assertNotNull($result);
64+
$this->assertNotCount(0, $result->getLines());
6565
}
6666

6767
public function testParsing3(): void
@@ -70,6 +70,6 @@ public function testParsing3(): void
7070
$content = file_get_contents(__DIR__ . '/../fixtures/LA44ZZ/caf_LA44_3.txt');
7171
$this->assertNotFalse($content);
7272
$result = $parser->parse($content);
73-
$this->assertNotNull($result);
73+
$this->assertNotCount(0, $result->getLines());
7474
}
7575
}

0 commit comments

Comments
 (0)