同步
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user