runn/valueobjects
Runn ValueObjects gives you a lightweight foundation for immutable PHP value objects, with typed base classes for strings, integers, booleans and arrays, validation helpers, and Eloquent casts to keep domain values consistent.
Architecture fit
CastsAttributes), validation rules, form-request mapping, JSON resources, and factory/seed support. That glue is the real cost and is not shipped.Integration feasibility
composer require runn/valueobjects, PSR-4 autoloading, no runtime dependencies on Laravel internals. Integration is additive and reversible.CastsAttributes for each VO persisted as a scalar column, (2) custom ValidationRule objects to keep request validation aligned with VO constructors, (3) JsonResource/JsonSerializable output contracts so APIs don't leak VO internals, (4) factories/seeders and tests that construct VOs rather than raw scalars.Technical risk
strict_types, return types, readonly/deprecation behavior, and PHPUnit/PHPStan/Psalm parity. A failure here is a hard stop.Key questions
Stack fit
Migration path
Compatibility
$casts + accessors) and for VOs leaking into toArray()/queue payloads.Sequencing
Maintenance
Support
Scaling
Failure modes
jsonSerialize() output differs from prior scalar output → breaks API consumers; mitigated by contract tests on responses.Ramp-up
How can I help you explore Laravel packages today?