Skip to content

Commit b1ea44f

Browse files
authored
Merge pull request #8 from facile-it/symfony-6
Symfony 6 support, drop older versions
2 parents 56c6532 + fdd264d commit b1ea44f

File tree

7 files changed

+40
-36
lines changed

7 files changed

+40
-36
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,30 @@ on:
88

99
jobs:
1010
Tests:
11-
name: PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}
11+
name: PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}${{ matrix.dependencies }}
1212
runs-on: ubuntu-latest
1313
continue-on-error: ${{ matrix.experimental == true }}
1414
env:
1515
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=0'
1616
strategy:
1717
matrix:
1818
php:
19+
- '8.2'
20+
- '8.1'
1921
- '8.0'
2022
- '7.4'
21-
- '7.3'
2223
symfony: ['']
2324
experimental: [false]
2425
include:
25-
- symfony: '^4.4'
26+
- symfony: '^5.4'
2627
os: 'ubuntu-latest'
2728
php: '7.4'
28-
- symfony: '^3.4'
29+
- symfony: '^4.4'
2930
os: 'ubuntu-latest'
3031
php: '7.4'
3132
- description: 'Prefer lowest'
3233
os: 'ubuntu-latest'
33-
php: '7.3'
34+
php: '7.4'
3435
dependencies: '--prefer-lowest'
3536
env:
3637
SYMFONY_DEPRECATIONS_HELPER: 'disabled'

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
new Facile\CodingStandards\Rules\ArrayRulesProvider($additionalRules),
1414
]);
1515

16-
$config = PhpCsFixer\Config::create();
16+
$config = new PhpCsFixer\Config();
1717
$config->setRules($rulesProvider->getRules());
1818
$config->setRiskyAllowed(true);
1919

20-
$finder = PhpCsFixer\Finder::create();
20+
$finder = new PhpCsFixer\Finder();
2121

2222
$autoloadPathProvider = new Facile\CodingStandards\AutoloadPathProvider();
2323
$finder->in($autoloadPathProvider->getPaths());

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## Unreleased
88
* ...
9+
* Drop support to PHP 7.3
10+
* Drop support to EOL Symfony versions (3.x, 4.0 to 4.3, 5.0 to 5.3)
911

1012
## 1.1.1 [2023-04-03]
1113
* Drop `phpspec/prophecy-phpunit` as a dependency, move it to `require-dev`

composer.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"type": "library",
55
"license": "MIT",
66
"config": {
7-
"sort-packages": true
7+
"sort-packages": true,
8+
"allow-plugins": {
9+
"facile-it/facile-coding-standard": true,
10+
"phpstan/extension-installer": true
11+
}
812
},
913
"bin": [
1014
"bin/terminable-loop-command.sh"
@@ -26,17 +30,17 @@
2630
}
2731
},
2832
"require": {
29-
"php": "^7.3 | ^8.0",
33+
"php": "^7.4 | ^8.0",
3034
"ext-pcntl": "*",
31-
"symfony/console": "^3.4 | ^4.0 | ^5.0"
35+
"symfony/console": "^4.4 | ^5.4 | ^6.0"
3236
},
3337
"require-dev": {
34-
"facile-it/facile-coding-standard": "^0.4.0",
35-
"jangregor/phpstan-prophecy": "^0.8.1",
36-
"phpstan/extension-installer": "^1.0",
37-
"phpstan/phpstan": "^0.12.55",
38-
"phpstan/phpstan-phpunit": "^0.12.16",
39-
"phpunit/phpunit": "^8.5.14 | ^9.5.2",
38+
"facile-it/facile-coding-standard": "^0.5.2",
39+
"jangregor/phpstan-prophecy": "^1.0.0",
40+
"phpstan/extension-installer": "^1.1",
41+
"phpstan/phpstan": "^1.10",
42+
"phpstan/phpstan-phpunit": "^1.3",
43+
"phpunit/phpunit": "^9.6.6",
4044
"phpspec/prophecy-phpunit": "^2.0",
4145
"symfony/phpunit-bridge": "^5.2",
4246
"vimeo/psalm": "^4.6"

phpunit.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
executionOrder="depends,defects"
66
cacheResult="false"
77
colors="true"
88
beStrictAboutOutputDuringTests="true"
99
beStrictAboutTodoAnnotatedTests="true"
1010
verbose="true">
11-
<testsuites>
12-
<testsuite name="default">
13-
<directory suffix="Test.php">tests</directory>
14-
</testsuite>
15-
</testsuites>
11+
<testsuites>
12+
<testsuite name="default">
13+
<directory suffix="Test.php">tests</directory>
14+
</testsuite>
15+
</testsuites>
1616

17-
<filter>
18-
<whitelist processUncoveredFilesFromWhitelist="true">
19-
<directory suffix=".php">src</directory>
20-
</whitelist>
21-
</filter>
17+
<coverage processUncoveredFiles="true">
18+
<include>
19+
<directory suffix=".php">src</directory>
20+
</include>
21+
</coverage>
2222
</phpunit>

tests/E2E/TerminateCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function testSigTermDuringSleep(): void
106106
$this->assertCommandIsFound($process);
107107
$this->assertStringContainsString('Starting ' . self::STUB_COMMAND, $process->getOutput());
108108
$this->assertStringNotContainsString('Signal received, skipping execution', $process->getOutput());
109-
$this->assertRegExp('/Slept (0|1) second\(s\)/', $process->getOutput());
109+
$this->assertMatchesRegularExpression('/Slept (0|1) second\(s\)/', $process->getOutput());
110110
$this->assertSame(143, $process->getExitCode());
111111
}
112112

