- What does huangdijia/laravel-redis-ide-helper do?
- It is a developer-experience package for Laravel that generates IDE autocompletion metadata for the Redis facade. The generated PHPDoc or stub output describes dynamic Redis commands and connection methods so editors and static analysers can resolve them. It does not change Redis runtime behavior or add production request-path code.
- How do I install laravel-redis-ide-helper in a Laravel app?
- Install it as a development dependency with composer require --dev huangdijia/laravel-redis-ide-helper. Then run the package's generator command as documented in its README for your tagged version. Commit the generated metadata or regenerate it locally according to your team's IDE workflow.
- Should laravel-redis-ide-helper be in require-dev, and is it safe for production?
- It belongs in require-dev because it is tooling for editor and static-analysis support, not a runtime library. Production installs that use composer install --no-dev will not include it, which is the intended posture. Keep generated stubs out of the request path and treat stale stubs as an IDE-noise issue rather than a production incident.
- Which Laravel and PHP versions are supported by v4.0.0-beta.1?
- The v4.0.0-beta.1 release notes do not document the supported Laravel and PHP matrix. Inspect composer.json at the beta tag for the PHP and illuminate/* constraints, and compare them with v3.0.5 if you need to know what was dropped. Do not assume v3 compatibility until you verify those constraints and the generator behavior.
- Does laravel-redis-ide-helper generate signatures for both phpredis and predis?
- The package is intended to expose Redis facade signatures for the Redis client your Laravel app configures. Because v4 beta changes are undocumented, confirm whether it still generates signatures for both phpredis and predis by running it with your redis.client setting and diffing the output. If your project standardises on one client, test that path specifically.
- How do I regenerate the Redis IDE helper metadata after upgrading Laravel?
- Run the package's generator command again after upgrading Laravel, Redis, or the helper package itself, then diff the generated output against the previous version. The generator reflects over facade and Redis manager internals, so minor Laravel upgrades can change signatures. If you commit stubs, include regeneration or a diff check in your development workflow.
- Can I configure the generated Redis IDE helper stub location or namespace?
- Check the README and source for your exact tagged version to see whether the generated file location or namespace is configurable. A v4 major bump may change the output path, namespace, or format, which would invalidate committed stubs and IDE or CI configuration. Treat any such change as breaking and verify it before promoting the beta.
- How do I verify Redis facade autocompletion works in PhpStorm or PHPStan?
- Make sure the generated metadata file is indexed by your IDE and not excluded; in PhpStorm, confirm it is treated as a source or stub file. For PHPStan or similar tools, add the generated file to the analysed or scanned paths if needed. A quick check is typing Redis::get or another dynamic command and confirming the signature resolves.
- What alternatives exist to laravel-redis-ide-helper?
- Alternatives include the general barryvdh/laravel-ide-helper package, manually maintained PHPDoc stubs, typed Redis client wrappers, or client-specific stub packages. This package is narrower because it targets Laravel's Redis facade dynamic methods. Choose it when Redis facade autocompletion is the specific gap you need to close.
- Should I upgrade to v4.0.0-beta.1 when the changelog is empty?
- Do not upgrade on the strength of an empty changelog; keep constrained to v3.0.5 unless you have verified the beta. Run v4.0.0-beta.1 in a short-lived branch, regenerate stubs, diff the output, and read the source diff between v3.0.5 and the beta tag. Promote only if the dependency constraints match your Laravel floor and the generated output change is acceptable.