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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport