diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 891bd17..b4f0a59 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,8 +11,11 @@ jobs:
php-version: [ '8.2' ]
coverage-driver: [ xdebug ]
include:
+ - { operating-system: 'ubuntu-20.04', php-version: '8.1', coverage-driver: 'xdebug'}
- { operating-system: 'ubuntu-20.04', php-version: '8.2', coverage-driver: 'xdebug'}
+ - { operating-system: 'windows-2022', php-version: '8.1', coverage-driver: 'xdebug'}
- { operating-system: 'windows-2022', php-version: '8.2', coverage-driver: 'xdebug'}
+ - { operating-system: 'macos-12', php-version: '8.1', coverage-driver: 'xdebug'}
- { operating-system: 'macos-12', php-version: '8.2', coverage-driver: 'xdebug'}
name: CI on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }}, using ${{ matrix.coverage-driver }}
diff --git a/composer.json b/composer.json
index 777abf5..f416de2 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
}
],
"require": {
- "php": ">=8.2",
+ "php": ">=8.1",
"symfony/console": "^6.2",
"symfony/css-selector": "^6.2",
"symfony/dom-crawler": "^6.2",
diff --git a/phpunit.xml b/phpunit.xml
index 5e26df1..5bf2018 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,9 +1,16 @@
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
+ backupGlobals="false"
+ colors="true"
+ executionOrder="random"
+ resolveDependencies="true"
+ failOnRisky="true"
+ failOnWarning="true"
+ beStrictAboutOutputDuringTests="true"
+ bootstrap="vendor/autoload.php"
+ cacheDirectory=".phpunit.cache">
tests/Functional
@@ -13,19 +20,21 @@
-
- src
-
-
- src/Command
-
+
diff --git a/src/DTO/Baseline.php b/src/DTO/Baseline.php
index 8a2618a..8894866 100644
--- a/src/DTO/Baseline.php
+++ b/src/DTO/Baseline.php
@@ -4,10 +4,10 @@
namespace Leovie\PhpunitCrapCheck\DTO;
-readonly class Baseline
+class Baseline
{
public function __construct(
- public CrapCheckResult $crapCheckResult
+ public readonly CrapCheckResult $crapCheckResult
)
{
}
diff --git a/src/DTO/BaselineDiffersResult.php b/src/DTO/BaselineDiffersResult.php
index c78ade3..8cf0f6d 100644
--- a/src/DTO/BaselineDiffersResult.php
+++ b/src/DTO/BaselineDiffersResult.php
@@ -4,7 +4,7 @@
namespace Leovie\PhpunitCrapCheck\DTO;
-readonly class BaselineDiffersResult implements BaselineCompareResult
+class BaselineDiffersResult implements BaselineCompareResult
{
/**
* @param array $methodsNotOccurringAnymore
@@ -13,10 +13,10 @@
* @param array $methodsGotLessCrappy
*/
public function __construct(
- public array $methodsNotOccurringAnymore,
- public array $methodsNewlyOccurring,
- public array $methodsGotCrappier,
- public array $methodsGotLessCrappy
+ public readonly array $methodsNotOccurringAnymore,
+ public readonly array $methodsNewlyOccurring,
+ public readonly array $methodsGotCrappier,
+ public readonly array $methodsGotLessCrappy
)
{
}
diff --git a/src/DTO/BaselineEqualsResult.php b/src/DTO/BaselineEqualsResult.php
index 67c2377..039e630 100644
--- a/src/DTO/BaselineEqualsResult.php
+++ b/src/DTO/BaselineEqualsResult.php
@@ -4,6 +4,6 @@
namespace Leovie\PhpunitCrapCheck\DTO;
-readonly class BaselineEqualsResult implements BaselineCompareResult
+class BaselineEqualsResult implements BaselineCompareResult
{
}
\ No newline at end of file
diff --git a/src/DTO/Method.php b/src/DTO/Method.php
index 067bce6..3417d17 100644
--- a/src/DTO/Method.php
+++ b/src/DTO/Method.php
@@ -4,12 +4,12 @@
namespace Leovie\PhpunitCrapCheck\DTO;
-readonly class Method
+class Method
{
public function __construct(
- public string $classFQN,
- public string $name,
- public int $crap,
+ public readonly string $classFQN,
+ public readonly string $name,
+ public readonly int $crap,
)
{
}
diff --git a/src/DTO/NonEmptyCrapCheckResult.php b/src/DTO/NonEmptyCrapCheckResult.php
index 0b401ff..4e5a955 100644
--- a/src/DTO/NonEmptyCrapCheckResult.php
+++ b/src/DTO/NonEmptyCrapCheckResult.php
@@ -4,11 +4,11 @@
namespace Leovie\PhpunitCrapCheck\DTO;
-readonly class NonEmptyCrapCheckResult implements CrapCheckResult
+class NonEmptyCrapCheckResult implements CrapCheckResult
{
/** @param array $tooCrappyMethods */
public function __construct(
- public array $tooCrappyMethods
+ public readonly array $tooCrappyMethods
)
{
}
diff --git a/src/Generator/BaselineOutputGenerator.php b/src/Generator/BaselineOutputGenerator.php
index 90e57c7..0eead90 100644
--- a/src/Generator/BaselineOutputGenerator.php
+++ b/src/Generator/BaselineOutputGenerator.php
@@ -8,7 +8,7 @@
use Leovie\PhpunitCrapCheck\DTO\EmptyCrapCheckResult;
use Leovie\PhpunitCrapCheck\DTO\NonEmptyCrapCheckResult;
-readonly class BaselineOutputGenerator implements BaselineOutputGeneratorInterface
+class BaselineOutputGenerator implements BaselineOutputGeneratorInterface
{
public function generate(Baseline $baseline): string
{
diff --git a/src/Parser/BaselineParser.php b/src/Parser/BaselineParser.php
index 02bed63..c225c4b 100644
--- a/src/Parser/BaselineParser.php
+++ b/src/Parser/BaselineParser.php
@@ -15,7 +15,7 @@
* }
* >
*/
-readonly class BaselineParser implements BaselineParserInterface
+class BaselineParser implements BaselineParserInterface
{
public function parse(string $baselineContent): Baseline
{
diff --git a/src/Parser/CloverParser.php b/src/Parser/CloverParser.php
index 3d0de93..0868207 100644
--- a/src/Parser/CloverParser.php
+++ b/src/Parser/CloverParser.php
@@ -7,7 +7,7 @@
use Leovie\PhpunitCrapCheck\DTO\Method;
use Symfony\Component\DomCrawler\Crawler;
-readonly class CloverParser implements CloverParserInterface
+class CloverParser implements CloverParserInterface
{
/** @return array */
public function parseMethods(string $cloverReportContent): array
diff --git a/src/Service/BaselineCompareService.php b/src/Service/BaselineCompareService.php
index 9408d26..5c2a8b9 100644
--- a/src/Service/BaselineCompareService.php
+++ b/src/Service/BaselineCompareService.php
@@ -13,7 +13,7 @@
use Leovie\PhpunitCrapCheck\DTO\Method;
use Leovie\PhpunitCrapCheck\DTO\NonEmptyCrapCheckResult;
-readonly class BaselineCompareService
+class BaselineCompareService
{
private const COMPARE_RESULT_EQUAL = 0;
private const COMPARE_RESULT_SMALLER = -1;
diff --git a/src/Service/BaselineOutputService.php b/src/Service/BaselineOutputService.php
index 5dc47c1..39d29f9 100644
--- a/src/Service/BaselineOutputService.php
+++ b/src/Service/BaselineOutputService.php
@@ -7,10 +7,10 @@
use Leovie\PhpunitCrapCheck\DTO\Baseline;
use Leovie\PhpunitCrapCheck\Generator\BaselineOutputGeneratorInterface;
-readonly class BaselineOutputService
+class BaselineOutputService
{
public function __construct(
- private BaselineOutputGeneratorInterface $baselineOutputGenerator
+ private readonly BaselineOutputGeneratorInterface $baselineOutputGenerator
)
{
}
diff --git a/src/Service/CrapCheckService.php b/src/Service/CrapCheckService.php
index c9a3e9f..24a61dc 100644
--- a/src/Service/CrapCheckService.php
+++ b/src/Service/CrapCheckService.php
@@ -10,10 +10,10 @@
use Leovie\PhpunitCrapCheck\DTO\Method;
use Leovie\PhpunitCrapCheck\Parser\CloverParserInterface;
-readonly class CrapCheckService
+class CrapCheckService
{
public function __construct(
- private CloverParserInterface $cloverParser
+ private readonly CloverParserInterface $cloverParser
)
{
}