Skip to content

Commit 5c72327

Browse files
committed
Merge remote-tracking branch 'origin/2.12.x' into cleanup-bc
2 parents 81f053f + 4d4f359 commit 5c72327

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ See also the [GitHub releases page](https://github.com/FriendsOfSymfony/FOSHttpC
99
* Allow installation with Symfony 6 components
1010
* Drop support for Symfony 3, minimal version is now 4.3
1111

12+
2.12.1
13+
------
14+
15+
### Symfony Compatibility
16+
17+
* Do not extend the wrong Event class when installed with legacy Symfony but the Symfony contracts happen to be installed
18+
1219
2.12.0
1320
------
1421

src/BaseEvent.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
use Symfony\Component\EventDispatcher\Event as OldEvent;
1515
use Symfony\Contracts\EventDispatcher\Event as ContractEvent;
1616

17-
if (class_exists(ContractEvent::class)) {
18-
class BaseEvent extends ContractEvent
19-
{
20-
}
21-
} else {
17+
if (class_exists(OldEvent::class)) {
2218
/**
2319
* @codeCoverageIgnore
2420
* @ignore This is purely for 3.4 comparability.
2521
*/
2622
class BaseEvent extends OldEvent
2723
{
2824
}
25+
} else {
26+
class BaseEvent extends ContractEvent
27+
{
28+
}
2929
}

0 commit comments

Comments
 (0)