Compare commits

...

6 Commits
2.8.3 ... 2.8.4

Author SHA1 Message Date
Github Build Bot
1ebcfa8e7e increment build number (build 478) 2022-08-07 05:19:10 +00:00
Github Build Bot
3edab143c3 update api docs 2022-08-07 05:19:09 +00:00
crazywhalecc
9cd5f24d2f update docs 2022-08-07 13:18:18 +08:00
crazywhalecc
34919afb36 bump version to 2.8.4 2022-08-07 13:18:18 +08:00
crazywhalecc
6282da4972 fix zm_sleep float bug and add test 2022-08-07 13:18:18 +08:00
crazywhalecc
de4748860c update default install php version 2022-08-06 10:23:53 +08:00
8 changed files with 23 additions and 5 deletions

View File

@@ -1 +1 @@
module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/GoCqhttpAPIV11","ZM/API/ZMRobot","ZM/API/CQ","ZM/API/TuringAPI","ZM/API/OneBotV11"]},{"title":"ZM/API/Proxies/Bot","collapsable":true,"children":["ZM/API/Proxies/Bot/AbstractBotProxy","ZM/API/Proxies/Bot/AllGroupsProxy","ZM/API/Proxies/Bot/AllBotsProxy"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Module","collapsable":true,"children":["ZM/Command/Module/ModulePackCommand","ZM/Command/Module/ModuleListCommand"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/WorkerContainer","ZM/Container/BoundMethod"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/DeleteBody","ZM/DB/UpdateBody","ZM/DB/InsertBody","ZM/DB/DB","ZM/DB/Table","ZM/DB/SelectBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventTracer","ZM/Event/EventDispatcher","ZM/Event/EventManager"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnTask","ZM/Event/SwooleEvent/OnMessage"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModulePacker","ZM/Module/ModuleUnpacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLConnection","ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLStatement","ZM/MySQL/MySQLStatementWrapper"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/LightCache","ZM/Store/ZMAtomic","ZM/Store/LightCacheInside"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/MessageUtil","ZM/Utils/Terminal","ZM/Utils/ReflectionUtil","ZM/Utils/HttpUtil","ZM/Utils/DataProvider","ZM/Utils/ZMUtil","ZM/Utils/SignalListener","ZM/Utils/CommandInfoUtil","ZM/Utils/CoMessage"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/WorkerManager"]}]
module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/OneBotV11","ZM/API/GoCqhttpAPIV11","ZM/API/ZMRobot","ZM/API/TuringAPI"]},{"title":"ZM/API/Proxies/Bot","collapsable":true,"children":["ZM/API/Proxies/Bot/AllGroupsProxy","ZM/API/Proxies/Bot/AbstractBotProxy","ZM/API/Proxies/Bot/AllBotsProxy"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Module","collapsable":true,"children":["ZM/Command/Module/ModulePackCommand","ZM/Command/Module/ModuleListCommand"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/WorkerContainer","ZM/Container/BoundMethod"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/Table","ZM/DB/DB","ZM/DB/SelectBody","ZM/DB/InsertBody","ZM/DB/DeleteBody","ZM/DB/UpdateBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventTracer","ZM/Event/EventManager","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnMessage","ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModuleUnpacker","ZM/Module/ModulePacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLConnection","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatement"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/LightCache","ZM/Store/ZMAtomic","ZM/Store/LightCacheInside"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/CoMessage","ZM/Utils/ReflectionUtil","ZM/Utils/Terminal","ZM/Utils/HttpUtil","ZM/Utils/DataProvider","ZM/Utils/ZMUtil","ZM/Utils/SignalListener","ZM/Utils/CommandInfoUtil","ZM/Utils/MessageUtil"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/WorkerManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/CronManager"]}]

View File

@@ -4,6 +4,10 @@
同时此处将只使用 build 版本号进行区分。
## build 478 (2022-8-7)
- 修复 `zm_sleep()` 无法传入小数的 Bug (#141)
## build 477 (2022-8-5)
- 修复了 `@CQNotice``@CQRequest` 注解无法正常激活的 Bug (#140)

View File

@@ -1,5 +1,11 @@
# 更新日志v2 版本)
## v2.8.4build 478
> 更新时间2022.8.7
- 修复 `zm_sleep()` 无法传入小数的 Bug (#141)
## v2.8.3build 477
> 更新时间2022.8.5

View File

@@ -49,7 +49,7 @@ function download_file() {
# 安装下载内建PHP
function install_native_php() {
ZM_PHP_VERSION="8.0"
ZM_PHP_VERSION="8.1"
if [ "$ZM_DOWN_PHP_VERSION" != "" ]; then
ZM_PHP_VERSION="$ZM_DOWN_PHP_VERSION"
fi

View File

@@ -28,9 +28,9 @@ use ZM\Exception\InitException;
class ConsoleApplication extends Application
{
public const VERSION_ID = 477;
public const VERSION_ID = 478;
public const VERSION = '2.8.3';
public const VERSION = '2.8.4';
private static $obj;

0
src/ZM/Framework.php Executable file → Normal file
View File

View File

@@ -279,9 +279,10 @@ function get_onebot_target_id_name(string $message_type): string
*
* 与 {@link sleep()} 一致,只是增加了协程支持
*
* @param float|int $seconds 秒数支持到1ms0.001
* @since 2.7.3 此函数不再返回 true
*/
function zm_sleep(int $seconds = 1): void
function zm_sleep($seconds = 1): void
{
if (Coroutine::getCid() !== -1) {
System::sleep($seconds);

View File

@@ -76,4 +76,11 @@ class GlobalFunctionsTest extends TestCase
{
$this->assertEquals(['code' => 0, 'signal' => 0, 'output' => "foo\n"], zm_exec('echo foo'));
}
public function testZmSleep(): void
{
$starttime = microtime(true);
zm_sleep(0.001);
$this->assertGreaterThanOrEqual(0.001, microtime(true) - $starttime);
}
}