Skip to content

Commit 7473d5f

Browse files
Merge pull request #180 from cleverage/feat/179
Implements #179 - PHP 8.5 / Symfony 8
2 parents 7050c2c + ffe745a commit 7473d5f

24 files changed

+137
-325
lines changed

.docker/php/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.4-fpm-alpine
1+
FROM php:8.5-fpm-alpine
22

33
ARG UID
44
ARG GID
@@ -13,8 +13,7 @@ RUN apk update && apk add \
1313
bash \
1414
icu-dev \
1515
&& docker-php-ext-configure intl \
16-
&& docker-php-ext-install intl opcache \
17-
&& docker-php-ext-enable opcache
16+
&& docker-php-ext-install intl
1817

1918
RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime \
2019
&& sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Paris/" $PHP_INI_DIR/php.ini

.github/workflows/quality.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919
- name: Install PHP with extensions
2020
uses: shivammathur/setup-php@v2
2121
with:
22-
php-version: '8.4'
22+
php-version: '8.5'
2323
coverage: none
2424
tools: composer:v2
2525
- name: Install Composer dependencies (locked)
@@ -32,11 +32,11 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
3636
- name: Install PHP with extensions
3737
uses: shivammathur/setup-php@v2
3838
with:
39-
php-version: '8.4'
39+
php-version: '8.5'
4040
coverage: none
4141
tools: composer:v2
4242
- name: Install Composer dependencies (locked)
@@ -49,11 +49,11 @@ jobs:
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
5353
- name: Install PHP with extensions
5454
uses: shivammathur/setup-php@v2
5555
with:
56-
php-version: '8.4'
56+
php-version: '8.5'
5757
coverage: none
5858
tools: composer:v2
5959
- name: Install Composer dependencies (locked)

.github/workflows/test.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,12 @@ jobs:
2323
- '8.2'
2424
- '8.3'
2525
- '8.4'
26+
- '8.5'
2627
dependencies: [highest]
2728
allowed-to-fail: [false]
2829
symfony-require: ['']
2930
variant: [normal]
3031
include:
31-
- php-version: '8.1'
32-
dependencies: highest
33-
allowed-to-fail: false
34-
symfony-require: 6.4.*
35-
variant: symfony/symfony:"6.4.*"
3632
- php-version: '8.2'
3733
dependencies: highest
3834
allowed-to-fail: false
@@ -41,8 +37,8 @@ jobs:
4137
- php-version: '8.2'
4238
dependencies: highest
4339
allowed-to-fail: false
44-
symfony-require: 7.3.*
45-
variant: symfony/symfony:"7.3.*"
40+
symfony-require: 7.4.*
41+
variant: symfony/symfony:"7.4.*"
4642
- php-version: '8.3'
4743
dependencies: highest
4844
allowed-to-fail: false
@@ -51,8 +47,8 @@ jobs:
5147
- php-version: '8.3'
5248
dependencies: highest
5349
allowed-to-fail: false
54-
symfony-require: 7.3.*
55-
variant: symfony/symfony:"7.3.*"
50+
symfony-require: 7.4.*
51+
variant: symfony/symfony:"7.4.*"
5652
- php-version: '8.4'
5753
dependencies: highest
5854
allowed-to-fail: false
@@ -61,12 +57,31 @@ jobs:
6157
- php-version: '8.4'
6258
dependencies: highest
6359
allowed-to-fail: false
64-
symfony-require: 7.3.*
65-
variant: symfony/symfony:"7.3.*"
66-
60+
symfony-require: 7.4.*
61+
variant: symfony/symfony:"7.4.*"
62+
- php-version: '8.4'
63+
dependencies: highest
64+
allowed-to-fail: false
65+
symfony-require: 8.*
66+
variant: symfony/symfony:"8.*"
67+
- php-version: '8.5'
68+
dependencies: highest
69+
allowed-to-fail: false
70+
symfony-require: 6.4.*
71+
variant: symfony/symfony:"6.4.*"
72+
- php-version: '8.5'
73+
dependencies: highest
74+
allowed-to-fail: false
75+
symfony-require: 7.4.*
76+
variant: symfony/symfony:"7.4.*"
77+
- php-version: '8.5'
78+
dependencies: highest
79+
allowed-to-fail: false
80+
symfony-require: 8.*
81+
variant: symfony/symfony:"8.*"
6782
steps:
6883
- name: Checkout
69-
uses: actions/checkout@v4
84+
uses: actions/checkout@v6
7085
- name: Install PHP with extensions
7186
uses: shivammathur/setup-php@v2
7287
with:

