Skip to content

Commit 3cd2806

Browse files
authored
Bump console version (#7)
* Bump console version * Fix coding standards
1 parent 2519fd8 commit 3cd2806

9 files changed

+22
-14
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
prefer_lowest: ["", "--prefer-lowest"]
1919
container:
20-
image: skpr/php-cli:8.2-dev-v2-edge
20+
image: skpr/php-cli:8.3-dev-v2-latest
2121
options:
2222
--pull always
2323
--user 1001:1001

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"require": {
1414
"php": "^8.1",
1515
"ext-simplexml": "*",
16-
"symfony/console": "^6.3"
16+
"symfony/console": "^6.3|^7.0"
1717
},
1818
"require-dev": {
1919
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
2020
"phpstan/phpstan": "^1.10",
2121
"phpunit/phpunit": "^9.6",
22-
"previousnext/coding-standard": "^0.1.3",
22+
"previousnext/coding-standard": "^1.1.1",
2323
"staabm/annotate-pull-request-from-checkstyle": "^1.8"
2424
},
2525
"bin" : ["phpunit-splitter"],

Diff for: phpcs.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<file>./src</file>
44
<file>./tests/src</file>
55
<rule ref="PreviousNextDrupal" />
6-
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions" />
6+
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment" >
7+
<severity>0</severity>
8+
</rule>
79
<arg name="report" value="full"/>
810
</ruleset>

Diff for: src/GlobbingTestResultCache.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter;
66

@@ -34,7 +34,9 @@ final class GlobbingTestResultCache {
3434
/**
3535
* Constructs a new GlobbingTestResultCache.
3636
*/
37-
public function __construct(string $filepaths = ".phpunit.cache/test-results*") {
37+
public function __construct(
38+
string $filepaths = ".phpunit.cache/test-results*",
39+
) {
3840
$filenames = \glob($filepaths);
3941
if ($filenames === FALSE) {
4042
$filenames = [];

Diff for: src/SplitterCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter;
66

@@ -71,7 +71,7 @@ protected function configure(): void {
7171
* {@inheritdoc}
7272
*/
7373
protected function execute(InputInterface $input, OutputInterface $output): int {
74-
\set_error_handler(fn($severity, $message, $file, $line) => throw new \ErrorException($message, 0, $severity, $file, $line));
74+
\set_error_handler(static fn($severity, $message, $file, $line) => throw new \ErrorException($message, 0, $severity, $file, $line));
7575
$bootstrap = $input->getOption('bootstrap-file');
7676
if (\file_exists($bootstrap)) {
7777
include_once $bootstrap;

Diff for: src/TestMapper.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter;
66

@@ -18,7 +18,11 @@ final class TestMapper {
1818
/**
1919
* Constructs a new TestMapper.
2020
*/
21-
public function __construct(string $testListFilePath, string $testResultFiles, string $prefix) {
21+
public function __construct(
22+
string $testListFilePath,
23+
string $testResultFiles,
24+
string $prefix,
25+
) {
2226
$this->testsXml = \simplexml_load_file($testListFilePath);
2327
$this->resultCache = new GlobbingTestResultCache($testResultFiles);
2428
$this->prefix = $prefix;
@@ -82,7 +86,7 @@ public function getMap(): array {
8286
* The sorted map.
8387
*/
8488
public function sortMap(array $map): array {
85-
\uasort($map, function ($a, $b) {
89+
\uasort($map, static function ($a, $b) {
8690
return $a['time'] <=> $b['time'];
8791
});
8892
return $map;

Diff for: src/TestStatus.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter;
66

Diff for: tests/src/GlobbingTestResultCacheTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter\Tests;
66

Diff for: tests/src/PhpUnitSplitterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace PhpUnitSplitter\Tests;
66

0 commit comments

Comments
 (0)