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

Laravel Casts Laravel Package

genealabs/laravel-casts

GeneaLabs Laravel Casts adds flexible custom attribute casting to Eloquent models, making it easy to map database columns to value objects, DTOs, and other PHP classes. Keeps model code clean and cast logic reusable, testable, and simple to configure.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on the form-markup layer. The package's actual value proposition — collapsing a repeated label/input/error/wrapper block into a single Blade call — has been a first-party Laravel capability since Blade components shipped (<x-input> with @props). That reframes the decision from "is this dependency worth it?" to "does it do anything the framework doesn't?" On a modern stack, no. The package remains useful as a reference for macro structure, not as something to depend on.
  • Feature and velocity trade-offs. The honest upside is real but small: a handful of macros that save a few lines per field on boilerplate-heavy admin CRUD forms. The PM question is whether that saving is worth permanent stewardship of an abandoned package. A single macro is typically tens of lines of string building; a wrapped Blade component is less. Velocity gained is measured in an afternoon; velocity lost is measured in every future framework bump.
  • Roadmap and tech-debt triage. Archived repository, final release February 2024, 109 stars, zero dependents, opportunity score 19.22. If it is in the stack, this assessment justifies scheduling replacement in the next maintenance window rather than waiting for a Laravel or PHP upgrade to force it. If it is not in the stack, the decision is a one-liner: no.
  • Risk allocation and ownership. Adopting an archived package means we own compatibility, security review, and upgrade work in perpetuity, with no upstream to file against and no patch path. The breakage mode is the worst kind — silent divergence in rendered HTML after a framework upgrade, discovered in a form submission rather than a stack trace.
  • Security surface ownership. Labels, placeholders, and attribute arrays funnel into string concatenation. Escaping must be verified by us, not assumed, and no security release is coming. That is a standing review obligation, not a one-time check.
  • Use-case fit. It maps narrowly to internal or admin domains with a small, stable set of fields, on an aging codebase, where nobody wants to hand-write the same eight blocks. It does not map to customer-facing forms, payment flows, or anything compliance-adjacent.
  • Diligence flag: the package's own identity is inconsistent. The repository listing and changelog (0.13.3 — "label on Tel field") describe Blade form macros; a separate description.md describes an Eloquent custom-cast layer for value objects. For a PM this is a finding, not a footnote: when a dependency's own metadata cannot tell you what it does, the due-diligence surface has already failed. Treat the release notes as authoritative (form macros) and verify src/ and composer.json before any decision — do not decide off the listing, and do not adopt it on the strength of the casting description.

When to Consider This Package

Consider it only under narrow, usually legacy, conditions:

  • You are already using it. Existing applications can keep the version pinned exactly at 0.13.3 (the Tel label fix; anything earlier renders tel fields wrong) while migration is scoped. Treat it as frozen, not supported.
  • You are on a pre-Laravel-7 codebase without Blade components or native custom casts, and you need form helpers or value-object mapping now.
  • The surface is small and stable — a handful of fields, no expectation of new ones, no security-sensitive or compliance-adjacent data flowing through them.
  • You are willing to wrap every macro in a project-owned partial so the dependency becomes a file swap rather than an architectural commitment. This is the single highest-leverage habit with this package.
  • You are reading the source once as a reference before writing your own macros. A legitimate, one-time use.

Look elsewhere when any of the following is true:

  • You are on Laravel 7 or later. Blade components and native custom casts cover this category; a third-party dependency is not justified.
  • Greenfield work of any kind. An archived dependency that duplicates a first-party capability is indefensible on a new build.
  • The data is customer-facing, financial, identity, phone, address, or compliance-adjacent — precisely where the value-object angle matters most is where an unmaintained layer is least acceptable. Use propaganistas/laravel-phone, moneyphp/money, or native CastsAttributes behind a boundary you control.
  • This package would be what drags laravelcollective/html into the graph. That dependency is archived too. If it is already present and pinned for other reasons, the marginal cost is lower; if not, write the macros yourself. Run composer why laravelcollective/html before proceeding.
  • You want PHP-built form markup specifically. Use spatie/laravel-html, which is actively maintained.

How to Pitch It (Stakeholders)

For executives: This is a small, abandoned utility package — 109 stars, zero dependents, no release since February 2024 — that saves a modest amount of repetitive template code. The framework now does the same job natively. There is no licensing cost (MIT), but there is a permanent ownership cost: every future Laravel or PHP upgrade becomes our work item with nobody upstream to fix it. Recommendation: no new adoption; if it is already in the stack, schedule a scoped removal in the next maintenance window rather than waiting for an upgrade to force it. First, confirm what we actually have — the package's own listing and documentation describe two different products, so a short source review precedes any decision.

For engineering: Treat this as frozen. Pin exactly 0.13.3, wrap every macro call in a project-owned partial so call sites survive the removal, and keep one HTML-assertion feature test per form using it — that suite is the only compatibility signal we will get. Verify three things on first use: that labels and attribute values are escaped, that old() repopulation works on a failed validation round-trip, and that the field's error message renders adjacent to the input. Before committing, check the real require block and whether laravelcollective/html comes with it; that library is archived as well and owns Form::open's CSRF and method-spoofing behaviour. Replacement is mechanical: Blade components for markup, native CastsAttributes for any value-object work. The package's description.md is a documentation error, not a feature set — do not use it as grounds for adoption.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast