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.
Money, Email, Uuid, Phone, DateRange, or adopt a VO/entity toolkit?" That decision recurs in every billing, invoicing, identity, and KYC feature, so it is worth making once, deliberately, rather than per-squad.readonly classes and a small internal primitives package instead.Email, Money, Uuid) reduces the surface area of cross-team contracts and API boundaries. This is a platform-team decision, not a feature-team one.Consider it when all of the following hold:
Look elsewhere when any of the following apply:
brick/money or moneyphp/money, ramsey/uuid or symfony/uid, egulias/email-validator.readonly classes, enums, and constructor promotion cover a large share of what this library offers, at zero dependency cost and with full team familiarity.Vetting checklist before any adoption: last commit date, CI status, test coverage, supported PHP versions, static-analysis level, open-issue responsiveness, and whether the entity half of the library imposes a persistence model that conflicts with Eloquent.
To executives: This is a small open-source library for modeling domain concepts like money identifiers and contact details as self-validating objects. It addresses a real and recurring problem — our scores suggest the problem space is worth roughly 6/10 — but the package itself is unproven (9 stars, no known dependents) and carries an LGPL license. Recommendation: do not adopt as a platform dependency now. Fund a short evaluation spike, and in parallel adopt the pattern using native PHP features or a maintained alternative. Cost of the decision is one sprint; cost of a bad bet is a domain layer built on an abandoned dependency.
To engineering: Treat this as a reference implementation and a pattern checklist, not a dependency. Read it for its handling of equality, immutability, and validation-at-construction. If we build internally, we get MIT-equivalent freedom, Laravel-native casts, and full control — at the cost of maybe 300–500 lines. If we buy, we should buy from a maintained project with dependents. Either way, the outcome we want is the same: one canonical Money, one canonical Email, validated at the boundary, never re-implemented.
Decision requested: Approve a timeboxed spike to compare (a) native readonly internal primitives, (b) brick/money + ramsey/uuid, and (c) runn/valueobjects, scored on maintenance risk, license fit, Laravel integration effort, and coverage of our money/identity invariants.
How can I help you explore Laravel packages today?