Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ jobs:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
dependencies: ['highest']
coverage: ['xdebug']
phpunit: [false]
include:
- description: 'PHP 8.4'
php: '8.4'
composer_options: '--ignore-platform-req=php+'
- description: 'PHPUnit 11'
coverage: 'xdebug3'
php: '8.3'
Expand Down Expand Up @@ -53,6 +57,7 @@ jobs:
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer_options }}
- run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
- uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. For previou
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## Unreleased
* ...
* Add PHP 8.4 support [#279](https://github.com/facile-it/paraunit/pull/279)

## [2.4.0] - 2024-09-25
### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ start:
docker compose up -d php

composer-update: start
docker compose exec php composer update
docker compose exec php composer update --ignore-platform-req=php+

pre-commit-check: rector cs-fix psalm phpstan tests

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"require-dev": {
"facile-it/facile-coding-standard": "^1.0",
"jangregor/phpstan-prophecy": "dev-master as 1.1.0",
"phpspec/prophecy": "dev-master as 1.19",
"phpspec/prophecy": "dev-master as 1.20",
"phpspec/prophecy-phpunit": "dev-master#0604e27 as 2.2.1",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "1.12.7",
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM php:8.2-alpine
ARG PHP_VERSION=8.2
FROM php:${PHP_VERSION}-alpine

RUN apk --no-cache add \
$PHPIZE_DEPS \
Expand Down
4 changes: 2 additions & 2 deletions src/Configuration/CoverageConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

class CoverageConfiguration extends ParallelConfiguration
{
public function __construct(bool $createPublicServiceAliases = false)
public function __construct(?bool $createPublicServiceAliases = false)
{
parent::__construct($createPublicServiceAliases);
parent::__construct($createPublicServiceAliases ?? false);
$this->containerDefinition = new CoverageContainerDefinition();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Coverage/Processor/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Text extends AbstractText
{
public function __construct(OutputInterface $output, bool $showColors, OutputFile $targetFile = null)
public function __construct(OutputInterface $output, bool $showColors, ?OutputFile $targetFile = null)
{
parent::__construct($output, $showColors, false, $targetFile);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Coverage/Processor/TextSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class TextSummary extends AbstractText
{
public function __construct(OutputInterface $output, bool $showColors, OutputFile $targetFile = null)
public function __construct(OutputInterface $output, bool $showColors, ?OutputFile $targetFile = null)
{
parent::__construct($output, $showColors, true, $targetFile);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function filterTestFiles(): array
return $this->filterBySuffix($aggregatedFiles, $this->testSuffix);
}

private function testSuitePassFilter(\DOMElement $testSuiteNode, string $testSuiteFilter = null): bool
private function testSuitePassFilter(\DOMElement $testSuiteNode, ?string $testSuiteFilter = null): bool
{
if ($testSuiteFilter === null) {
return true;
Expand Down Expand Up @@ -161,7 +161,7 @@ private function addFileToAggregateArray(array &$aggregatedFiles, string $fileNa
private function getDOMNodeAttribute(
\DOMElement $testSuiteNode,
string $nodeName,
string $defaultValue = null
?string $defaultValue = null
): string {
/** @psalm-suppress RedundantCondition */
foreach ($testSuiteNode->attributes as $attrName => $attrNode) {
Expand Down
2 changes: 1 addition & 1 deletion src/Logs/ValueObject/TestMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestMethod extends Test
public function __construct(
public readonly string $className,
public readonly string $methodName,
string $fullName = null,
?string $fullName = null,
) {
parent::__construct($fullName ?? $this->className . '::' . $this->methodName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private function createChunkedProcessQueue(): void
}
}

public function pushToPipeline(ProcessTerminated $event = null): void
public function pushToPipeline(?ProcessTerminated $event = null): void
{
if ($event && $this->chunkSize->isChunked()) {
$process = $event->getProcess();
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Logs/LogParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function genericStubFilenameProvider(): array
'RaisingNoticeTestStub' => [
'RaisingNoticeTestStub.php',
10,
'FFEF',
'FFFF',
],
'SegFaultTestStub' => [
'SegFaultTestStub.php',
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Runner/ChunkFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public function testChunkedAllStubsSuite(): void
'Warnings output:',
'Deprecations output:',
'3 chunks with ABNORMAL TERMINATIONS (FATAL ERRORS, SEGFAULTS):',
'8 chunks with ERRORS:',
'7 chunks with ERRORS:',
'1 chunks with FAILURES:',
'2 chunks with WARNINGS:',
'1 chunks with DEPRECATIONS:',
'2 chunks with DEPRECATIONS:',
'5 chunks with RETRIED:',
]);

Expand Down
2 changes: 1 addition & 1 deletion tests/Stub/RaisingNoticeTestStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static function errorProvider(): array
return [
['YOU SHOULD NOT SEE THIS -- E_USER_NOTICE', E_USER_NOTICE],
['YOU SHOULD NOT SEE THIS -- E_USER_WARNING', E_USER_WARNING],
['YOU SHOULD NOT SEE THIS -- E_USER_ERROR', E_USER_ERROR],
['YOU SHOULD NOT SEE THIS -- E_USER_DEPRECATED', E_USER_DEPRECATED],
];
}

Expand Down
10 changes: 4 additions & 6 deletions tests/Unit/Logs/EqualsToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@

class EqualsToken implements TokenInterface, \Stringable
{
private readonly StringUtil $util;

private string $string;

public function __construct(private readonly mixed $value, StringUtil $util = null)
{
$this->util = $util ?? new StringUtil();
}
public function __construct(
private readonly mixed $value,
private readonly StringUtil $util = new StringUtil()
) {}

/**
* Scores 11 if argument matches preset value.
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Logs/LogParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function testParseHandlesTestToBeRetried(): void
/**
* @param LogData[]|null $logs
*/
private function mockLogFetcher(array $logs = null): LogFetcher
private function mockLogFetcher(?array $logs = null): LogFetcher
{
$logs ??= $this->createLogsForOnePassedTest();
$logLocator = $this->prophesize(LogFetcher::class);
Expand All @@ -95,7 +95,7 @@ private function mockLogFetcher(array $logs = null): LogFetcher
/**
* @param class-string|null $eventToBeDispatched
*/
private function mockEventDispatcher(string $eventToBeDispatched = null): EventDispatcherInterface
private function mockEventDispatcher(?string $eventToBeDispatched = null): EventDispatcherInterface
{
$eventDispatcher = $this->prophesize(EventDispatcherInterface::class);

Expand Down