Skip to content

Commit

Permalink
Suppress assert_options() warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Oct 23, 2023
1 parent 64ce2b4 commit 1490a09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Phan/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,18 @@ function phan_output_ast_installation_instructions(): void
// assert_options has been deprecated starting with PHP 8.3
if (PHP_VERSION_ID < 80300) {
// Explicitly set each option in case INI is set otherwise
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
assert_options(ASSERT_ACTIVE, true);
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
assert_options(ASSERT_WARNING, false);
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
assert_options(ASSERT_BAIL, false);
// ASSERT_QUIET_EVAL has been removed starting with PHP 8
if (defined('ASSERT_QUIET_EVAL')) {
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
assert_options(ASSERT_QUIET_EVAL, false); // @phan-suppress-current-line UnusedPluginSuppression, PhanTypeMismatchArgumentNullableInternal
}
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
assert_options(ASSERT_CALLBACK, ''); // Can't explicitly set ASSERT_CALLBACK to null?
}

Expand Down

0 comments on commit 1490a09

Please sign in to comment.