Skip to content

Commit e8d582d

Browse files
committed
[DOCS] Adds note on E_USER_DEPRICATED.
1 parent c0f17b0 commit e8d582d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/breaking-changes.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ every time you use a deprecated parameters for {es}. We decided to add this
99
notice to facilitate the code refactoring with the new API specification of {es}
1010
(for example the usage of typeless APIs, see below).
1111

12+
From 7.4.1, we mitigated the usage of E_USER_DEPRICATED warning by using the `@`
13+
https://www.php.net/manual/en/language.operators.errorcontrol.php[operator]. The
14+
operator suppresses the error message, however, it is still possible to catch it
15+
by using a custom error handler:
16+
17+
[source,php]
18+
----
19+
set_error_handler(function ($errno, $errstr) {
20+
var_dump($errstr);
21+
}, E_USER_DEPRECATED);
22+
23+
@trigger_error('Deprecation message here', E_USER_DEPRECATED);
24+
----
25+
1226

1327
### Moving from types to typeless APIs in {es} 7.0
1428

0 commit comments

Comments
 (0)