Skip to content

Commit 584d80c

Browse files
committed
Update PHP and Symfony versions, remove old versions
1 parent 1cb39d0 commit 584d80c

35 files changed

+139
-178
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php: [--php=7.4, --php=8.0, --php=8.1]
14+
php: [--php=8.1, --php=8.2]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- uses: ./.github/actions/ci-env
@@ -55,32 +55,13 @@ jobs:
5555
- uses: actions/checkout@v2
5656
- run: bin/ci/unused-scanner
5757

58-
phpunit-php-7-4:
58+
phpunit:
5959
runs-on: ubuntu-latest
6060
strategy:
6161
matrix:
62-
symfony: [--symfony=5.0, --symfony=5.1, --symfony=5.2, --symfony=5.3, --symfony=5.4]
62+
php: [--php=8.1, --php=8.2]
63+
symfony: [--symfony=6.1, --symfony=6.2]
6364
steps:
6465
- uses: actions/checkout@v2
6566
- uses: ./.github/actions/ci-env
66-
- run: bin/ci/phpunit --php=7.4 ${{ matrix.symfony }}
67-
68-
phpunit-php-8-0:
69-
runs-on: ubuntu-latest
70-
strategy:
71-
matrix:
72-
symfony: [--symfony=5.0, --symfony=5.1, --symfony=5.2, --symfony=5.3, --symfony=5.4, --symfony=6.0]
73-
steps:
74-
- uses: actions/checkout@v2
75-
- uses: ./.github/actions/ci-env
76-
- run: bin/ci/phpunit --php=8.0 ${{ matrix.symfony }}
77-
78-
phpunit-php-8-1:
79-
runs-on: ubuntu-latest
80-
strategy:
81-
matrix:
82-
symfony: [--symfony=5.0, --symfony=5.1, --symfony=5.2, --symfony=5.3, --symfony=5.4, --symfony=6.0]
83-
steps:
84-
- uses: actions/checkout@v2
85-
- uses: ./.github/actions/ci-env
86-
- run: bin/ci/phpunit --php=8.1 ${{ matrix.symfony }}
67+
- run: bin/ci/phpunit ${{ matrix.php }} ${{ matrix.symfony }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Version](https://img.shields.io/badge/version-0.8.3-blueviolet.svg)](https://github.com/steevanb/php-parallel-processes/tree/0.8.3)
2-
[![PHP](https://img.shields.io/badge/php-^7.4||^8.0-blue.svg)](https://php.net)
2+
[![PHP](https://img.shields.io/badge/php-^8.1-blue.svg)](https://php.net)
33
![Lines](https://img.shields.io/badge/code%20lines-5,673-blue.svg)
44
![Downloads](https://poser.pugx.org/steevanb/php-parallel-processes/downloads)
55
![GitHub workflow status](https://img.shields.io/github/workflow/status/steevanb/php-parallel-processes/CI)

bin/ci/phpdd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ readonly ROOT_DIR="$(realpath "$(dirname "$(realpath "$0")")/../..")"
66

77
source "${ROOT_DIR}"/bin/ci/dockerise.inc.bash
88

9-
phpdd --ansi --exclude=vendor,var "${@}" .
9+
phpcf --exclude=vendor,var "${@}" .

bin/ci/phpstan.php

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

1616
function createPhpstanProcesses(): ProcessArray
1717
{
18-
$phpVersions = new StringArray(['7.4', '8.0', '8.1']);
18+
$phpVersions = new StringArray(['8.1', '8.2']);
1919

2020
$return = new ProcessArray();
2121
foreach ($phpVersions as $loopPhpVersion) {

bin/ci/phpunit.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,28 @@
1212

1313
require dirname(__DIR__, 2) . '/vendor/autoload.php';
1414

15-
function getAvailableSymfonyVersions(string $phpVersion): StringArray
15+
function getAvailableSymfonyVersions(): StringArray
1616
{
1717
$return = new StringArray();
18-
foreach (new StringArray(['5.0', '5.1', '5.2', '5.3', '5.4', '6.0']) as $symfonyVersion) {
19-
if (isAvailable($phpVersion, $symfonyVersion)) {
20-
$return[] = $symfonyVersion;
21-
}
18+
foreach (new StringArray(['6.1', '6.2']) as $symfonyVersion) {
19+
$return[] = $symfonyVersion;
2220
}
2321

2422
return $return;
2523
}
2624

27-
function isAvailable(string $phpVersion, string $symfonyVersion): bool
28-
{
29-
return ($phpVersion !== '7.4' || str_starts_with($symfonyVersion, '5.'));
30-
}
31-
3225
function createPhpunitProcesses(string $phpVersion = null, string $symfonyVersion = null): ProcessArray
3326
{
34-
$phpVersions = new StringArray(is_string($phpVersion) ? [$phpVersion] : ['7.4', '8.0', '8.1']);
27+
$phpVersions = new StringArray(is_string($phpVersion) ? [$phpVersion] : ['8.1', '8.2']);
3528

3629
$return = new ProcessArray();
3730
foreach ($phpVersions as $loopPhpVersion) {
3831
$symfonyVersions = is_string($symfonyVersion)
3932
? [$symfonyVersion]
40-
: getAvailableSymfonyVersions($loopPhpVersion)->toArray();
33+
: getAvailableSymfonyVersions()->toArray();
4134

4235
foreach ($symfonyVersions as $loopSymfonyVersion) {
43-
if (isAvailable($loopPhpVersion, $loopSymfonyVersion)) {
44-
$return[] = createPhpunitProcess($loopPhpVersion, $loopSymfonyVersion);
45-
}
36+
$return[] = createPhpunitProcess($loopPhpVersion, $loopSymfonyVersion);
4637
}
4738
}
4839

@@ -59,9 +50,9 @@ function createPhpunitProcess(string $phpVersion, string $symfonyVersion): Proce
5950
$symfonyVersion = null;
6051
$applicationArgv = new StringArray();
6152
foreach ($argv as $arg) {
62-
if (substr($arg, 0, 6) === '--php=') {
53+
if (str_starts_with($arg, '--php=')) {
6354
$phpVersion = substr($arg, 6);
64-
} elseif (substr($arg, 0, 10) === '--symfony=') {
55+
} elseif (str_starts_with($arg, '--symfony=')) {
6556
$symfonyVersion = substr($arg, 10);
6657
} else {
6758
$applicationArgv[] = $arg;

bin/ci/shellcheck

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ exitCode=0
1818
for fileToCheck in "${filesToCheck[@]}"; do
1919
set +e
2020
# SC1090: Can't follow non-constant source. Use a directive to specify location.
21+
# SC1091: Not following: was not specified as input (see shellcheck -x).
2122
# SC2034: COMPOSER_HOME_SYMFONY appears unused. Verify use (or export if used externally).
2223
# SC2086: Double quote to prevent globbing and word splitting. (needed for ${DOCKER_INTERACTIVE_PARAMETER})
24+
# SC2155: Declare and assign separately to avoid masking return values.
2325
# SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
2426
# SC2230: which is non-standard. Use builtin 'command -v' instead.
25-
shellcheck --color=always --exclude SC1090,SC2034,SC2086,SC2181,SC2230 "${fileToCheck}"
27+
shellcheck --color=always --exclude SC1090,SC1091,SC2034,SC2086,SC2155,SC2181,SC2230 "${fileToCheck}"
2628
if [ ${?} != 0 ]; then
2729
exitCode=1
2830
fi

bin/start

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ docker \
1717
--env HOST_UID="$(id -u)" \
1818
--env HOST_GID="$(id -g)" \
1919
--workdir "${ROOT_DIR}" \
20-
steevanb/php-parallel-processes:parallel-processes-0.3.0 \
20+
steevanb/php-parallel-processes:0.8.3-buster \
2121
php \
2222
bin/start.php \
2323
"${@}"

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
### master
22

3+
- Remove compatibility with PHP 7.4 and 8.0
4+
- Remove compatibility with Symfony 5 and 6.0
5+
- Replace return type `self` by `static` everywhere
6+
- Update CI tools
7+
38
### [0.8.3](../../compare/0.8.2...0.8.3) - 2022-03-29
49

510
- Add `jq` in `-buster` Docker images (since `0.8.3`)

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.4 || ^8.0",
13+
"php": "^8.1",
1414
"ext-pcntl": "*",
1515
"steevanb/php-typed-array": "^3.2",
16-
"symfony/console": "^5.2 || ^6.0",
17-
"symfony/process": "^5.0 || ^6.0"
16+
"symfony/console": "^6.1",
17+
"symfony/process": "^6.1"
1818
},
1919
"require-dev": {
2020
"ext-simplexml": "*",
@@ -34,7 +34,7 @@
3434
},
3535
"config": {
3636
"platform": {
37-
"php": "7.4.0"
37+
"php": "8.1.0"
3838
},
3939
"sort-packages": true
4040
},

config/ci/phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ parameters:
1313
includes:
1414
- ../../vendor/steevanb/php-typed-array/bridge/Phpstan/rules.neon
1515
- /composer/common/vendor/phpstan/phpstan-deprecation-rules/rules.neon
16+
- /composer/common/vendor/phpstan/phpstan-phpunit/extension.neon
1617
- /composer/common/vendor/phpstan/phpstan-phpunit/rules.neon
1718
- /composer/common/vendor/phpstan/phpstan-strict-rules/rules.neon
1819
- /composer/common/vendor/spaze/phpstan-disallowed-calls/extension.neon

0 commit comments

Comments
 (0)