Skip to content

Commit ec966bd

Browse files
Leverage trigger_deprecation() from symfony/deprecation-contracts
1 parent 6a29d7f commit ec966bd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

LegacyEventDispatcherProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
1515

16-
@trigger_error(sprintf('%s is deprecated since Symfony 5.1, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class), E_USER_DEPRECATED);
16+
trigger_deprecation('symfony/event-dispatcher', '5.1', '%s is deprecated, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class);
1717

1818
/**
1919
* A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch().

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": "^7.2.5",
20+
"symfony/deprecation-contracts": "^2.1",
2021
"symfony/event-dispatcher-contracts": "^2"
2122
},
2223
"require-dev": {

0 commit comments

Comments
 (0)