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

Formerrorsbundle Laravel Package

ex3v/formerrorsbundle

FormErrorsBundle for Symfony exports all form errors, including field and subform labels, to an array and provides a Twig extension to render them as a customizable list. Avoid boilerplate parsers and display complete validation errors in templates with all_form_errors(form).

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a Symfony2 bundle, not a Laravel package. It ships a Bundle subclass, a DI extension, a service definition, and a Twig extension — all artifacts of Symfony's kernel/bundle model. Laravel has no bundle registration concept, so the package cannot be autoloaded into a Laravel application in any meaningful way.
  • The problem it solves — recursively walking FormInterface children to flatten errors with human-readable labels — is specific to Symfony Forms. Laravel's validator already returns a MessageBag containing every error keyed by field, surfaced via $errors->all(), $errors->get(), and @error directives. The functional gap this package fills does not exist in the Laravel stack.
  • Where it is architecturally relevant: as a reference implementation. The core logic (tree traversal, label resolution, flattening) is small enough to port into a Laravel view composer or error-aggregation service in well under a day.

Integration feasibility

  • As a dependency: effectively not feasible for a Laravel codebase. Composer constraints target symfony/symfony ~2.3 and Twig 1.x, which will conflict with any modern framework requirement set.
  • As a pattern/port: high feasibility. MIT license permits copying and adapting the traversal logic with attribution.
  • Package hygiene signals are weak: 11 stars, 0 dependents, no tests, no CI, no release cadence, maturity graded only "readme."

Technical risk

  • Ecosystem risk (high): Symfony 2.x reached end of life in 2018. The README's own disclaimer states it was written against Symfony 2.3.13 and never tested elsewhere — the author explicitly does not guarantee behavior.
  • Supply-chain risk (medium): single-author, unmaintained, zero downstream consumers means no external scrutiny and no borrowed fixes. Any vulnerability or incompatibility lands entirely on us.
  • Behavioral risk (medium): error extraction from compound forms, nested collections, and unmapped fields is where hand-rolled traversal typically breaks. Absent a test suite, correctness is unverifiable without writing our own fixtures.
  • Silent failure risk (high impact, low likelihood): the worst outcome is a traversal that returns an empty list, leaving end users with no visible validation feedback.

Key questions

  1. Is any part of the estate actually running Symfony 2.x, or is this candidate misclassified in the shortlist?
  2. If Laravel: what does this package provide that $errors and FormRequest do not?
  3. Are we solving error aggregation or error presentation? The former is framework-native in Laravel; the latter is a Blade component.
  4. Who owns a fork, and what is the budget for adding a test harness before first use?
  5. Are there transitive dependencies, and do they pass our SCA tooling?
  6. Does any requirement involve label-aware error output that our native stack genuinely cannot produce?

Integration Approach

Stack fit

  • Laravel: no fit as a package. Laravel's validation pipeline produces a MessageBag already aggregated across all fields, with attribute-name substitution (:attribute) covering the "labels" problem the README describes. The capability is native.
  • Symfony 2.x legacy surface: direct fit, but only if such an application exists and is still maintained.
  • Any modern Symfony (4/5/6+): no fit — bundle conventions, container access patterns, and Twig APIs have all moved on.

Migration path

  1. Do not add ex3v/formerrorsbundle to a Laravel composer.json. Record the decision explicitly so it doesn't reappear in future shortlists.
  2. If a Symfony 2.x app is in scope: vendor via fork, add a lockfile pin, and write characterization tests against representative form trees (simple, nested, collection, unmapped) before enabling.
  3. If the goal is Laravel parity with label-aware error output: implement a small FormErrorAggregator service (or a Blade component) reading from MessageBag and resolve labels from the request's attributes() array. Roughly a half-day including tests.
  4. If a framework-agnostic aggregator is genuinely needed across stacks, define it as an internal interface and adapt per framework — do not standardize on a Symfony2 bundle as the common layer.

Compatibility

  • Assumed environment: PHP 5.3–5.6 era, Symfony 2.3–2.4, Twig 1.x. Symfony 3+ likely breaks on deprecated APIs; Symfony 4+ definitively breaks on bundle/container conventions.
  • Laravel: incompatible across all supported versions (8.x through current) — no shared extension points.

Sequencing

  1. Classify (1 hour): confirm whether a Symfony 2.x target exists. If not, close the evaluation.
  2. Spike (half day): build the 20-line Laravel equivalent and compare output against $errors to confirm no gap.
  3. Decide build vs. fork, with the fork path requiring test coverage as a gate.
  4. Document the decision and the attribution requirement in the architecture log.

Operational Impact

Maintenance

  • Upstream maintenance is zero and should be assumed permanent. Single author, no release history, no issue triage, no dependency updates. The moment it enters the codebase, we own it.
  • Mitigating factor: the surface area is tiny — one service class and one Twig extension. Fork cost is low in absolute terms, but it is not zero, and it must be budgeted rather than assumed away.

Support

  • No community to escalate to. With 0 dependents there is no Stack Overflow trail, no downstream bug reports, and no third-party patches to borrow. Internal engineering is the only escalation path.
  • MIT license is permissive and reduces legal friction, but the README badge dependency (knpbundles.com) is itself a defunct service — a small signal of overall staleness.

Scaling

  • Runtime scaling is a non-issue: the traversal is O(number of form fields) at render time and negligible against request overhead. This is not where risk lives.
  • Organizational scaling is the real concern: adopting a framework-specific helper as a shared dependency creates a one-off integration per framework and no reusable abstraction. In a multi-app estate, this pattern multiplies rather than consolidates.

Failure modes

  • Composer resolution conflict — dependency constraints collide; install fails or forces a framework downgrade. Mitigation: never install; port instead.
  • Silent empty error list — traversal misses errors on nested/compound forms, users see a failed submit with no message. Highest-severity failure; requires fixture tests if adopted.
  • Twig extension registration breakage — service not tagged or extension not loaded, producing template rendering errors.
  • Label resolution gaps — unmapped fields render raw property names, degrading UX subtly rather than failing loudly.
  • Abandoned-dependency noise — recurring SCA/licensing review flags with no remediation path, creating process drag.

Ramp-up

  • Comprehension cost is very low — single-purpose, small surface, readable README. Any engineer can understand it in under an hour.
  • Trust cost is moderate — no tests means confidence must be manufactured locally, and the README's own disclaimer removes any assumption of correctness.
  • Net recommendation: do not adopt as a dependency. Treat as a design reference worth 30–60 minutes of reading, and meet the underlying need with native framework capabilities. The low opportunity score (0.38) is consistent with this: the package solves a real problem, but one our target stack already solves.
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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings