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

Php Enum Laravel Package

marc-mabe/php-enum

Native PHP enum implementation via an abstract base class. Extend it to define enumerations from public constants (supports scalars, null, and arrays), create and compare enum instances, and keep a strict set of named values for safer domain modeling.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit is marginal due to Laravel 8+ having native enum support via BackedEnum and Stringable interfaces, making this package largely redundant for modern Laravel applications. For legacy Laravel versions (<8), it could provide enum functionality but requires manual integration with Eloquent casting. Integration feasibility is high for Composer installation but low for seamless compatibility with Laravel's built-in enum features. Technical risks include zero dependents (indicating low community adoption), potential singleton pattern conflicts with Laravel's container, and serialization issues requiring explicit trait usage. Key questions: Does the project use Laravel >=8? If yes, why not leverage native enums? How will this interact with Eloquent's enum casting? What's the migration path for existing enum constants?

Integration Approach

Stack fit is poor for modern Laravel due to overlapping functionality with Laravel's native enum system. Laravel's built-in enums handle database casting, validation, and type safety more robustly without third-party dependencies. Migration path would require replacing existing enum constants with this package's implementation, but it's strongly recommended to migrate to Laravel's native enums instead (via enum casting in models). Compatibility is questionable

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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
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