Skip to content

Commit e24fcce

Browse files
GromNaNnicolas-grekas
authored andcommitted
[DoctrineBridge] Deprecate AbstractDoctrineExtension
1 parent eea8e3b commit e24fcce

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CHANGELOG
77
* Deprecate `UniqueEntity::getRequiredOptions()` and `UniqueEntity::getDefaultOption()`
88
* Use a single table named `_schema_subscriber_check` in schema listeners to detect same database connections
99
* Add support for `Symfony\Component\Clock\DatePoint` as `DayPointType` and `TimePointType` Doctrine type
10+
* Deprecate the `AbstractDoctrineExtension` class; its code is incorporated into the extension classes of Doctrine bundles
1011

1112
7.3
1213
---

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717
use Symfony\Component\DependencyInjection\Reference;
1818
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
1919

20+
trigger_deprecation('symfony/doctrine-bridge', '7.4', 'The "%s" class is deprecated, the code is incorporated into the extension classes of Doctrine bundles.', AbstractDoctrineExtension::class);
21+
2022
/**
2123
* This abstract classes groups common code that Doctrine Object Manager extensions (ORM, MongoDB, CouchDB) need.
2224
*
2325
* @author Benjamin Eberlei <[email protected]>
26+
*
27+
* @deprecated since Symfony 7.4, the code is incorporated into the extension classes of Doctrine bundles
2428
*/
2529
abstract class AbstractDoctrineExtension extends Extension
2630
{

Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection;
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
15+
use PHPUnit\Framework\Attributes\Group;
16+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
1517
use PHPUnit\Framework\MockObject\MockObject;
1618
use PHPUnit\Framework\TestCase;
1719
use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension;
@@ -23,6 +25,8 @@
2325
/**
2426
* @author Fabio B. Silva <[email protected]>
2527
*/
28+
#[IgnoreDeprecations]
29+
#[Group('legacy')]
2630
class DoctrineExtensionTest extends TestCase
2731
{
2832
private MockObject&AbstractDoctrineExtension $extension;

0 commit comments

Comments
 (0)