Skip to content

Commit

Permalink
[Runtime][ErrorHandler] Don't mess with ini_set('assert.warning')
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 16, 2023
1 parent 6f2e603 commit 838ecb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Symfony/Component/ErrorHandler/Debug.php
Expand Up @@ -31,7 +31,6 @@ public static function enable(): ErrorHandler

@ini_set('zend.assertions', 1);
ini_set('assert.active', 1);
ini_set('assert.warning', 0);
ini_set('assert.exception', 1);

DebugClassLoader::enable();
Expand Down
8 changes: 3 additions & 5 deletions src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
Expand Up @@ -669,9 +669,8 @@ public function testAssertQuietEval()
ini_set('zend.assertions', 1),
ini_set('assert.active', 1),
ini_set('assert.bail', 0),
ini_set('assert.warning', 1),
ini_set('assert.callback', null),
ini_set('assert.exception', 0),
\ini_get('assert.exception'),
];

$logger = new BufferingLogger();
Expand All @@ -687,9 +686,8 @@ public function testAssertQuietEval()
ini_set('zend.assertions', $ini[0]);
ini_set('assert.active', $ini[1]);
ini_set('assert.bail', $ini[2]);
ini_set('assert.warning', $ini[3]);
ini_set('assert.callback', $ini[4]);
ini_set('assert.exception', $ini[5]);
ini_set('assert.callback', $ini[3]);
ini_set('assert.exception', $ini[4]);
}

$logs = $logger->cleanLogs();
Expand Down
Expand Up @@ -32,7 +32,6 @@ public static function register(bool $debug): void
if (0 <= \ini_get('zend.assertions')) {
ini_set('zend.assertions', 1);
ini_set('assert.active', $debug);
ini_set('assert.warning', 0);
ini_set('assert.exception', 1);
}

Expand Down

0 comments on commit 838ecb6

Please sign in to comment.