omitobisam/conditional
Conditional is a Laravel package for expressive conditional validation. It lets you apply rules only when specified conditions are met, keeping complex form request logic readable, reusable, and easy to maintain.
Architecture fit. omitobisam/conditional remains a single-purpose utility package that replaces branch-heavy or nested ternaries with a fluent, chainable conditional API. It is framework-agnostic rather than a Laravel-specific extension, so it slots into any Composer-managed PHP application (Laravel, Lumen, Symfony, plain PHP) without requiring a service provider, facade, config file, or migrations. For a TPM, this is still the lowest-risk architectural category: a leaf dependency with no transitive weight and no infrastructure footprint. The trade-off is unchanged — no leverage, no framework integration benefit, no ecosystem gravity. It is a readability sugar library, not a platform component. The 2.0.0 release does not alter the architecture; it alters the maintenance signal around it.
Integration feasibility. Mechanically trivial: a single composer require omitobisam/conditional, a use statement, and the fluent chain in application code. No bootstrapping, no published config, no runtime coupling to Laravel internals. The real feasibility question remains compatibility, and 2.0.0 sharpens it rather than resolving it. A major version bump means, by SemVer convention, that public API surface changed in a backward-incompatible way — and the published release notes contain no changelog detail, no migration guide, no list of removed or renamed methods. The notes reference only branch/CI housekeeping (1.x -> master, a new php.yml workflow, a 2.x branch). That is an unusually thin disclosure for a major release and it is now the single largest unknown in the adoption decision.
Technical risk. Blast radius is still small — if the package breaks or is abandoned, it can be removed or reimplemented locally in an afternoon. But the risk profile has shifted in two directions at once:
php.yml GitHub Actions workflow (PR #54) is direct evidence of continuous integration that was previously absent. This partially closes the "no CI evidence surfaced" gap flagged in the prior assessment. It also suggests the maintainer is modernizing tooling off Travis, which historically correlates with current-PHP support. It does not prove a multi-version test matrix — a single-workflow file tells us CI runs, not what it covers.1.x is now end-of-life. For a package with zero dependents and no community validation, there is no crowd-sourced upgrade path — you will be the first to discover the breaks.Conditionable and global when()/unless(); PHP 8+ has match. Adoption still needs a specific justification (fluent chains inside builder pipelines), not a general "cleaner ifs" argument. Note that 2.0.0 may have reduced the gap the package fills, but without release notes we cannot tell whether the major bump was a PHP-version floor raise, an API redesign, or both.else fallbacks. If 2.0.0 changed any of these, it is precisely the class of change that a terse release note would omit and that would silently alter production behavior.if/else, raising incident cost in the paths where they are used.1.x, 2.x) and no stated support policy for either.Key questions to resolve before adoption.
1.x now EOL, and will it receive security or compatibility fixes? This determines whether adopting 1.x is a dead end.php.yml workflow test across a matrix (or only a single version)?when()/Conditionable or PHP 8 match with less dependency risk?1.x / 2.x) purely ad hoc?Stack fit. Unchanged. The package fits any PHP 8+ / Composer stack and is effectively invisible to the rest of the architecture. It is not Laravel-native (no config publishing, facades, or container bindings), so it can be adopted identically in a Laravel monolith, a Lumen microservice, a package library, or a legacy PHP app. It will not conflict with Laravel's Conditionable trait, but teams should pick one convention per codebase to avoid two competing syntaxes for the same concept.
Version targeting — new decision point. The prior assessment's implicit "take the latest release" assumption no longer holds cleanly. Two defensible positions:
In both cases, do not use --ignore-platform-reqs to force an install.
Migration path. Still additive and coexistent with native conditionals, with one added step for the major version:
if/elseif/else chains assigning a value, nested ternaries in builders). If no such pattern exists, do not adopt.Compatibility. Verify four things concretely before merging: the php constraint in 2.0.0's composer.json covers your runtime; the breaking-change list (once obtained) does not touch the APIs in your pilot; the package pulls no transitive dependency that conflicts with your lockfile; autoloading is PSR-4 clean. Add a fifth for this release specifically: confirm your Composer constraint is pinned to ^2.0 (or ^1.3 deliberately) so an unplanned major cannot land via composer update.
Sequencing. 2.0.0 changelog investigation → dependency audit → local proof-of-concept in a feature branch → abstraction wrapper → pilot in one module → team review → document convention or remove. The 1.x→2.x transition demonstrates that this dependency will have major-version churn, which strengthens the case for treating adoption as a timeboxed experiment with a pre-built exit rather than a committed platform decision.
Maintenance. Code-level maintenance remains near-zero (static utility, tiny surface). Dependency maintenance is the real cost and has become slightly more complex: there are now two active lines and an undocumented breaking change to absorb. The upside is a maintainer who is visibly working on the project (new CI, branch restructuring) — the downside is that you must now track that work rather than assume stasis. Budget for one of two outcomes, unchanged: (a) fork and vendor internally, or (b) reimplement the ~100–200 lines as an internal helper. MIT licensing leaves both legally unencumbered. The wrapper approach in the integration section is what makes either exit cheap.
Support. Still no commercial support, no SLA, no meaningful community forum; burden falls entirely on the adopting team. The 2.0.0 release adds a new support consideration: an undocumented major version is a support cost in itself. Absorbing it will consume engineering time that a documented release would not have. For anything customer-facing or regulated, continue to treat this as "vendored code we happen to install via Composer," not a supported dependency.
Scaling. Runtime scaling remains a non-issue — function calls and closures, no I/O, no caching, no memory growth. Organizational scaling remains the concern: every additional developer and codebase adopting the fluent style multiplies review surface and drift risk. Standardize early.
Failure modes to plan for.
composer update pulls it in. Detection is a green-to-red test suite or a production anomaly; mitigation is a pinned constraint plus the wrapper plus targeted tests at every adoption site.Ramp-up. Learning cost is still minimal — under an hour for an experienced PHP developer, documented by a single code example. The 2.0.0 release does not change the onboarding cost of the library; it changes the onboarding cost of the dependency decision, because a TPM now has to spend real time establishing what version to standardize on and what changed. The honest position is unchanged in direction but firmer in degree: this is a micro-optimization with a small but non-zero dependency tail, and 2.0.0 has just demonstrated that the tail has maintenance events attached to it. Worth a timeboxed pilot in a codebase with a genuine nested-ternary problem, gated on obtaining the 2.0.0 changelog — still not worth a default-in-every-project decision.
How can I help you explore Laravel packages today?