unite-cms/variants-field-bundle
Adds a flexible variants field to Unite CMS, letting editors define and manage multiple product or content variants within a single field. Configure variant options and values to support structured, reusable variant data across content types.
Critical framing correction. Despite being presented in a Laravel/PHP package context, unite-cms/variants-field-bundle is a Symfony bundle for Unite CMS, not a Laravel package. It ships no service provider, no config/ publishables, no Eloquent integration, and no Laravel-facing API. It is a plugin that extends Unite CMS's GraphQL content-type system with a new field type. Any evaluation that assumes a composer require + php artisan integration path is wrong at the first step.
What it actually does. The bundle registers a variants field type in Unite CMS. When an editor adds this field to a content type, they get a selector that chooses one of several pre-defined field group variants, and the content stored is the payload of whichever variant was chosen. It is functionally the same concept as "flexible content," "block switcher," or a polymorphic field group in other CMSs — a discriminated union at the field level, surfaced through GraphQL as a union/interface type.
Architecture fit.
unite-cms/core-bundle, GraphQL stack (Overblog/Webonyx), and Doctrine persistence already in place. In that narrow case, it drops into the existing field-bundle registration mechanism and is architecturally idiomatic.Integration feasibility (Laravel context). Low — effectively zero for direct integration. The bundle's dependencies (Symfony framework version constraints, Unite CMS core, GraphQL bundle) cannot be satisfied inside a Laravel app without vendoring the entire Unite CMS runtime, which would be an architectural decision far larger than this package. If the underlying need is "let editors pick one of N field-group shapes per record," Laravel-native equivalents are mature and should be evaluated first: a JSON/jsonb column with a discriminated-union schema validated by form requests and cast classes, or an existing flexible-content field in the admin panel of choice (Filament, Nova). Third-party Laravel flexible-content packages exist and are far better supported.
Integration feasibility (Unite CMS context). Moderate. Requires: matching the bundle's PHP and Symfony version constraints against the host, registering the bundle in bundles.php, and declaring the field in the content type's GraphQL schema/YAML. The real work is schema design — defining which variants exist and how each maps to GraphQL types — plus a content migration for any existing field being converted.
Technical risk — high. The signal here is unambiguous and adverse:
unite-cms/* family is a first-party monorepo-adjacent set of bundles. This package's health is therefore a direct function of Unite CMS's own health, not an independent variable.Key questions.
variants field type already available in a maintained core or first-party bundle, making this redundant?Stack fit. Two mutually exclusive stacks, and the answer differs completely:
Recommended approach for a Laravel estate — port the pattern, not the package. The functional requirement (editor selects one of N field-group shapes; only the selected shape's data persists) is straightforward to build natively:
JSON / Postgres jsonb) holding { "variant": "...", "data": { ... } }.VariantField cast class resolving variant to a typed DTO per variant, with a registry mapping variant keys to DTO classes and validation rules.variant key; reject unknown variants explicitly.variant discriminator.This is typically 3–5 days of work for a senior engineer and yields a dependency you control.
Recommended approach for a Unite CMS host — integrate narrowly.
composer.lock; do not allow ^ ranges on an unmaintained, zero-dependent package.config/bundles.php and clear cache.Migration path. For greenfield content types, the field can be introduced cleanly. For existing content, plan a backfill: default existing records to a single "legacy" variant, then progressively re-author. Do not attempt to infer variants from existing flat data automatically — the failure mode is silently mis-typed content.
Compatibility. The main compatibility axis is Symfony major version. Field-type bundles hook into type registration and GraphQL schema generation, both of which have changed across Symfony 4→5→6. Assume this bundle pins the host to an older line and treat any Symfony upgrade as requiring a bundle audit and likely a local patch. For the Laravel port, compatibility is entirely under your control and tracks the framework cleanly.
Sequencing.
Maintenance. This is the dominant cost and it is asymmetric. An unmaintained, zero-dependent package does not degrade gracefully — it degrades at framework-upgrade boundaries, when you least want an undocumented field-type bundle in the critical path. Realistic expectation: one developer-day per Symfony major upgrade cycle, plus unplanned work when a core refactor changes the field-type registration contract. Owning a fork adds a private-repo and patch-management obligation on top. The Laravel-native port inverts this: maintenance is ordinary application code, visible in review, covered by your test suite, and refactorable by anyone on the team.
Support. There is none. No vendor SLA, no issue-triage expectation, no commercial backing specific to this bundle, no installed base to consult. Escalation paths are: read the source, or read the corresponding Unite CMS core source. This is acceptable only for a small, stable, well-understood field type — which this is — but it must be priced in, not assumed away.
Scaling. Runtime scaling is a non-issue: this is an authoring-time field type, not a hot query path. Content volume is bounded by however much variant-shaped content you author, stored as ordinary Doctrine-managed data. The scaling concern is organizational, not technical — the number of people who understand the GraphQL schema generated for variant unions is likely to be one, and that is a bus-factor risk on the content model.
Failure modes.
variant key no longer resolves. Without an explicit guard, this surfaces as null/garbled fields in the API rather than a loud error. Mitigation: treat variant keys as immutable, or add a validation rule rejecting unknown keys and a migration for every renames.Ramp-up. For a developer already fluent in Symfony and Unite CMS: roughly half a day to read the source and understand the field-type registration contract, plus schema design time with the content team. For a team that is not on Unite CMS — which the framing of this request suggests — ramp-up is not "learn this package," it is "learn Unite CMS, Symfony DI, and the GraphQL bundle layer," which is a multi-week investment for the sake of one field type. That is a clear negative-value trade.
Recommendation. Do not adopt this package into a Laravel codebase; there is no viable integration path. If Unite CMS is genuinely in the estate, adopt it narrowly, fork it on day one, pin it exactly, and treat the resulting Symfony version constraint as a known liability to revisit annually. If the requirement is simply polymorphic field groups in a Laravel app, implement the pattern natively — the package's value here is conceptual (it confirms the pattern is worth having), not as a dependency. Record the decision explicitly either way; the dominant risk in both paths is an undocumented dependency that nobody owns.
How can I help you explore Laravel packages today?