增强 MongoDB 集成及用户管理功能

更新 composer.json 文件,添加新的依赖项:vlucas/phpdotenv、predis/predis、dragonmantank/cron-expression、php-amqplib/php-amqplib 以及 ramsey/uuid。
在 IndexController 中添加 MongoDB 连接测试接口。
在 UserController 中实现用户管理接口,用于创建、更新、删除和搜索用户。
在 database.php 中配置 MongoDB 连接设置。
更新路由,以包含新的与用户相关的 API 接口。
增强用户操作中的错误处理和日志记录功能。
在 process.php 中引入数据同步和工作进程配置。
This commit is contained in:
乘风
2026-01-05 10:46:44 +08:00
parent 1c79e15f85
commit db3b80d3ff
38 changed files with 14586 additions and 24 deletions

View File

@@ -29,9 +29,17 @@ if (empty(Worker::$eventLoopClass)) {
}
set_error_handler(function ($level, $message, $file = '', $line = 0) {
// 忽略 MongoDB Laravel 的废弃警告E_USER_DEPRECATED = 16384
// 这些警告不影响功能只是提示使用新的API
if ($level === E_USER_DEPRECATED && strpos($message, 'Using "$collection" property is deprecated') !== false) {
return true; // 忽略此警告
}
if (error_reporting() & $level) {
throw new ErrorException($message, 0, $level, $file, $line);
}
return false;
});
if ($worker) {