Skip to content

Commit

Permalink
Allow using LOG_DEPRECATIONS_WHILE_TESTING environment variable
Browse files Browse the repository at this point in the history
This matches laravel/framework#49457 feature except Testbench still logs
deprecation by default and you can disable it by adding
`LOG_DEPRECATIONS_WHILE_TESTING=(false)`

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 21, 2023
1 parent 033e085 commit da339d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Bootstrap/HandleExceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ protected function shouldIgnoreDeprecationErrors()
{
return ! class_exists(LogManager::class)
|| ! self::$app->hasBeenBootstrapped();
|| Env::get('LOG_DEPRECATIONS_WHILE_TESTING', true) !== false;

Check failure on line 102 in src/Bootstrap/HandleExceptions.php

View workflow job for this annotation

GitHub Actions / PHP8.2 PHPStan & Pint

Syntax error, unexpected T_BOOLEAN_OR on line 102

Check failure on line 102 in src/Bootstrap/HandleExceptions.php

View workflow job for this annotation

GitHub Actions / PHP8.2 PHPStan & Pint

Syntax error, unexpected T_BOOLEAN_OR on line 102
}
}

0 comments on commit da339d0

Please sign in to comment.