michel/options-resolver
A lightweight PHP options resolver for validating and normalizing configuration arrays with defined defaults, required keys, allowed types and values, and nested option support—keeping package configuration predictable and errors clear.
Architecture fit. michel/options-resolver is a framework-agnostic utility for validating associative option arrays against a declared schema (required/optional keys, types, defaults, strict unknown-key rejection). It occupies the same architectural slot as Symfony's OptionsResolver, spatie/laravel-data DTO hydration, and PHP 8.1+ readonly classes with named arguments. It does not compete with Laravel's HTTP validator; it is a boundary-hardening tool for constructors, package config objects, action/job payloads, and SDK entry points. The fit is narrow but legitimate: teams writing shared internal packages or public SDKs where an array-shaped config must fail fast and loudly.
Integration feasibility. MIT license, Composer-installable, and apparently free of Laravel service-provider coupling — the cheapest possible integration surface. Expected effort for a spike is under a day. The blockers are evidentiary, not technical: zero stars, zero dependents, no visible docs, and no production usage to learn from.
Technical risk. High, concentrated in provenance rather than code:
michel/ vendor namespace with no dependents is a plausible typosquat target; confirm the Git remote matches the Packagist entry.Key questions.
strict_types enforced internally?Stack fit. Install as a plain Composer dependency behind an internal adapter interface (e.g., App\Support\Options\Schema). No service provider, no config publishing, no facade. This keeps the package a swappable implementation detail rather than an architectural commitment.
Migration path. Introduce in exactly one bounded context — a single internal package's config object or one job-payload constructor — and nowhere else. Do not layer it under HTTP request validation; Laravel's validator and FormRequests remain the correct tool there. If the pilot holds, expand per-package rather than fleet-wide.
Compatibility. Pin an exact version (composer require michel/options-resolver:x.y.z), commit the lockfile, and add the package to our own CI matrix against the PHP and Laravel versions we actually run. Audit the source for global functions, constants, and any hidden framework assumptions before merging. Verify the tag against the upstream commit SHA.
Sequencing.
Given a composite score of 17.6/100 and an opportunity score of 4.81, the default recommendation is do not adopt as an external dependency; treat it as reference material or vendor the source.
Maintenance. Effectively zero upstream maintenance guarantee; we become the de facto maintainer on day one. Budget explicit ownership: a named team, a fork branch, and a quarterly review to decide whether to keep, upstream, or replace. Patch SLA is undefined and must be invented internally.
Support. No community, no Stack Overflow footprint, no documentation site. Every question routes to source code. Internal docs (schema DSL, exception handling, strict-mode semantics) are a prerequisite, not a nice-to-have.
Scaling. Runtime cost is negligible — array validation is microseconds against any I/O-bound request; scaling risk is organizational, not computational. The real scaling constraint is that every team touching the adapter needs the same internal docs and the same fork.
Failure modes.
Ramp-up. A mid-level engineer reads a fluent options API in 2–4 hours; without docs, add half a day for source reading. The owning team needs 2–3 days to stand up the fork, CI matrix, and characterization suite. Total onboarding cost is small in absolute terms — the concern is that this cost recurs for every team that adopts it, against a package with no ecosystem to amortize it.
How can I help you explore Laravel packages today?