mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-11-17 17:13:34 +08:00
背景与目的:应用同步组件后仍有旧行注释文件头及带多余斜线的 PHPDoc 头,需要统一到 CS-Fixer 的文件头模板。 主要改动:清理微信模块重复头,统一 HTTP 与命令行入口的 ThinkAdmin 标题、版权年份、仓库及会员说明。 影响范围与兼容性:仅调整文件头注释和相邻空行,不改变业务逻辑及权限注解。 验证入口及实际结果:最终文件与开发仓库对应组件一致;PHP 语法与差异检查通过,暂存差异已与审核内容核对。本次未运行完整 CS-Fixer 规则。
39 lines
1.6 KiB
PHP
39 lines
1.6 KiB
PHP
#!/usr/bin/env php
|
||
<?php
|
||
/**
|
||
* +----------------------------------------------------------------------
|
||
* | ThinkAdmin Plugin for ThinkAdmin
|
||
* +----------------------------------------------------------------------
|
||
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||
* +----------------------------------------------------------------------
|
||
* | 官方网站: https://thinkadmin.top
|
||
* +----------------------------------------------------------------------
|
||
* | 开源协议 ( https://mit-license.org )
|
||
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||
* +----------------------------------------------------------------------
|
||
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||
* +----------------------------------------------------------------------
|
||
*/
|
||
use think\admin\service\RuntimeService;
|
||
|
||
// 带 shebang 的入口不声明 strict_types,兼容 PHP 7.2 的包含调用。
|
||
// 加载基础文件
|
||
require __DIR__ . '/vendor/autoload.php';
|
||
|
||
/**
|
||
* 初始化命令行应用。
|
||
* 直接执行时将未捕获异常交由 PHP 原生处理,确保失败以非零状态退出。
|
||
* 包含入口时保留调用方异常处理器,并向上传递原异常。
|
||
* @throws \Throwable 初始化或命令执行中未被控制台捕获的异常
|
||
*/
|
||
try {
|
||
RuntimeService::doConsoleInit();
|
||
} catch (\Throwable $error) {
|
||
if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true) && realpath($_SERVER['SCRIPT_FILENAME'] ?? '') === __FILE__) {
|
||
set_exception_handler(null);
|
||
}
|
||
throw $error;
|
||
}
|