Skip to content

Commit 838c05f

Browse files
Silence E_DEPRECATED and E_USER_DEPRECATED
1 parent 832c3ce commit 838c05f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Internal/BasicErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BasicErrorHandler
2020
{
2121
public static function register(bool $debug): void
2222
{
23-
error_reporting(-1);
23+
error_reporting(\E_ALL & ~\E_DEPRECATED & ~\E_USER_DEPRECATED);
2424

2525
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
2626
ini_set('display_errors', $debug);

Internal/SymfonyErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static function register(bool $debug): void
3030
return;
3131
}
3232

33-
error_reporting(-1);
33+
error_reporting(\E_ALL & ~\E_DEPRECATED & ~\E_USER_DEPRECATED);
3434

3535
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
3636
ini_set('display_errors', $debug);

0 commit comments

Comments
 (0)