tests/Unit/AbstractTerminableCommandTest.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Prophecy\Argument;
1010
use Prophecy\PhpUnit\ProphecyTrait;
1111
use Symfony\Bridge\PhpUnit\ClockMock;
12+
use Symfony\Component\Console\Input\ArrayInput;
1213
use Symfony\Component\Console\Input\InputInterface;
1314
use Symfony\Component\Console\Output\OutputInterface;
1415

@@ -39,7 +40,6 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
3940
}
4041
};
4142

42-
$input = $this->prophesize(InputInterface::class);
4343
$output = $this->prophesize(OutputInterface::class);
4444
$output->writeln(Argument::containingString('Starting'), OutputInterface::VERBOSITY_VERBOSE)
4545
->shouldBeCalledTimes(1);
@@ -50,7 +50,7 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
5050

5151
ClockMock::withClockMock(true);
5252
$start = ClockMock::time();
53-
$exitCode = $stubCommand->run($input->reveal(), $output->reveal());
53+
$exitCode = $stubCommand->run(new ArrayInput([]), $output->reveal());
5454
$end = ClockMock::time();
5555

5656
$this->assertSame(0, $exitCode);
@@ -69,14 +69,13 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
6969
}
7070
};
7171

72-
$input = $this->prophesize(InputInterface::class);
7372
$output = $this->prophesize(OutputInterface::class);
7473
$output->writeln(Argument::containingString('Starting'), OutputInterface::VERBOSITY_VERBOSE)
7574
->shouldBeCalledTimes(1);
7675

7776
$this->expectException(\InvalidArgumentException::class);
7877

79-
$stubCommand->run($input->reveal(), $output->reveal());
78+
$stubCommand->run(new ArrayInput([]), $output->reveal());
8079
}
8180

8281
/**
@@ -102,14 +101,13 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
102101
}
103102
};
104103

105-
$input = $this->prophesize(InputInterface::class);
106104
$output = $this->prophesize(OutputInterface::class);
107105
$output->writeln(Argument::containingString('Starting'), OutputInterface::VERBOSITY_VERBOSE)
108106
->shouldBeCalledTimes(1);
109107
$output->writeln('Signal received, terminating with exit code 143', OutputInterface::VERBOSITY_NORMAL)
110108
->shouldBeCalledTimes(1);
111109

112-
$exitCode = $stubCommand->run($input->reveal(), $output->reveal());
110+
$exitCode = $stubCommand->run(new ArrayInput([]), $output->reveal());
113111

114112
$this->assertSame(143, $exitCode);
115113
}
@@ -126,7 +124,6 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
126124
}
127125
};
128126

129-
$input = $this->prophesize(InputInterface::class);
130127
$output = $this->prophesize(OutputInterface::class);
131128
$output->writeln(Argument::containingString('Starting'), OutputInterface::VERBOSITY_VERBOSE)
132129
->shouldBeCalledTimes(1)
@@ -136,7 +133,7 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
136133
$output->writeln('Signal received, skipping execution', OutputInterface::VERBOSITY_NORMAL)
137134
->shouldBeCalledTimes(1);
138135

139-
$exitCode = $stubCommand->run($input->reveal(), $output->reveal());
136+
$exitCode = $stubCommand->run(new ArrayInput([]), $output->reveal());
140137

141138
$this->assertSame(143, $exitCode);
142139
}

0 commit comments

Comments
 (0)