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.
app/Helpers/Enums). Ensure the composer.json autoloader includes this directory.post-autoload-dump in Composer scripts).__toString() or custom methods.spatie/enum) if AGPL is prohibitive.spatie/enum, myclabs/php-enum)?ramsey/enum) if enums are critical.composer.json:
"scripts": {
"post-autoload-dump": "EnumhancerIdeHelper\\Generator::generate"
}
.gitignore (if CI handles regeneration).app/Helpers/Enums/UserStatus.php vs. app/Models/UserStatus.php).php artisan optimize:clear post-install to refresh caches.composer require henzeb/enumhancer-ide-helper.assertSame(UserStatus::ACTIVE->value, 'active')).php artisan make:enum Status).# Add to enum
composer dump-autoload # Triggers generation
"To add a new enum:
php artisan make:enum Name, then regenerate helpers withcomposer dump-autoload."
composer dump-autoload.app/Helpers/Enums/ for errors.| Issue | Owner |
|---|---|
| IDE autocompletion | Developer |
| Generation failures | Backend Engineer |
| Enum logic errors | Business Logic Owner |
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Generation fails silently | Broken IDE support | Add post-autoload-dump to composer.json with --no-dev fallback. |
| IDE cache stale | Outdated enum hints | Document cache-clearing steps. |
| Enum runtime ≠ IDE hints | Developer confusion | Add runtime tests for enum behavior. |
| AGPL license conflict | Legal compliance risk | Evaluate alternatives (e.g., spatie/enum). |
| PHP version mismatch | Package incompatibility | Pin PHP version in composer.json. |
composer.json entry.How can I help you explore Laravel packages today?