Skip to content

Commit 9cd3f9a

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents a5b9260 + 5e3397e commit 9cd3f9a

File tree

12 files changed

+21
-14
lines changed

12 files changed

+21
-14
lines changed

.github/workflows/build-release-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup PHP
2020
uses: sunxyw/workflows/setup-environment@main
2121
with:
22-
php-version: 8.0
22+
php-version: 8.1
2323
php-extensions: swoole, posix, json
2424
operating-system: ubuntu-latest
2525
use-cache: true

.github/workflows/coding-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup PHP
3535
uses: sunxyw/workflows/setup-environment@main
3636
with:
37-
php-version: 8.0
37+
php-version: 8.1
3838
php-extensions: swoole, posix, json
3939
operating-system: ubuntu-latest
4040
use-cache: true

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup PHP
3535
uses: sunxyw/workflows/setup-environment@main
3636
with:
37-
php-version: 8.0
37+
php-version: 8.1
3838
php-extensions: swoole, posix, json
3939
operating-system: ubuntu-latest
4040
use-cache: true

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
matrix:
3535
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
36-
php-version: [ 8.0, 8.1, 8.2 ]
36+
php-version: [ 8.1, 8.2, 8.3, 8.4 ]
3737
name: PHP ${{ matrix.php-version }} Test (${{ matrix.operating-system }})
3838
runs-on: ${{ matrix.operating-system }}
3939
timeout-minutes: 10

.php-cs-fixer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
'php_unit_test_class_requires_covers' => false,
6969
'fully_qualified_strict_types' => false,
7070
'new_with_parentheses' => false,
71+
'operator_linebreak' => false,
72+
'php_unit_data_provider_method_order' => false,
7173
])
7274
->setFinder(
7375
PhpCsFixer\Finder::create()

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"jangregor/phpstan-prophecy": "^1.0",
4040
"jetbrains/phpstorm-attributes": "^1.0",
4141
"mikey179/vfsstream": "^1.6",
42-
"phpspec/prophecy-phpunit": "^2.0",
42+
"phpspec/prophecy-phpunit": "^2.3",
4343
"phpstan/extension-installer": "^1.1",
4444
"phpstan/phpstan": "^1.1",
4545
"phpstan/phpstan-deprecation-rules": "^1.0",
@@ -99,7 +99,7 @@
9999
},
100100
"scripts": {
101101
"analyse": "phpstan analyse --memory-limit 300M",
102-
"cs-fix": "PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix",
102+
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
103103
"test": "bin/phpunit-zm --no-coverage"
104104
}
105105
}

docs/.vuepress/public/doxy/class_z_m_1_1_framework.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
</table><table class="memberdecls">
132132
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
133133
成员变量</h2></td></tr>
134-
<tr class="memitem:a835ac83b0f0a2c196532f370dc585aa0"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_m_1_1_framework.html#a835ac83b0f0a2c196532f370dc585aa0">VERSION_ID</a> = 724</td></tr>
134+
<tr class="memitem:a835ac83b0f0a2c196532f370dc585aa0"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_m_1_1_framework.html#a835ac83b0f0a2c196532f370dc585aa0">VERSION_ID</a> = 725</td></tr>
135135
<tr class="separator:a835ac83b0f0a2c196532f370dc585aa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
136136
<tr class="memitem:af71005841ce53adac00581ab0ba24c1f"><td class="memItemLeft" align="right" valign="top">const&#160;</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>
137137
<tr class="separator:af71005841ce53adac00581ab0ba24c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -522,7 +522,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a835ac83b0f0a2c196532f370
522522
<div class="memproto">
523523
<table class="memname">
524524
<tr>
525-
<td class="memname">const VERSION_ID = 724</td>
525+
<td class="memname">const VERSION_ID = 725</td>
526526
</tr>
527527
</table>
528528
</div><div class="memdoc">

src/ZM/Bootstrap/HandleExceptions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function bootstrap(RuntimePreferences $preferences): void
2020
E_USER_ERROR => ['PHP Error: ', 'error'],
2121
E_USER_WARNING => ['PHP Warning: ', 'warning'],
2222
E_USER_NOTICE => ['PHP Notice: ', 'notice'],
23-
E_STRICT => ['PHP Strict: ', 'notice'],
2423
E_RECOVERABLE_ERROR => ['PHP Recoverable Error: ', 'error'],
2524
E_DEPRECATED => ['PHP Deprecated: ', 'notice'],
2625
E_USER_DEPRECATED => ['PHP User Deprecated: ', 'notice'],
@@ -30,7 +29,7 @@ public function bootstrap(RuntimePreferences $preferences): void
3029
logger()->{$level_tip[1]}($error);
3130
// 如果 return false 则错误会继续递交给 PHP 标准错误处理
3231
return true;
33-
}, E_ALL | E_STRICT);
32+
});
3433

3534
// 重载异常处理器
3635
ExceptionHandler::getInstance()->overrideWith(new Handler());

src/ZM/Command/ProxyServerCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ public function onSocksMessage($connection, $buffer)
262262
break;
263263
case CMD_UDP_ASSOCIATE:
264264
$connection->stage = STAGE_UDP_ASSOC;
265-
var_dump('CMD_UDP_ASSOCIATE ' . ($this->config['udp_port'] ?? 2222));
266265
if ($this->config['udp_port'] == 0) {
267266
$connection->udpWorker = new Worker('udp://0.0.0.0:0');
268267
/* @phpstan-ignore-next-line */
@@ -274,7 +273,7 @@ public function onSocksMessage($connection, $buffer)
274273
$listenInfo = stream_socket_get_name($connection->udpWorker->getMainSocket(), false);
275274
[$bind_addr, $bind_port] = explode(':', $listenInfo);
276275
} else {
277-
$bind_port = $this->config['udp_port'] ?? 2222;
276+
$bind_port = $this->config['udp_port'];
278277
}
279278
$bind_addr = $this->config['wanIP'] ?? '192.168.1.1';
280279

src/ZM/ConsoleApplication.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ public function __construct(string $name = 'zhamao-framework')
3232
// 初始化 Composer 变量
3333
if (file_exists(WORKING_DIR . '/runtime/composer.phar')) {
3434
echo '* Using native composer' . PHP_EOL;
35-
putenv('COMPOSER_EXECUTABLE=' . WORKING_DIR . '/runtime/composer.phar');
35+
if (WORKING_DIR . '/runtime/php' === PHP_BINARY) {
36+
putenv('COMPOSER_EXECUTABLE="' . WORKING_DIR . '/runtime/php ' . WORKING_DIR . '/runtime/composer.phar"');
37+
} else {
38+
putenv('COMPOSER_EXECUTABLE="' . WORKING_DIR . '/runtime/composer.phar"');
39+
}
3640
}
3741

3842
$this->registerCommandLoader();

0 commit comments

Comments
 (0)