Merge remote-tracking branch 'origin/main'

This commit is contained in:
crazywhalecc
2025-03-17 14:14:12 +08:00
12 changed files with 21 additions and 14 deletions

View File

@@ -20,7 +20,6 @@ class HandleExceptions implements Bootstrapper
E_USER_ERROR => ['PHP Error: ', 'error'],
E_USER_WARNING => ['PHP Warning: ', 'warning'],
E_USER_NOTICE => ['PHP Notice: ', 'notice'],
E_STRICT => ['PHP Strict: ', 'notice'],
E_RECOVERABLE_ERROR => ['PHP Recoverable Error: ', 'error'],
E_DEPRECATED => ['PHP Deprecated: ', 'notice'],
E_USER_DEPRECATED => ['PHP User Deprecated: ', 'notice'],
@@ -30,7 +29,7 @@ class HandleExceptions implements Bootstrapper
logger()->{$level_tip[1]}($error);
// 如果 return false 则错误会继续递交给 PHP 标准错误处理
return true;
}, E_ALL | E_STRICT);
});
// 重载异常处理器
ExceptionHandler::getInstance()->overrideWith(new Handler());

View File

@@ -262,7 +262,6 @@ class ProxyServerCommand extends Command
break;
case CMD_UDP_ASSOCIATE:
$connection->stage = STAGE_UDP_ASSOC;
var_dump('CMD_UDP_ASSOCIATE ' . ($this->config['udp_port'] ?? 2222));
if ($this->config['udp_port'] == 0) {
$connection->udpWorker = new Worker('udp://0.0.0.0:0');
/* @phpstan-ignore-next-line */
@@ -274,7 +273,7 @@ class ProxyServerCommand extends Command
$listenInfo = stream_socket_get_name($connection->udpWorker->getMainSocket(), false);
[$bind_addr, $bind_port] = explode(':', $listenInfo);
} else {
$bind_port = $this->config['udp_port'] ?? 2222;
$bind_port = $this->config['udp_port'];
}
$bind_addr = $this->config['wanIP'] ?? '192.168.1.1';

View File

@@ -32,7 +32,11 @@ final class ConsoleApplication extends Application
// 初始化 Composer 变量
if (file_exists(WORKING_DIR . '/runtime/composer.phar')) {
echo '* Using native composer' . PHP_EOL;
putenv('COMPOSER_EXECUTABLE=' . WORKING_DIR . '/runtime/composer.phar');
if (WORKING_DIR . '/runtime/php' === PHP_BINARY) {
putenv('COMPOSER_EXECUTABLE="' . WORKING_DIR . '/runtime/php ' . WORKING_DIR . '/runtime/composer.phar"');
} else {
putenv('COMPOSER_EXECUTABLE="' . WORKING_DIR . '/runtime/composer.phar"');
}
}
$this->registerCommandLoader();

View File

@@ -47,7 +47,7 @@ class Framework
use Singleton;
/** @var int 版本ID */
public const VERSION_ID = 725;
public const VERSION_ID = 726;
/** @var string 版本名称 */
public const VERSION = '3.2.4';