8000 bug #60779 Silence E_DEPRECATED and E_USER_DEPRECATED (nicolas-grekas) · symfony/symfony@9a7f7a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a7f7a3

Browse files
bug #60779 Silence E_DEPRECATED and E_USER_DEPRECATED (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- Silence E_DEPRECATED and E_USER_DEPRECATED | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #60528 | License | MIT This change works around php/php-src#17422 This shouldn't change much in practice because we report both not-silenced and silenced deprecations, except for the case when the native php error handler is triggered, which is what happens at this opcache stage, see php/php-src#18541 also. Commits ------- f21b2f4 Silence E_DEPRECATED and E_USER_DEPRECATED
2 parents aaa67ea + f21b2f4 commit 9a7f7a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Symfony/Component/ErrorHandler/Debug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Debug
2020
{
2121
public static function enable(): ErrorHandler
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', 0);

src/Symfony/Component/Runtime/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);

src/Symfony/Component/Runtime/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)
0