diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08f3fb891..279278134 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/src/Components/grpc/src/Middleware/ActionMiddleware.php b/src/Components/grpc/src/Middleware/ActionMiddleware.php index 4266e1d78..b6e626514 100644 --- a/src/Components/grpc/src/Middleware/ActionMiddleware.php +++ b/src/Components/grpc/src/Middleware/ActionMiddleware.php @@ -218,6 +218,10 @@ private function prepareActionParams(Request $request, RouteResult $routeResult) $headers[$name] = implode(', ', $values); } } + else + { + $allData = []; + } /** @var ActionMethodItem[] $actionMethodCache */ foreach ($actionMethodCache as $actionMethodCacheItem) diff --git a/src/Components/swoole/tests/unit/Component/config/config.php b/src/Components/swoole/tests/unit/Component/config/config.php index 7e2aaabfc..07837ab1d 100644 --- a/src/Components/swoole/tests/unit/Component/config/config.php +++ b/src/Components/swoole/tests/unit/Component/config/config.php @@ -16,8 +16,9 @@ 'Imi\Swoole\Test\Component\Async', 'Imi\Swoole\Test\Component\Pool', ], - // 'ignoreNamespace' => [ - // ], + 'ignorePaths' => [ + \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'test.php', + ], // 组件命名空间 'components' => [ diff --git a/src/Server/Http/Middleware/ActionMiddleware.php b/src/Server/Http/Middleware/ActionMiddleware.php index 85ba1446d..26584a72c 100644 --- a/src/Server/Http/Middleware/ActionMiddleware.php +++ b/src/Server/Http/Middleware/ActionMiddleware.php @@ -204,6 +204,10 @@ private function prepareActionParams(Request $request, RouteResult $routeResult) $headers[$name] = implode(', ', $values); } } + else + { + $allData = []; + } /** @var ActionMethodItem[] $actionMethodCache */ foreach ($actionMethodCache as $actionMethodCacheItem) diff --git a/src/Util/DocBlock.php b/src/Util/DocBlock.php index e454bf7a2..295190c9c 100644 --- a/src/Util/DocBlock.php +++ b/src/Util/DocBlock.php @@ -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;