.php-cs-fixer.dist.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
return (new PhpCsFixer\Config())
2626
->setRules([
27-
'@PHP71Migration' => true,
2827
'@PHP82Migration' => true,
2928
'@PHPUnit75Migration:risky' => true,
3029
'@Symfony' => true,

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
v5.0
2+
-----
3+
4+
## Changes
5+
* [#179](https://github.com/cleverage/process-bundle/issues/179) Add support for PHP 8.5 and Symfony 8.* Update phpunit/phpunit to version >10.0
6+
7+
## BC breaks
8+
* [#179](https://github.com/cleverage/process-bundle/issues/179) Remove support for PHP 8.1 and Symfony 7.3
9+
110
v4.5
211
-----
312

composer.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,37 +53,37 @@
5353
}
5454
},
5555
"require": {
56-
"php": ">=8.1",
56+
"php": ">=8.2",
5757
"ext-dom": "*",
5858
"ext-intl": "*",
5959
"ext-json": "*",
6060
"ext-mbstring": "*",
6161
"psr/cache": "^1|^2|^3",
62-
"symfony/config": "^6.4|^7.3",
63-
"symfony/console": "^6.4|^7.3",
64-
"symfony/dependency-injection": "^6.4|^7.3",
65-
"symfony/dotenv": "^6.4|^7.3",
62+
"symfony/config": "^6.4|^7.4|^8",
63+
"symfony/console": "^6.4|^7.4|^8",
64+
"symfony/dependency-injection": "^6.4|^7.4|^8",
65+
"symfony/dotenv": "^6.4|^7.4|^8",
6666
"symfony/event-dispatcher-contracts": "^3",
67-
"symfony/expression-language": "^6.4|^7.3",
68-
"symfony/framework-bundle": "^6.4|^7.3",
69-
"symfony/monolog-bridge": "^6.4|^7.3",
70-
"symfony/monolog-bundle": "~3.3",
71-
"symfony/options-resolver": "^6.4|^7.3",
72-
"symfony/process": "^6.4|^7.3",
73-
"symfony/property-access": "^6.4|^7.3",
74-
"symfony/runtime": "^6.4|^7.3",
75-
"symfony/serializer": "^6.4|^7.3",
76-
"symfony/stopwatch": "^6.4|^7.3",
77-
"symfony/validator": "^6.4|^7.3",
78-
"symfony/yaml": "^6.4|^7.3",
67+
"symfony/expression-language": "^6.4|^7.4|^8",
68+
"symfony/framework-bundle": "^6.4|^7.4|^8",
69+
"symfony/monolog-bridge":"^6.4|^7.4|^8",
70+
"symfony/monolog-bundle": "^3.11|^4",
71+
"symfony/options-resolver": "^6.4|^7.4|^8",
72+
"symfony/process": "^6.4|^7.4|^8",
73+
"symfony/property-access": "^6.4|^7.4|^8",
74+
"symfony/runtime": "^6.4|^7.4|^8",
75+
"symfony/serializer": "^6.4|^7.4|^8",
76+
"symfony/stopwatch": "^6.4|^7.4|^8",
77+
"symfony/validator": "^6.4|^7.4|^8",
78+
"symfony/yaml": "^6.4|^7.4|^8",
7979
"symfony/service-contracts": ">=1.0.0"
8080
},
8181
"require-dev": {
8282
"friendsofphp/php-cs-fixer": "*",
8383
"phpstan/extension-installer": "*",
8484
"phpstan/phpstan": "*",
8585
"phpstan/phpstan-symfony": "*",
86-
"phpunit/phpunit": "<10.0",
86+
"phpunit/phpunit": "*",
8787
"rector/rector": "*",
8888
"roave/security-advisories": "dev-latest",
8989
"symfony/test-pack": "^1.1"

phpunit.xml.dist

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +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/9.6/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.0/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
5-
cacheResultFile=".phpunit.cache/test-results"
5+
cacheDirectory=".phpunit.cache"
66
executionOrder="depends,defects"
7-
forceCoversAnnotation="true"
8-
beStrictAboutCoversAnnotation="true"
7+
requireCoverageMetadata="true"
8+
beStrictAboutCoverageMetadata="true"
99
beStrictAboutOutputDuringTests="true"
10-
beStrictAboutTodoAnnotatedTests="true"
11-
convertDeprecationsToExceptions="true"
1210
failOnRisky="true"
13-
failOnWarning="true"
14-
verbose="true">
11+
failOnWarning="true">
1512
<testsuites>
1613
<testsuite name="default">
1714
<directory>tests</directory>
1815
</testsuite>
1916
</testsuites>
20-
21-
<coverage cacheDirectory=".phpunit.cache/code-coverage"
22-
processUncoveredFiles="true">
17+
<source>
2318
<include>
2419
<directory suffix=".php">src</directory>
2520
</include>
26-
</coverage>
27-
</phpunit>
21+
</source>
22+
</phpunit>

rector.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6+
use Rector\PHPUnit\Set\PHPUnitSetList;
67
use Rector\Set\ValueObject\LevelSetList;
78
use Rector\Symfony\Set\SymfonySetList;
89
use Rector\ValueObject\PhpVersion;
910

1011
return RectorConfig::configure()
11-
->withPhpVersion(PhpVersion::PHP_84)
12+
->withPhpVersion(PhpVersion::PHP_85)
1213
->withPaths([
1314
__DIR__.'/src',
1415
__DIR__.'/tests',
1516
])
16-
->withPhpSets(php81: true)
17+
->withPhpSets(php82: true)
1718
// here we can define, what prepared sets of rules will be applied
1819
->withPreparedSets(deadCode: true, codeQuality: true, symfonyCodeQuality: true)
1920
->withAttributesSets(symfony: true)
2021
->withSets([
21-
LevelSetList::UP_TO_PHP_81,
22+
LevelSetList::UP_TO_PHP_82,
2223
SymfonySetList::SYMFONY_64,
2324
SymfonySetList::SYMFONY_CODE_QUALITY,
2425
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
26+
PHPUnitSetList::PHPUNIT_100,
2527
])
2628
;

tests/Exception/MissingTransformerExceptionTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@
1616
use CleverAge\ProcessBundle\Exception\MissingTransformerException;
1717
use PHPUnit\Framework\TestCase;
1818

19-
/**
20-
* @coversDefaultClass \CleverAge\ProcessBundle\Exception\MissingTransformerException
21-
*/
19+
#[\PHPUnit\Framework\Attributes\CoversClass(MissingTransformerException::class)]
20+
#[\PHPUnit\Framework\Attributes\CoversMethod(MissingTransformerException::class, 'create')]
2221
class MissingTransformerExceptionTest extends TestCase
2322
{
24-
/**
25-
* @covers ::create
26-
*/
2723
public function testCreate(): void
2824
{
2925
$exception = MissingTransformerException::create('my_transformer');

tests/Transformer/Array/ArrayElementTransformerTest.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
use PHPUnit\Framework\TestCase;
1818
use Symfony\Component\OptionsResolver\OptionsResolver;
1919

20-
/**
21-
* @coversDefaultClass \CleverAge\ProcessBundle\Transformer\Array\ArrayElementTransformer
22-
*/
20+
#[\PHPUnit\Framework\Attributes\CoversClass(ArrayElementTransformer::class)]
21+
#[\PHPUnit\Framework\Attributes\CoversMethod(ArrayElementTransformer::class, 'transform')]
22+
#[\PHPUnit\Framework\Attributes\CoversMethod(ArrayElementTransformer::class, 'configureOptions')]
23+
#[\PHPUnit\Framework\Attributes\CoversMethod(ArrayElementTransformer::class, 'getCode')]
2324
class ArrayElementTransformerTest extends TestCase
2425
{
25-
/**
26-
* @covers ::transform
27-
*/
2826
public function testTransformReturnsNthElementFromArray(): void
2927
{
3028
$transformer = new ArrayElementTransformer();
@@ -36,9 +34,6 @@ public function testTransformReturnsNthElementFromArray(): void
3634
$this->assertEquals('bar', $result);
3735
}
3836

39-
/**
40-
* @covers ::configureOptions
41-
*/
4237
public function testConfigureOptionsSetsRequiredOptions(): void
4338
{
4439
$resolver = new OptionsResolver();
@@ -52,9 +47,6 @@ public function testConfigureOptionsSetsRequiredOptions(): void
5247
$this->assertEquals(['index'], array_keys($resolvedOptions));
5348
}
5449

55-
/**
56-
* @covers ::getCode
57-
*/
5850
public function testGetCodeReturnsCorrectCode(): void
5951
{
6052
$transformer = new ArrayElementTransformer();

0 commit comments

Comments
 (0)