mistralys/application-utils-core
Core utility library for PHP applications from Mistralys, bundling reusable helper classes and foundational components shared across its packages. A lightweight base for reducing boilerplate and standardizing common application tasks.
Architecture fit. This is a framework-agnostic PHP utility core (Mistralys application-utils-core), consumed via Composer, with RGBAColor acting as a color value object handling parsing, manipulation and luma-based light/dark text selection. There is no service provider, facade, config publish, migration, queue or HTTP surface — zero coupling to Laravel's container lifecycle. It fits cleanly as a leaf dependency in the presentation/theming layer, not in domain logic.
Integration feasibility. 2.5.1 is a purely additive change: setForceDark() / setForceLight() on RGBAColor to bypass automatic luma detection, plus companion methods to remove and reset those overrides. No signature changes, no deprecations, no behavioral change for existing call sites — a drop-in for anything already on 2.5.0.
Technical risk. Low, and mostly semantic rather than structural.
RGBAColor instances are mutable and reused, override flags can leak across render contexts. The remove/reset companions mitigate this only if callers are disciplined.Key questions.
jsonSerialize() / cache keys, i.e. can a cached resolved color carry a stale override?Stack fit. PHP 8.x with Laravel 10/11/12. The library is presentation-layer only and composes fine alongside Tailwind or CSS custom properties — use it where colors are computed at runtime: tenant branding, per-user accent colors, PDF/invoice templates, email themes, chart series.
Migration path. None required. Bump the constraint (^2.5.1) or composer require mistralys/application-utils-core:^2.5.1. Existing 2.5.0 call sites are untouched; adopt overrides incrementally, only where a mid-luminance brand color makes the automatic detection pick the wrong foreground.
Compatibility. Additive API on an existing class; safe on any PHP version already supported at 2.5.0. Pin to ^2.5.1 as a floor so setForceDark() cannot be called against an older install in a partially upgraded environment.
Sequencing.
ThemeColorResolver / Blade component rather than calling the utility directly from templates.Maintenance. Minimal. One small dependency, no runtime services, no migrations, no scheduled work. Monitor upstream release cadence; because of the bus factor, keep the local wrapper thin enough to swap out.
Support. Developer-only; no ops or on-call surface. Support load will show up as design questions ("why is this button's text white?"), so document the override policy and the reset convention in the design system rather than in code comments alone.
Scaling. Negligible — in-process string and float math. If colors are resolved per row in large tables or listings, memoize per palette; cache resolved tenant palettes rather than recomputing per request.
Failure modes.
finally block or construct fresh instances per render.Method not found on a loosely pinned or partially deployed dependency — enforce the ^2.5.1 floor in CI.Ramp-up. Very low: roughly an hour for a developer to learn the API. The real investment is governance — deciding who owns brand-color overrides and requiring design review plus a passing contrast check on each one — not the integration work.
How can I help you explore Laravel packages today?