CodeExplorer callSilentIfInactive example
public function testCallSilentIfInactiveProvider(string
$majorVersion, string
$deprecatedMessage, \Closure
$assertion): void
{ $errorMessage = null;
set_error_handler(static function Dint
$errno, string
$error) use (&
$errorMessage): bool
{ $errorMessage =
$error;
return true;
});
Feature::
callSilentIfInactive('v6.5.0.0',
static function D
) use ($deprecatedMessage,
$majorVersion): void
{ Feature::
triggerDeprecationOrThrow($majorVersion,
$deprecatedMessage);
});
$assertion($deprecatedMessage,
$errorMessage);
restore_error_handler();
}}