Compare commits

..

2 Commits

Author SHA1 Message Date
Steve Boyd
9dd253710a
Merge b4f6fbfe6c into ebbd6427b2 2024-10-17 21:57:14 +00:00
Steve Boyd
b4f6fbfe6c ENH Do not output core code deprecation messages by default 2024-10-18 10:57:07 +13:00

View File

@ -457,18 +457,18 @@ class Deprecation
/** /**
* Shorthand method to create a suppressed notice for something with no immediate replacement. * Shorthand method to create a suppressed notice for something with no immediate replacement.
* If $string is empty, then a standardised message will be used * If $message is empty, then a standardised message will be used
*/ */
public static function noticeWithNoReplacment( public static function noticeWithNoReplacment(
string $atVersion, string $atVersion,
string $string = '', string $message = '',
int $scope = Deprecation::SCOPE_METHOD int $scope = Deprecation::SCOPE_METHOD
): void { ): void {
if ($string === '') { if ($message === '') {
$string = 'Will be removed without equivalent functionality to replace it.'; $message = 'Will be removed without equivalent functionality to replace it.';
} }
Deprecation::withSuppressedNotice( Deprecation::withSuppressedNotice(
fn() => Deprecation::notice($atVersion, $string, $scope) fn() => Deprecation::notice($atVersion, $message, $scope)
); );
} }