dragon-code/simple-data-transfer-object
dragon-code/simple-data-transfer-object offers a lightweight way to define typed data transfer objects in Laravel and PHP applications, helping you move structured data between layers with less boilerplate and clearer, more predictable code. Ideal for request payloads, API responses, and service bou...
Architecture fit
composer.json constraints before assuming this). Layering an unmaintained wrapper on top of a maintained upstream is a net negative: you inherit two upgrade surfaces and control neither.readonly classes plus constructor property promotion cover 80–90% of what this package provides. The remaining gap is a small hydration trait, not a dependency.Integration feasibility
composer require, but the feasibility question is version resolution, not effort: an archived package will not add Laravel 11/12 or PHP 8.3/8.4 constraint updates, so expect composer update conflicts within one upgrade cycle.#[Attribute]-free casting) will emit PHP 8.2+ deprecations and may hard-fail where error_reporting treats deprecations as errors.spatie/data-transfer-object or spatie/laravel-data, integration is near-zero value and non-trivial conflict risk.Technical risk
opportunity: 7.06 sub-score should be read carefully: in this corpus it is most plausibly a gap signal (low adoption in a genuinely useful category) rather than a quality endorsement. It must not be allowed to offset the archived status.Key questions
spatie/data-transfer-object and over native readonly classes? Diff the feature list, not the README marketing.SECURITY.md or equivalent channel?Carbon/enum casting — the three places hand-rolled DTOs usually fail?Stack fit
readonly classes remove the package's core value proposition.readonly classes with a small internal FromArray/ToArray trait, or adopt spatie/laravel-data if you need validation, transformation, and OpenAPI-ish metadata.Migration path
app/Data/Support/ with the MIT notice preserved. This converts an unmaintained external dependency into internal code you can refactor freely and freezes the supply-chain risk at zero.fromArray, toArray, nested-object recursion, enum/Carbon casting, and a make() factory. This is a half-day of work and eliminates the upgrade question entirely.Compatibility
composer.json require before anything else: php, illuminate/support, and the Spatie constraint are the three lines that determine whether this is installable at all.SerializesModels / queue-payload interaction: DTOs pushed onto queues become a wire contract, and an archived package gives you no guarantees about that contract's stability.composer why-not and a --dry-run install in a scratch branch to surface conflicts before committing to a spike.Sequencing
fromArray(toArray($dto)) identity and explicit handling of missing/null/extra keys before expanding coverage.Maintenance
Support
Scaling
Failure modes
composer update failure after a Laravel or PHP bump — the most likely and most annoying failure; blocks the whole app's upgrade.Ramp-up
make() / from() / toArray() idiom, which most Laravel developers already know.Recommendation: Do not add this as a production Composer dependency. Its useful surface is small enough to vendor under MIT or reimplement against PHP 8.2 readonly classes in under a day, which removes the archived-upstream risk, the constraint-conflict risk, and the supply-chain risk at once. Treat the package as a design reference for your internal DTO layer, not as a component.
How can I help you explore Laravel packages today?