Add neutral diagnostic framework for future reporting modules: - DiagnosticReporterInterface, Registry, Manager, PayloadSanitizer - Laravel exception hook in bootstrap/app.php - Module permission declarations (requires_permissions in module.json) - Core diagnostic report points (module boot/install/update failures) - Module documentation update (moduldoku.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
438 B
PHP
21 lines
438 B
PHP
<?php
|
|
|
|
namespace Safe;
|
|
|
|
use Safe\Exceptions\ClassobjException;
|
|
|
|
/**
|
|
* @param string $class
|
|
* @param string $alias
|
|
* @param bool $autoload
|
|
* @throws ClassobjException
|
|
*
|
|
*/
|
|
function class_alias(string $class, string $alias, bool $autoload = true): void
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \class_alias($class, $alias, $autoload);
|
|
if ($safeResult === false) {
|
|
throw ClassobjException::createFromPhpError();
|
|
}
|
|
}
|