Skip to content

Commit 601a0e3

Browse files
committed
Remove support for Symfony 5
1 parent 9fe3b63 commit 601a0e3

File tree

71 files changed

+294
-658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+294
-658
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
php-version:
24-
- "7.4"
25-
- "8.0"
2624
- "8.1"
2725
- "8.2"
26+
- "8.3"
2827
dependencies:
2928
- "highest"
3029
stability:
@@ -37,32 +36,27 @@ jobs:
3736
# Tests the lowest set of dependencies
3837
- dependencies: "lowest"
3938
stability: "stable"
40-
php-version: "7.4"
39+
php-version: "8.1"
4140

4241
# Test LTS
43-
- symfony-require: "5.4.*"
44-
dependencies: "highest"
45-
php-version: "8.0"
46-
47-
# Test last supported minor version
4842
- symfony-require: "6.*"
4943
dependencies: "highest"
50-
php-version: "8.3"
44+
php-version: "8.1"
5145

5246
# DBAL only without ORM
53-
- php-version: "8.3"
47+
- php-version: "8.4"
5448
dependencies: "highest"
5549
stability: "stable"
5650
remove-orm: true
5751

5852
# DBAL 4
59-
- php-version: "8.3"
53+
- php-version: "8.4"
6054
dependencies: "highest"
6155
stability: "dev"
6256
remove-orm: true
6357

6458
# Bleeding edge
65-
- php-version: "8.3"
59+
- php-version: "8.4"
6660
dependencies: "highest"
6761
stability: "dev"
6862

@@ -83,7 +77,7 @@ jobs:
8377

8478
- name: "Require symfony/messenger"
8579
run: "composer require --dev symfony/messenger --no-update"
86-
if: "${{ startsWith(matrix.symfony-require, '5.') }}"
80+
if: "${{ startsWith(matrix.symfony-require, '6.') }}"
8781

8882
- name: "Enforce using stable dependencies"
8983
run: "composer config minimum-stability stable"
@@ -93,6 +87,10 @@ jobs:
9387
run: "composer remove doctrine/orm --dev --no-update"
9488
if: "${{ matrix.remove-orm }}"
9589

90+
- name: "Remove Psalm"
91+
run: "composer remove vimeo/psalm psalm/plugin-phpunit psalm/plugin-symfony --dev --no-update"
92+
if: "${{ matrix.php-version == '8.4' }}"
93+
9694
- name: "Install dependencies with Composer"
9795
uses: "ramsey/composer-install@v3"
9896
with:

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: "shivammathur/setup-php@v2"
2323
with:
2424
coverage: "none"
25-
php-version: "8.2"
25+
php-version: "8.3"
2626

2727
- name: "Enforce using stable dependencies"
2828
run: "composer config minimum-stability stable"

