- How do I install imanghafoori/smart-realtime-facades in a Laravel app?
- Install it as a dev dependency with composer require --dev imanghafoori/smart-realtime-facades, then run the package's generation command or let its Composer post-autoload hook produce the IDE metadata. Because it is a developer-experience layer rather than runtime infrastructure, it should not be a production dependency. Budget roughly a half-day spike to confirm auto-discovery, generation, and clean output in your environment.
- Does it work with Laravel 11 and Laravel 12?
- Support is unverified. The last release was February 2023, which predates Laravel 11 and 12 as well as PHP 8.3 and 8.4. Laravel 9 and 10 on PHP 8.1 or 8.2 is the confidently supported envelope. Test generation against the Laravel 11+ skeleton, including bootstrap/app.php and restructured service providers, before adopting.
- What PHP versions does the package support?
- The validated combination is PHP 8.1 or 8.2 alongside Laravel 9 or 10. PHP 8.3 and 8.4 are not covered by the last release, so treat them as untested. Run the generation command during your spike and check for deprecation notices or fatal errors before rolling it out to a team.
- Should I install it with --dev?
- Yes. It is a developer tooling layer, so require-dev is the correct posture and the worst-case failure mode is degraded IDE autocompletion, not a production outage. Confirm the service provider stays dev-only and is excluded from the production autoloader. Removal is a single composer remove --dev with zero product impact.
- How is it different from Laravel's built-in real-time facades?
- Laravel already let you reference a class through the Facades namespace and call it statically, but the IDE has no static methods to complete against, so every call is a red squiggle and a typo risk. This package closes that gap by generating static metadata, such as helper or stub classes and annotations, so PhpStorm and VS Code can resolve those calls. It is additive tooling that sits beside the framework and introduces no new runtime abstraction.
- Does it conflict with laravel-ide-helper or JetBrains Laravel Idea?
- They occupy adjacent territory: barryvdh/laravel-ide-helper and JetBrains Laravel Idea already solve similar autocompletion problems. Running two generators over the same symbols can produce duplicate or contradictory annotations, and that noise quickly trains developers to ignore the IDE. Pick one approach per project rather than stacking them.
- Does it reflect real container bindings or emit declared placeholders?
- That is the key spike question, and the assessment flags it as unresolved without testing. If the metadata is reflected from actual container bindings, it stays accurate and self-heals as bindings change. If it is developer-declared, it behaves like documentation with a compiler and will drift. Verify by binding an interface to an implementation and checking what autocompletes.
- Do I need to commit the generated facade files to git?
- The generated helper or stub file must be either committed or gitignored, and that decision has team-wide consequences either way. Committing keeps every IDE consistent and makes changes diffable in CI; gitignoring means each developer regenerates locally and drift becomes possible. Also confirm generation is deterministic and CI-safe, with proper exit codes, no network access, and no spurious diffs.
- Is the package actively maintained and safe to adopt?
- It is MIT licensed, single-maintainer, has around 33 stars, zero dependents, and no release since February 2023, so abandonment is the base case rather than a tail risk. That is tolerable for dev-only tooling where the blast radius is limited, but it is a poor reason to place it in production. Treat it as a reversible developer dependency and plan to remove it if it stops generating cleanly.
- Can I get the same autocompletion without adding this dependency?
- Possibly. A hand-written @method stub block or JetBrains Laravel Idea can deliver a large share of the value with no extra dependency. The package's advantage is automating metadata for many facades across a large codebase. If you only use a handful of real-time facades, weigh that convenience against the staleness and single-maintainer risk.