swoole/ide-helper
IDE stub files for the Swoole PHP extension, providing accurate autocompletion and type hints in supported IDEs. Install via Composer (prod or dev) or track master for latest stubs. Includes notes on key Swoole php.ini directives and short names.
Architecture fit: Highly conditional - only relevant for Laravel projects actively using Swoole (e.g., Swoole-based HTTP servers, async workloads, or frameworks like Hyperf). For standard Laravel applications without Swoole integration, it provides zero architectural value. Strictly a development-time tool with no runtime footprint.
Integration feasibility: High. Simple Composer installation (composer require --dev swoole/ide-helper). Modern IDEs (PHPStorm, VSCode with Intelephense) automatically consume stubs without code changes.
Technical risk: Moderate. Primary risks include version mismatches between stubs and installed Swoole extension (causing incorrect autocompletion), IDE configuration issues (e.g., excluded vendor paths), and use_shortname misalignment between IDE hints and runtime settings.
Key questions:
vendor/swoole/ide-helper?Stack fit: Purely a development tooling dependency. No runtime code or server configuration changes required. Works identically across all Laravel stack configurations (Laravel Valet, Docker, production servers) since it only affects IDEs.
Migration path: Add to composer.json as dev dependency (composer require --dev swoole/ide-helper:^6.0). Verify Swoole extension version (php -r 'echo swoole_version();'), then match IDE helper version to it. No application code modifications needed.
Compatibility: Fully compatible with PHPStorm, VSCode (Intelephense), and other modern IDEs that support PHP stubs. Requires no framework-specific adjustments. Works seamlessly with Swoole-based Laravel implementations (e.g., swoole/http-server integration) but is irrelevant for non-Swoole Laravel setups.
Sequencing:
Maintenance: Minimal overhead. Requires only version alignment when upgrading Swoole extension (e.g., upgrading Swoole to 6.0.2 → update IDE helper to ^6.0.2). No ongoing operational tasks.
Support: Community-driven via Swoole's Discord and GitHub issues. No official enterprise support. Relies on Swoole core team for stub updates.
Scaling: Zero impact. The package adds ~2MB of stub files (excluded from production deployments via --dev flag). No performance, memory, or concurrency implications.
Failure modes:
swoole.use_shortname enabled in IDE but disabled in runtime (or vice versa) causing false positives@dev stubs against stable Swoole extensionbarryvdh/laravel-ide-helper) will onboard instantly. New developers need basic education on:new Swoole\Server( and check parameter hints)How can I help you explore Laravel packages today?