composer.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,56 +29,56 @@
2929
],
3030
"homepage": "https://www.doctrine-project.org",
3131
"require": {
32-
"php": "^7.4 || ^8.0",
32+
"php": "^8.1",
3333
"doctrine/cache": "^1.11 || ^2.0",
3434
"doctrine/dbal": "^3.7.0 || ^4.0",
3535
"doctrine/persistence": "^2.2 || ^3",
3636
"doctrine/sql-formatter": "^1.0.1",
37-
"symfony/cache": "^5.4 || ^6.0 || ^7.0",
38-
"symfony/config": "^5.4 || ^6.0 || ^7.0",
39-
"symfony/console": "^5.4 || ^6.0 || ^7.0",
40-
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
37+
"symfony/cache": "^6.4 || ^7.0",
38+
"symfony/config": "^6.4 || ^7.0",
39+
"symfony/console": "^6.4 || ^7.0",
40+
"symfony/dependency-injection": "^6.4 || ^7.0",
4141
"symfony/deprecation-contracts": "^2.1 || ^3",
42-
"symfony/doctrine-bridge": "^5.4.46 || ~6.3.12 || ^6.4.3 || ^7.0.3",
43-
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
44-
"symfony/polyfill-php80": "^1.15",
45-
"symfony/service-contracts": "^1.1.1 || ^2.0 || ^3"
42+
"symfony/doctrine-bridge": "^6.4.3 || ^7.0.3",
43+
"symfony/framework-bundle": "^6.4 || ^7.0",
44+
"symfony/service-contracts": "^2.5 || ^3"
4645
},
4746
"require-dev": {
4847
"doctrine/annotations": "^1 || ^2",
4948
"doctrine/coding-standard": "^12",
5049
"doctrine/deprecations": "^1.0",
5150
"doctrine/orm": "^2.17 || ^3.0",
5251
"friendsofphp/proxy-manager-lts": "^1.0",
53-
"phpunit/phpunit": "^9.5.26",
54-
"psalm/plugin-phpunit": "^0.18.4",
52+
"phpunit/phpunit": "^9.6.22",
53+
"psalm/plugin-phpunit": "^0.19.0",
5554
"psalm/plugin-symfony": "^5",
5655
"psr/log": "^1.1.4 || ^2.0 || ^3.0",
57-
"symfony/phpunit-bridge": "^6.1 || ^7.0",
58-
"symfony/property-info": "^5.4 || ^6.0 || ^7.0",
59-
"symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0",
60-
"symfony/security-bundle": "^5.4 || ^6.0 || ^7.0",
61-
"symfony/stopwatch": "^5.4 || ^6.0 || ^7.0",
62-
"symfony/string": "^5.4 || ^6.0 || ^7.0",
63-
"symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0",
64-
"symfony/validator": "^5.4 || ^6.0 || ^7.0",
65-
"symfony/var-exporter": "^5.4 || ^6.2 || ^7.0",
66-
"symfony/web-profiler-bundle": "^5.4 || ^6.0 || ^7.0",
67-
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
68-
"twig/twig": "^1.34 || ^2.12 || ^3.0",
56+
"symfony/phpunit-bridge": "^7.2",
57+
"symfony/property-info": "^6.4 || ^7.0",
58+
"symfony/proxy-manager-bridge": "^6.4 || ^7.0",
59+
"symfony/security-bundle": "^6.4 || ^7.0",
60+
"symfony/stopwatch": "^6.4 || ^7.0",
61+
"symfony/string": "^6.4 || ^7.0",
62+
"symfony/twig-bridge": "^6.4 || ^7.0",
63+
"symfony/validator": "^6.4 || ^7.0",
64+
"symfony/var-exporter": "^6.4.1 || ^7.0.1",
65+
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
66+
"symfony/yaml": "^6.4 || ^7.0",
67+
"twig/twig": "^2.13 || ^3.0.4",
6968
"vimeo/psalm": "^5.15"
7069
},
7170
"conflict": {
7271
"doctrine/annotations": ">=3.0",
7372
"doctrine/orm": "<2.17 || >=4.0",
74-
"twig/twig": "<1.34 || >=2.0 <2.4"
73+
"symfony/var-exporter": "< 6.4.1 || 7.0.0",
74+
"twig/twig": "<2.13 || >=3.0 <3.0.4"
7575
},
7676
"suggest": {
7777
"ext-pdo": "*",
7878
"doctrine/orm": "The Doctrine ORM integration is optional in the bundle.",
7979
"symfony/web-profiler-bundle": "To use the data collector."
8080
},
81-
"minimum-stability": "dev",
81+
"minimum-stability": "stable",
8282
"autoload": {
8383
"psr-4": {
8484
"Doctrine\\Bundle\\DoctrineBundle\\": "src"

config/messenger.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
<tag name="messenger.transport_factory" />
5252
</service>
5353

54-
<service id="doctrine.orm.messenger.doctrine_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\MessengerTransportDoctrineSchemaSubscriber">
55-
<argument type="tagged_iterator" tag="messenger.receiver" />
56-
<tag name="doctrine.event_subscriber" />
57-
</service>
5854
<service id="doctrine.orm.messenger.doctrine_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\MessengerTransportDoctrineSchemaListener">
5955
<argument type="tagged_iterator" tag="messenger.receiver" />
6056
<tag name="doctrine.event_listener" event="postGenerateSchema" />

config/orm.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,10 @@
135135

136136
<!-- listeners -->
137137
<service id="doctrine.orm.listeners.resolve_target_entity" class="%doctrine.orm.listeners.resolve_target_entity.class%" public="false" />
138-
<service id="doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaSubscriber">
139-
<argument type="collection" /> <!-- DoctrineDbalAdapter instances -->
140-
<tag name="doctrine.event_subscriber" />
141-
</service>
142138
<service id="doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaListener">
143139
<argument type="collection" /> <!-- DoctrineDbalAdapter instances -->
144140
<tag name="doctrine.event_listener" event="postGenerateSchema" />
145141
</service>
146-
<service id="doctrine.orm.listeners.pdo_cache_adapter_doctrine_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\PdoCacheAdapterDoctrineSchemaSubscriber">
147-
<argument type="collection" /> <!-- PdoAdapter instances -->
148-
<tag name="doctrine.event_subscriber" />
149-
</service>
150-
<service id="doctrine.orm.listeners.doctrine_token_provider_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaSubscriber">
151-
<argument type="tagged_iterator" tag="security.remember_me_handler" />
152-
<tag name="doctrine.event_subscriber" />
153-
</service>
154142
<service id="doctrine.orm.listeners.doctrine_token_provider_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaListener">
155143
<argument type="tagged_iterator" tag="security.remember_me_handler" />
156144
<tag name="doctrine.event_listener" event="postGenerateSchema" />

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Ignore warnings, show progress of the run and show sniff names -->
1010
<arg value="nps"/>
1111

12-
<config name="php_version" value="70400"/>
12+
<config name="php_version" value="80100"/>
1313

1414
<file>src</file>
1515
<file>tests</file>

src/Attribute/AsDoctrineListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class AsDoctrineListener
1212
{
1313
public function __construct(
1414
public string $event,
15-
public ?int $priority = null,
16-
public ?string $connection = null,
15+
public int|null $priority = null,
16+
public string|null $connection = null,
1717
) {
1818
}
1919
}

src/Attribute/AsEntityListener.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
class AsEntityListener
1212
{
1313
public function __construct(
14-
public ?string $event = null,
15-
public ?string $method = null,
16-
public ?bool $lazy = null,
17-
public ?string $entityManager = null,
18-
public ?string $entity = null,
19-
public ?int $priority = null,
14+
public string|null $event = null,
15+
public string|null $method = null,
16+
public bool|null $lazy = null,
17+
public string|null $entityManager = null,
18+
public string|null $entity = null,
19+
public int|null $priority = null,
2020
) {
2121
}
2222
}

src/Attribute/AsMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AsMiddleware
1010
/** @param string[] $connections */
1111
public function __construct(
1212
public array $connections = [],
13-
public ?int $priority = null,
13+
public int|null $priority = null,
1414
) {
1515
}
1616
}

src/CacheWarmer/DoctrineMetadataCacheWarmer.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
/** @final since 2.11 */
1414
class DoctrineMetadataCacheWarmer extends AbstractPhpFileCacheWarmer
1515
{
16-
private EntityManagerInterface $entityManager;
17-
private string $phpArrayFile;
18-
19-
public function __construct(EntityManagerInterface $entityManager, string $phpArrayFile)
20-
{
21-
$this->entityManager = $entityManager;
22-
$this->phpArrayFile = $phpArrayFile;
23-
16+
public function __construct(
17+
private readonly EntityManagerInterface $entityManager,
18+
private readonly string $phpArrayFile,
19+
) {
2420
parent::__construct($phpArrayFile);
2521
}
2622

@@ -32,7 +28,7 @@ public function isOptional(): bool
3228
return false;
3329
}
3430

35-
protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter, ?string $buildDir = null): bool
31+
protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter, string|null $buildDir = null): bool
3632
{
3733
// cache already warmed up, no needs to do it again
3834
if (is_file($this->phpArrayFile)) {

0 commit comments

Comments
 (0)