chore(messaging): exclude Swoole coroutine polyfill from PHPStan

The test polyfill declares stand-in Swoole\Coroutine and Swoole\Coroutine\Channel
classes behind a runtime extension check. PHPStan ignores the guard and parsed
those minimal declarations, shadowing the real swoole/ide-helper stubs and
reporting false 'undefined static method' errors codebase-wide (e.g. getContext,
join, create, Channel::close in app/realtime.php). Exclude the polyfill from
analysis so the ide-helper stubs are used. Verified: Checks/Analyze clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake BarnbyandClaude Opus 4.8 committed 2026-06-03 04:58:52 +12:00
1 parent c5551258fe
commit 977cbd41da
1 file changed
+4
+4
View File
@@ -12,3 +12,7 @@ parameters:
- vendor/swoole/ide-helper
excludePaths:
- tests/resources
# Declares stand-in Swoole\Coroutine and Swoole\Coroutine\Channel classes guarded by a runtime
# extension check. PHPStan ignores that guard, so analysing this file would shadow the real Swoole
# ide-helper stubs and report false "undefined method" errors across the codebase (e.g. app/realtime.php).
- tests/unit/Messaging/SwooleCoroutinePolyfill.php