3neti/voucher
3neti/voucher is a Laravel/PHP package for generating, managing, and redeeming vouchers. It provides voucher code handling, validation, and Eloquent-friendly integration, making it easier to add promotional, discount, or redemption workflows to your application.
Architecture fit: This package sits in the voucher/validation domain of a Laravel application, modelling validation rules as DTOs ("InstructionData" objects) that are composed into voucher contracts. The 0.10.3 release confirms an established convention of *ValidationInstructionData classes (Signature, Selfie, Otp, FaceMatch, Time, Location), with ValidationInstructionData acting as the aggregate/composite passed into contract construction. For a TPM this signals a stable, convention-driven internal API rather than a framework-level or infrastructure package — it is a domain library, not a persistence, auth, or transport layer.
Integration feasibility: High. The change is a pure naming standardization with deprecated shims retained (TimeValidationData extends TimeValidationInstructionData, same for Location). Existing constructor calls, type hints, and serialized payloads continue to work. No migration of stored data is implied by the notes, since the shim classes preserve the inheritance chain and therefore the same public surface.
Technical risk: Low, with two caveats a TPM should track:
get_class() in a factory mapping, or a JSON discriminator field), the new canonical names will surface instead of the old ones even where the old alias was used. This is the one place "no breaking changes" could quietly not hold. Worth a targeted check.Key questions:
TimeValidationData and LocationValidationData, and which version drops the shims?ValidationInstructionData itself renamed or otherwise touched in a follow-up, or is this the final naming pass?Stack fit: Standard Composer package for a Laravel/PHP codebase. Because the change is confined to class naming within the validation DTO namespace, it fits existing service-container resolution, constructor injection, and validation pipeline wiring without new configuration, service providers, or config publishing. Composer constraint bump is the entire install step.
Migration path: Two-phase, and the phases should not be collapsed:
TimeValidationData and LocationValidationData and replace with the canonical names. This is mechanical, low-risk, and can be done per-team. Doing it promptly is what converts the shim from a safety net into a non-issue at removal time.Compatibility: Backward compatible at the source level by inheritance. Verify forward compatibility for anything that reflects on class names or deserializes into DTOs from stored payloads — those paths need a concrete test, not an assumption. Laravel version support is unchanged by this release.
Sequencing: Bump to 0.10.3 in the dependency manifest, run the existing validation suite, and add a contract test asserting that both old and new class names resolve to the same behaviour. Then schedule the rename sweep as ordinary refactor work, with a hard target that it completes before the shim-removal release. No coordination window, feature flag, or dual-running period is required.
Maintenance: Slightly positive. A single naming convention across six validation types reduces cognitive overhead and the frequency of "which one is it called" mistakes in code review. The cost is carrying two names per DTO for Time and Location until removal; that is small but it is real, and it decays in value the longer it sits.
Support: Low support surface. The failure mode is a class-not-found after shim removal, which surfaces at deploy time or CI, not in production traffic — assuming no dynamic class-name construction. Document the canonical names in the internal integration guide so support and onboarding material does not point at deprecated classes.
Scaling: Neutral. No runtime, query, or throughput implications; inheritance-based shims add no measurable overhead. The naming consistency does help as the validation engine grows — new validation types now have an unambiguous naming template to follow, which is the stated rationale and is a genuine scaling benefit for a team adding validators.
Failure modes:
~0.10.0 expecting no surface changes get a renamed class. Harmless here, but worth noting if it becomes a pattern.Ramp-up: Near zero. Existing developers continue writing the same code; new developers learn one convention instead of two inconsistent ones. Budget roughly an hour of engineer time per consuming repository for the rename sweep, plus a one-line README or changelog pointer flagging that the deprecated names exist only for transition.
How can I help you explore Laravel packages today?