Weave 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

Eloquent Enum Cast Laravel Package

orkhanahmadov/eloquent-enum-cast

Eloquent Enum Cast lets Laravel Eloquent models cast attributes to native PHP 8 enums. Declare an enum in your model's casts array and read database values as typed enum instances, keeping code type-safe and readable without manual conversion logic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The only signal from release 1.4.0 is a compatibility change: PHP support was reverted back to ^8.0. This indicates the package is a Composer-installed PHP library (with the usual Laravel package conventions assumed but not confirmed by the data). It implies the maintainers previously raised the PHP floor (likely to ^8.1 in an intermediate release) and have now restored ^8.0 compatibility. No architectural or API changes are described, so no inference can be made about service container bindings, facades, config publishing, or middleware behavior.

Integration feasibility: Broadening the PHP constraint to ^8.0 (i.e., >=8.0 <9.0) improves installability across Laravel 8/9-era applications still on PHP 8.0, and remains compatible with 8.1–8.3. This is a low-friction change for consumers who were pinned to an older release because of the prior constraint. However, feasibility cannot be fully confirmed without inspecting the package's composer.json, its transitive dependency constraints, and whether CI actually exercises PHP 8.0.

Technical risk:

  • Support-matrix churn: Dropping then reverting PHP 8.0 support within a short window suggests an unstable compatibility policy. Consumers should treat the support matrix as volatile and pin versions explicitly.
  • EOL runtime encouragement: PHP 8.0 reached end of life in November 2023 and receives no security patches. Re-adding ^8.0 is convenient for legacy estates but should not be read as a recommendation to deploy on 8.0.
  • Constraint vs. code reality: A reverted Composer constraint does not guarantee the codebase is 8.0-clean. If any 8.1+ syntax (enums, readonly properties, first-class callable syntax, pure intersection types) remains, installs will succeed while runtime fatals occur.
  • Semantic ambiguity: "Reverted back" is undocumented in terms of which version introduced the restriction and whether any behavior changed alongside it.

Key questions:

  1. Which prior release dropped PHP 8.0 support, and was that drop accompanied by code changes that remain in 1.4.0?
  2. Does CI run the test suite against PHP 8.0, or is the constraint broadened without coverage?
  3. Are all transitive dependencies still resolvable under PHP 8.0, or can Composer produce a partial/conflicting lock?
  4. Which Laravel major versions are officially supported alongside ^8.0 (Laravel 10+ requires PHP 8.1+, so the practical overlap is Laravel 8/9)?
  5. Is the PHP 8.0 allowance a permanent policy or a temporary accommodation likely to be reverted again?

Integration Approach

Stack fit: The change is relevant only to applications running PHP 8.0. Teams on PHP 8.1, 8.2, or 8.3 see no functional difference from the constraint change, since ^8.0 already admits those versions. For Laravel 10/11 consumers the change is effectively inert, as those framework versions require PHP 8.1+ regardless of the package constraint.

Migration path: Existing consumers on 1.3.x can upgrade to 1.4.0 as a routine minor bump. No data migration, config republish, or API adaptation is indicated. Consumers who had pinned below the PHP-restricting release can now move forward to 1.4.0 without changing their runtime. Validate via composer update --with-dependencies in a non-production branch and confirm the resolved lockfile still targets the intended PHP version.

Compatibility: The ^8.0 constraint spans PHP 8.0–8.4. Verify that the package's Laravel framework constraint and any transitive packages do not themselves require 8.1+, which would make the broadened constraint theoretical rather than usable. Confirm that the package does not depend on extensions or polyfills whose versions differ across the 8.0–8.4 range.

Sequencing:

  1. Read the package's composer.json and CHANGELOG to confirm the exact constraint and identify the release that introduced the drop.
  2. Run the existing application test suite against PHP 8.0 and PHP 8.2 in CI to establish actual behavior, not just resolvability.
  3. Upgrade the package in a staging environment; hold production rollout until the PHP 8.0 job passes (or until the runtime is upgraded).
  4. Pin the package version in composer.json if the support matrix continues to fluctuate.

Operational Impact

Maintenance: The primary operational concern is that re-enabling PHP 8.0 expands the support surface the maintainers must test, while simultaneously making the package usable on an unsupported runtime. Adopters on PHP 8.0 inherit the full EOL security burden regardless of the package's stance. The revert also implies the maintainers may reverse course again, so version pinning and changelog monitoring are warranted.

Support: Support expectations should be set explicitly: the package permitting PHP 8.0 is not the same as the vendor supporting PHP 8.0. Escalation paths for runtime-level PHP 8.0 defects are effectively nonexistent upstream. Internally, document that PHP 8.0 usage is a tolerated legacy state with a defined exit date.

Scaling: No scaling-relevant changes are described. Horizontal scaling, queue throughput, and caching behavior are unaffected by a Composer constraint revert unless the prior restriction had forced consumers onto a materially different package version.

Failure modes:

  • Install-time: Composer dependency resolution failures if a transitive dependency requires PHP 8.1+, producing a confusing partial upgrade.
  • Runtime: Fatal errors on PHP 8.0 if 8.1+ syntax survived the revert, most likely surfacing only on code paths not covered by CI.
  • Governance: Silent divergence between the declared constraint and the tested matrix, allowing untested combinations into production.
  • Security: Prolonged operation on PHP 8.0 without upstream patches; vulnerabilities in the runtime would not be remediated by the package maintainers.

Ramp-up: Minimal. The change requires no developer retraining and no application code changes. Effort is concentrated in verification: one CI matrix addition, one staging upgrade, and a policy decision on whether PHP 8.0 is an acceptable deployment target. Estimated effort is low (hours), contingent on the outcome of the compatibility questions above.

Note: This assessment is the baseline and is derived solely from the 1.4.0 release note. It should be revisited once composer.json, the changelog history, and CI configuration are available.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib