Skip to content

Commit

Permalink
修复测试 (imiphp#696)
Browse files Browse the repository at this point in the history
* 修复 Swoole 测试的 Event::wait() 警告报错 (imiphp#693)

* 修复 Swoole 测试的 Event::wait() 警告报错

* 修复测试

* 修复测试

* 修复测试

* 修复测试

* 修复测试
  • Loading branch information
Yurunsoft authored May 2, 2024
1 parent f687b08 commit f358cfd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ jobs:
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "6.x"
# MacOS Arm64 下需要下面的修复,否则无法编译成功
- name: Fix include
run: |
sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
- name: Get Openssl Dir
id: opecssl-dir
run: echo "path=$(brew --prefix openssl@1.1)" >> $GITHUB_OUTPUT
Expand Down
4 changes: 4 additions & 0 deletions src/Components/grpc/src/Middleware/ActionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ private function prepareActionParams(Request $request, RouteResult $routeResult)
$headers[$name] = implode(', ', $values);
}
}
else
{
$allData = [];
}

/** @var ActionMethodItem[] $actionMethodCache */
foreach ($actionMethodCache as $actionMethodCacheItem)
Expand Down
5 changes: 3 additions & 2 deletions src/Components/swoole/tests/unit/Component/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
'Imi\Swoole\Test\Component\Async',
'Imi\Swoole\Test\Component\Pool',
],
// 'ignoreNamespace' => [
// ],
'ignorePaths' => [
\dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'test.php',
],

// 组件命名空间
'components' => [
Expand Down
4 changes: 4 additions & 0 deletions src/Server/Http/Middleware/ActionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ private function prepareActionParams(Request $request, RouteResult $routeResult)
$headers[$name] = implode(', ', $values);
}
}
else
{
$allData = [];
}

/** @var ActionMethodItem[] $actionMethodCache */
foreach ($actionMethodCache as $actionMethodCacheItem)
Expand Down
3 changes: 2 additions & 1 deletion src/Util/DocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public static function getFactory(): DocBlockFactory
{
if (null === self::$factory)
{
self::$factory = DocBlockFactory::createInstance();
// @phpstan-ignore-next-line
return self::$factory = DocBlockFactory::createInstance();
}

return self::$factory;
Expand Down

0 comments on commit f358cfd

Please sign in to comment.