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

Form Bundle Laravel Package

gregwar/form-bundle

Gregwar FormBundle is a Symfony bundle that provides reusable form types, extensions, and rendering helpers for PHP applications. It simplifies building and customizing Symfony forms while keeping integration lightweight and straightforward, ideal for projects that want concise form tooling without...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The first finding is a framework mismatch that dominates everything else: gregwar/form-bundle is a Symfony bundle, not a Laravel package. It contributes a single form type (entity_id) plus a data transformer and a DI extension — the standard Symfony Bundle + AbstractType + DataTransformerInterface triad. Against a Laravel codebase there is no PackageManifest discovery, no ServiceProvider, and no Facade; adopting it means adopting symfony/form as a parallel form layer alongside Blade/Livewire. That is a disproportionate architectural commitment for one field type.

Where it does fit is narrow: a Symfony application that wants a form field bound to an entity's identifier scalar rather than a Doctrine-managed entity reference — useful when forms must stay decoupled from the ORM, or when the payload is a raw ID that is resolved later in a service layer.

Integration feasibility. Low, but for a tractable reason: the total code surface is small (roughly a form type, a transformer, and a container extension — on the order of 100–200 lines). The realistic integration is not composer require but vendoring or reimplementing the pattern in the host framework's idiom. In Laravel that is a FormRequest rule (exists:table,id) plus a small cast/accessor or a custom validation rule — perhaps a half-day of work, fully owned, zero foreign abstractions.

Technical risk.

  • Maintenance status. 64 stars, 0 dependents, and a composite score of 2.21 indicate an unconsumed, effectively unmaintained project. Symfony 5/6/7 compatibility is improbable without a fork; PHP constraints likely target the 5.6/7.0 era.
  • Opportunity score (8.36) is misleading. It rewards novelty of the idea, not adoptability. The idea is good; the artifact is stale.
  • Semantic risk. By design the type accepts a client-supplied identifier. Without an added existence constraint you get unvalidated foreign keys — 500s at flush time in the best case, dangling or cross-tenant references (IDOR-adjacent) in the worst.
  • Security surface is trivial (no I/O, no network), but there is no CVE monitoring for an abandoned dependency.

Key questions.

  1. Which framework is actually in play — Laravel, or a legacy Symfony app we haven't named?
  2. If Symfony, which major version, and does composer require even resolve?
  3. Do we need server-side entity resolution, or just a scalar ID with a validity check?
  4. Who owns the "ID exists and is addressable by this user" authorization rule?
  5. Is a two-file vendored copy acceptable, or must dependencies stay external for policy reasons?

Integration Approach

Stack fit. Treat this as framework-conditional:

Host stack Fit Rationale
Laravel 10/11 ✗ No Symfony bundle; no provider, no discovery
Symfony 5.4 / 6.x / 7.x ✗ Unlikely Abandoned against modern Form API
Symfony 2.8 / 3.x (legacy) ✓ Yes Original target; drop-in bundle registration
Framework-agnostic PHP ~ Pattern only Copy the transformer idea, not the package

Migration path. Two options, and I recommend the second:

  1. Vendor it. MIT licensed, so copy the form type and transformer into app/Support/, namespace it internally, and own it. Preserves behavior with zero upstream coupling.
  2. Reimplement idiomatically. In Laravel: a FormRequest with ['required', 'integer', Rule::exists('entities', 'id')->where(...)], returning the scalar ID to the controller and resolving the model in the action. Same contract, native error handling, native authorization hooks.

Compatibility. Do not assume a clean install. Validate composer why-not against the target PHP and Symfony/Illuminate versions before planning anything; budget for a fork if the constraint set is genuinely incompatible, and treat that fork as internal code from day one.

Sequencing.

  1. Spike (≤0.5 day): confirm the host framework and attempt install in a scratch branch. The resolution result alone decides the path.
  2. Decide vendor vs. reimplement based on the spike; default to reimplement unless there is a legacy Symfony app already carrying this pattern.
  3. Implement with the existence + authorization constraint bundled in, not as a follow-up — the package's omission here is the defect most likely to reach production.
  4. Wire into one form, verify round-trip behavior on validation failure (re-render must repopulate the ID, not the entity).
  5. Document as internal. Remove it from dependency-review scope; it is no longer third-party.

Operational Impact

Maintenance. Effectively zero upstream maintenance and full local ownership. That is acceptable because the code is small — but it must be tracked in the internal inventory, not the dependency manifest, or it will silently rot through framework upgrades.

Support. No viable upstream: 0 dependents means no downstream bug reports, no Stack Overflow corpus, and a single-maintainer bus factor of one. Internal engineers are the support tier. Ramp-up is fast (~1 hour to read the source for a Symfony developer; ~half a day for a Laravel developer to produce the equivalent with tests), which is the main mitigating factor.

Scaling. Runtime cost is negligible — one data transformer per field, no queries added by the type itself. The scaling risk is behavioral: if the resolved IDs are hydrated per row in a list form, you introduce N+1 queries at the application layer. Validation adds one exists check per field, which is index-backed and cheap. No throughput concerns.

Failure modes.

  • Nonexistent / foreign ID submitted → reverseTransform yields null or throws, depending on the guard; without the existence rule this surfaces as a 500 at persistence, not a 422 at validation.
  • Loose coercion → "12abc" or " 12 " may silently become 12; validate integer explicitly rather than relying on the transformer.
  • Form re-render after failed submit → if the transformer cannot map the submitted scalar back, the field blanks and the user loses input. Test this path first; it is the most common regression.
  • Framework upgrade → the bundle is the first casualty; any composer update touching symfony/form or illuminate/* is a breaking-change candidate until the code is internalized.
  • Authorization gap → the type validates shape, never access. An ID belonging to another tenant will pass unless an explicit where clause or policy is attached.

Recommendation. Do not adopt as a dependency in a Laravel codebase — the framework mismatch is disqualifying and the functional delta is a half-day of native code. Value the package as a design reference: the entity-ID-as-scalar pattern is worth keeping, and worth reimplementing with the existence and authorization constraints the original leaves out. If a legacy Symfony 2/3 application is in scope, vendor the two files under MIT and treat them as internal from that point forward.

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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect