Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Variants Field Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Fits only if the organization is already running Unite CMS on Symfony, with the corresponding 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.
  • Does not fit a Laravel application in any direct sense. Laravel has no Unite CMS host, no Symfony bundle kernel, and no compatible content-type schema layer. The only realistic path in a Laravel codebase is to reimplement the pattern, not install the package.

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:

  • 0 stars, 0 dependents, score 0. This is not evidence of a bad package, but it is conclusive evidence of no installed base. There is no community to surface bugs, no downstream projects to validate upgrade paths, and no realistic expectation of third-party fixes.
  • Single-maintainer org artifact. The 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.
  • Unite CMS project velocity is the gating risk. The Unite CMS project has seen limited activity in recent years. A field-type bundle is tightly coupled to core internals (field type registration, GraphQL type generation, Doctrine value normalization) — the exact surfaces most likely to break on a Symfony major bump. Expect this bundle to pin you to an older Symfony line.
  • No tests, CI, or documentation observable from the package metadata. Treat as unverified code.
  • Supply-chain surface. A low-traffic, low-scrutiny package still executes in your content path and still receives Composer updates; it is a small but non-zero attack and drift surface with no watchers.

Key questions.

  1. Are we actually running Unite CMS anywhere in the estate? If no, this package is out of scope and we are really evaluating the pattern, not the dependency.
  2. If yes: which Unite CMS core version, which Symfony version, and does this bundle's constraint set overlap?
  3. Is the variants field type already available in a maintained core or first-party bundle, making this redundant?
  4. What is our exit plan if Unite CMS development ceases — is content locked into a schema only this bundle can render?
  5. Can the requirement be met with a maintained Laravel-native flexible-content field at lower total cost?

Integration Approach

Stack fit. Two mutually exclusive stacks, and the answer differs completely:

  • Unite CMS / Symfony host: natural fit. The bundle is designed for the platform's field-type extension point and requires no adapter layer.
  • Laravel host: no fit. There is no adapter, bridge, or compatible abstraction. Do not attempt an integration; scope the work as a pattern port.

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:

  1. Storage: a single JSON column (MySQL JSON / Postgres jsonb) holding { "variant": "...", "data": { ... } }.
  2. Domain layer: a VariantField cast class resolving variant to a typed DTO per variant, with a registry mapping variant keys to DTO classes and validation rules.
  3. Validation: one FormRequest/rule set per variant, dispatched by the variant key; reject unknown variants explicitly.
  4. Admin surface: the JSON column plus a variant selector in the admin panel, with per-variant conditional field groups.
  5. API: expose as a discriminated union in your API resource/serializer so clients see a stable 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.

  1. Version audit first. Confirm PHP and Symfony constraints of the bundle against the host before writing any code. If the constraints don't overlap, stop — the cost of forcing it exceeds the cost of a local fork.
  2. Pin, don't float. Commit the exact version and a composer.lock; do not allow ^ ranges on an unmaintained, zero-dependent package.
  3. Register the bundle in config/bundles.php and clear cache.
  4. Define the schema in the content type's GraphQL/YAML definition, enumerating each variant and its field group explicitly. Variant keys are a public contract — name them as such.
  5. Apply the schema migration to the target environment and verify the generated GraphQL union types resolve correctly in the CMS admin and through the API.
  6. Fork-on-contact policy. Vendor the package into a private repository at first integration. With zero dependents and no upstream guarantee, you need the ability to patch. Budget one day for the fork and CI wiring.

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.

  1. Confirm whether Unite CMS is in scope at all (gate).
  2. If Laravel-only: close out the package evaluation, proceed with the native port, and record the decision.
  3. If Unite CMS host: version audit → private fork + CI → schema design → staging integration → content backfill → production.
  4. Never sequence the schema migration before the fork and CI are in place; you lose your only recovery path.

Operational Impact

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.

  • Orphaned content on variant change. Removing or renaming a variant leaves persisted records whose 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.
  • GraphQL schema breakage. A change to variant field groups alters the generated union type, which is a breaking API change for consumers. Mitigation: version the content type, coordinate with API consumers before schema changes.
  • Framework upgrade lock. The host becomes pinned to a Symfony line the rest of the estate wants to leave. This is the most likely actual failure — not a bug, but a version dead-end discovered 18 months in.
  • Silent fork drift. If you fork and don't track upstream, you accumulate local divergence; if upstream is dead, that's fine, but it must be an explicit, documented decision rather than an accident.
  • Admin-panel degradation. With no installed base, edge cases in the CMS editing UI (nested variants, variant-in-variant) are unvalidated territory. Test the authoring experience, not just the API.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle