Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Enumhancer Ide Helper

Enumhancer Ide Helper Laravel Package

henzeb/enumhancer-ide-helper

Laravel IDE helper for enhanced PHP enums. Improves autocompletion and type hints for Enumhancer features in PhpStorm and similar IDEs, generating stubs/metadata so enum methods, cases, and helpers are easier to discover and use.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Enumhancer Ide Helper
How does this package improve IDE support for enums in Laravel?
It generates IDE-helper classes that provide autocompletion and type hints for PHP 8.1+ enums, making enum cases, methods, and Enumhancer features (like custom helpers) instantly discoverable in PhpStorm or VSCode without runtime overhead.
Will this work with Laravel 9+ and PHP 8.1+?
Yes, the package is fully compatible with Laravel 9+ and PHP 8.1+, as these versions natively support enums. No additional setup is required beyond installation.
Do I need to manually configure Laravel or Composer for this?
No configuration is needed for Laravel itself. Add the package as a dev dependency, then run `composer dump-autoload` to trigger helper generation. Optionally, add a `post-autoload-dump` script in `composer.json` for automation.
What if my team uses VSCode instead of PhpStorm?
The package works with both PhpStorm and VSCode (via PHP Intelephense). It enhances autocompletion for enums, but VSCode’s native support may vary slightly—test with your setup to confirm improvements.
Can this handle enums with custom methods or `__toString()`?
Yes, the generated helpers include metadata for custom enum methods and magic properties like `__toString()`. However, test edge cases (e.g., dynamic behavior) to ensure IDE hints match runtime behavior exactly.
Is there a performance impact during development?
The package adds a one-time code generation step (e.g., during `composer dump-autoload`). For projects with many enums, monitor CI/CD timing, but the impact is negligible for local development.
How do I handle generated files in version control?
Generated files should be excluded from `.gitignore` and regenerated in CI or locally. Document this workflow in your team’s setup to avoid conflicts when enums evolve.
What if my project uses AGPL-licensed dependencies?
This package is AGPL-3.0, which is viral. If your project is proprietary, evaluate alternatives like `spatie/enum` or `myclabs/php-enum` to avoid license conflicts.
Does this replace Enumhancer’s runtime features?
No, this package only generates IDE helper files. It doesn’t modify runtime behavior—Enumhancer’s core features (e.g., enum extensions) remain unchanged.
How do I test if the helpers work correctly?
Verify by creating a test enum with custom methods, then check if your IDE shows autocompletion for cases/methods. Compare IDE hints with runtime behavior to catch discrepancies.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky