mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
9cd3f9accf
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ubuntu-latest
|
||||
use-cache: true
|
||||
|
||||
2
.github/workflows/coding-style.yml
vendored
2
.github/workflows/coding-style.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ubuntu-latest
|
||||
use-cache: true
|
||||
|
||||
2
.github/workflows/static-analysis.yml
vendored
2
.github/workflows/static-analysis.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ubuntu-latest
|
||||
use-cache: true
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
php-version: [ 8.0, 8.1, 8.2 ]
|
||||
php-version: [ 8.1, 8.2, 8.3, 8.4 ]
|
||||
name: PHP ${{ matrix.php-version }} Test (${{ matrix.operating-system }})
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
timeout-minutes: 10
|
||||
|
||||
@ -68,6 +68,8 @@ return (new PhpCsFixer\Config())
|
||||
'php_unit_test_class_requires_covers' => false,
|
||||
'fully_qualified_strict_types' => false,
|
||||
'new_with_parentheses' => false,
|
||||
'operator_linebreak' => false,
|
||||
'php_unit_data_provider_method_order' => false,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"jangregor/phpstan-prophecy": "^1.0",
|
||||
"jetbrains/phpstorm-attributes": "^1.0",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpspec/prophecy-phpunit": "^2.3",
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
@ -99,7 +99,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"analyse": "phpstan analyse --memory-limit 300M",
|
||||
"cs-fix": "PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix",
|
||||
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
|
||||
"test": "bin/phpunit-zm --no-coverage"
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ Public 成员函数</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
成员变量</h2></td></tr>
|
||||
<tr class="memitem:a835ac83b0f0a2c196532f370dc585aa0"><td class="memItemLeft" align="right" valign="top">const </td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_m_1_1_framework.html#a835ac83b0f0a2c196532f370dc585aa0">VERSION_ID</a> = 724</td></tr>
|
||||
<tr class="memitem:a835ac83b0f0a2c196532f370dc585aa0"><td class="memItemLeft" align="right" valign="top">const </td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_m_1_1_framework.html#a835ac83b0f0a2c196532f370dc585aa0">VERSION_ID</a> = 725</td></tr>
|
||||
<tr class="separator:a835ac83b0f0a2c196532f370dc585aa0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af71005841ce53adac00581ab0ba24c1f"><td class="memItemLeft" align="right" valign="top">const </td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_m_1_1_framework.html#af71005841ce53adac00581ab0ba24c1f">VERSION</a> = '3.2.4'</td></tr>
|
||||
<tr class="separator:af71005841ce53adac00581ab0ba24c1f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@ -522,7 +522,7 @@ Protected 属性</h2></td></tr>
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const VERSION_ID = 724</td>
|
||||
<td class="memname">const VERSION_ID = 725</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -49,6 +49,9 @@ class EventProviderTest extends TestCase
|
||||
|
||||
public function testAddEventListenerWithCallableArray(): void
|
||||
{
|
||||
if (PHP_VERSION_ID >= 80400) {
|
||||
$this->markTestSkipped('PHP 8.4.0 has a bug that cannot pass this test');
|
||||
}
|
||||
// no meaning for using ZMUtil, just for testing
|
||||
$event = new ZMUtil();
|
||||
$callback = [$this, 'testAddEventListenerWithCallableArray'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user