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

Enum Laravel Package

spatie/enum

Obsolete: PHP 8.1+ has native enums (recommended). Spatie Enum provides strongly typed, object-based enums for older PHP versions, enabling IDE-friendly static analysis and refactoring. Define enums via @method annotations and call StatusEnum::draft().

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Not applicable for new projects (PHP ≥8.1) due to native enum support in PHP core
  • Legacy systems on PHP <8.1 may retain it temporarily but must prioritize migration planning
  • Key decision: actively avoid adoption for any new development; native enums eliminate dependency overhead and align with PHP's official standards
  • Roadmap impact: this package represents technical debt for any modern stack; maintenance efforts should focus on migrating existing usage to native enums

When to Consider This Package

  • Only for legacy codebases running PHP <8.1 where upgrading is currently impossible (e.g., constrained by third-party dependencies)
  • If existing codebase already uses this package and migration cost exceeds immediate business value
  • Never for new projects, PHP 8.1+ environments, or any scenario where PHP version control is possible
  • Look elsewhere for all modern applications: native PHP enums (8.1+) provide identical functionality with better performance, zero dependencies, and official support

How to Pitch It (Stakeholders)

Executives: "This package is obsolete. PHP 8.1+ includes native enums that deliver identical functionality without extra dependencies, reducing maintenance costs and technical debt. Adopting native enums future-proofs our codebase, eliminates vendor lock-in, and aligns with industry standards. We recommend migrating existing usage immediately to avoid unnecessary overhead."

Engineering: "Native PHP enums (8.1+) are now the standard implementation. This package adds no value for modern PHP versions—it's redundant, increases dependency surface area, and complicates maintenance. Migrate all existing enum usage to native implementations: it requires minimal code changes, removes a dependency, and leverages PHP's built-in type safety and IDE support."

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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope