Skip to content

Commit 14cf836

Browse files
- update project dependencies and PHP compatibility to PHP 8.5 - drop php 8.1 / doctrine/dbal 2.*
1 parent d5af8e7 commit 14cf836

File tree

9 files changed

+66
-53
lines changed

9 files changed

+66
-53
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
return (new PhpCsFixer\Config())
2626
->setRules([
27-
'@PHP71Migration' => true,
28-
'@PHP82Migration' => true,
27+
'@PHP8x2Migration' => true,
28+
'@PHPUnit7x5Migration:risky' => true,
2929
'@PHPUnit75Migration:risky' => true,
3030
'@Symfony' => true,
3131
'@Symfony:risky' => true,
@@ -35,7 +35,7 @@
3535
'header_comment' => ['header' => $fileHeaderComment],
3636
'modernize_strpos' => true,
3737
'get_class_to_class_keyword' => true,
38-
'phpdoc_to_comment' => ['ignored_tags' => ['var']], // Fix issue on initializeStatement method $params variable
38+
'phpdoc_to_comment' => ['ignored_tags' => ['var']], // Fix an issue on initializeStatement method $params variable
3939
])
4040
->setRiskyAllowed(true)
4141
->setFinder(

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@
4949
}
5050
},
5151
"require": {
52-
"php": ">=8.1",
53-
"cleverage/process-bundle": "^4.0",
54-
"doctrine/common": "^3.0",
55-
"doctrine/dbal": "^2.9 || ^3.0",
56-
"doctrine/doctrine-bundle": "^2.5",
57-
"doctrine/doctrine-migrations-bundle": "^3.2",
58-
"doctrine/orm": "^2.9 || ^3.0"
52+
"php": ">=8.2",
53+
"cleverage/process-bundle": "^5.0",
54+
"doctrine/common": "^3.5",
55+
"doctrine/dbal": "^3.10 || ^4.4",
56+
"doctrine/doctrine-bundle": "^2.18 || ^3.1",
57+
"doctrine/doctrine-migrations-bundle": "^3.7 || ^4",
58+
"doctrine/orm": "^2.20 || ^3.5"
5959
},
6060
"require-dev": {
6161
"friendsofphp/php-cs-fixer": "*",
6262
"phpstan/extension-installer": "*",
6363
"phpstan/phpstan": "*",
64-
"phpstan/phpstan-doctrine": "^2.0",
64+
"phpstan/phpstan-doctrine": "*",
6565
"phpstan/phpstan-symfony": "*",
66-
"phpunit/phpunit": "<10.0",
66+
"phpunit/phpunit": "*",
6767
"rector/rector": "*",
6868
"roave/security-advisories": "dev-latest",
6969
"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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
use Rector\ValueObject\PhpVersion;
99

1010
return RectorConfig::configure()
11-
->withPhpVersion(PhpVersion::PHP_84)
11+
->withPhpVersion(PhpVersion::PHP_85)
1212
->withPaths([
1313
__DIR__.'/src',
1414
__DIR__.'/tests',
1515
])
16-
->withPhpSets(php81: true)
17-
// here we can define, what prepared sets of rules will be applied
16+
->withPhpSets(php82: true)
17+
// here we can define what prepared sets of rules will be applied
1818
->withComposerBased(doctrine: true)
1919
->withPreparedSets(deadCode: true, codeQuality: true, doctrineCodeQuality: true, symfonyCodeQuality: true)
2020
->withAttributesSets(symfony: true, doctrine: true)
2121
->withSets([
22-
LevelSetList::UP_TO_PHP_81,
22+
LevelSetList::UP_TO_PHP_82,
2323
SymfonySetList::SYMFONY_64,
2424
SymfonySetList::SYMFONY_CODE_QUALITY,
2525
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,

src/Task/Database/DatabaseReaderTask.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
use CleverAge\ProcessBundle\Model\FinalizableTaskInterface;
1818
use CleverAge\ProcessBundle\Model\IterableTaskInterface;
1919
use CleverAge\ProcessBundle\Model\ProcessState;
20+
use Doctrine\DBAL\ArrayParameterType;
2021
use Doctrine\DBAL\Connection;
22+
use Doctrine\DBAL\ParameterType;
2123
use Doctrine\DBAL\Result;
2224
use Doctrine\DBAL\Types\Type;
2325
use Doctrine\Persistence\ManagerRegistry;
@@ -37,7 +39,7 @@
3739
* 'offset': ?int,
3840
* 'input_as_params': bool,
3941
* 'params': array<string, mixed>,
40-
* 'types': array<int, int|string|Type|null>|array<string, int|string|Type|null>
42+
* 'types': array<int<0, max>|string, ArrayParameterType|ParameterType|Type|string>
4143
* }
4244
*/
4345
class DatabaseReaderTask extends AbstractConfigurableTask implements IterableTaskInterface, FinalizableTaskInterface

src/Task/Database/DatabaseUpdaterTask.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515

1616
use CleverAge\ProcessBundle\Model\AbstractConfigurableTask;
1717
use CleverAge\ProcessBundle\Model\ProcessState;
18+
use Doctrine\DBAL\ArrayParameterType;
1819
use Doctrine\DBAL\Connection;
1920
use Doctrine\DBAL\Exception;
21+
use Doctrine\DBAL\ParameterType;
2022
use Doctrine\DBAL\Types\Type;
2123
use Doctrine\Persistence\ManagerRegistry;
2224
use Psr\Log\LoggerInterface;
@@ -31,7 +33,7 @@
3133
* 'sql': string,
3234
* 'input_as_params': bool,
3335
* 'params': array<string, mixed>,
34-
* 'types': array<int, int|string|Type|null>|array<string, int|string|Type|null>
36+
* 'types': array<int<0, max>|string, ArrayParameterType|ParameterType|Type|string>
3537
* }
3638
*/
3739
class DatabaseUpdaterTask extends AbstractConfigurableTask

0 commit comments

Comments
 (0)