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

Formatter Bundle Laravel Package

rmzamora/formatter-bundle

A Laravel/PHP formatter bundle that provides reusable formatting helpers for consistent, clean output across models, views, and APIs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Poor — effectively zero for a Laravel codebase. rmzamora/formatter-bundle is a fork of Sonata's SonataFormatterBundle, a Symfony bundle, not a Laravel package. Bundles are a Symfony distribution unit: they are registered in the kernel (bundles.php / AppKernel), expose a Bundle class, a DI Extension with a Configuration tree, and contribute tagged services, event listeners, and Twig extensions to the Symfony container. Laravel has no bundle concept and no kernel hook for that lifecycle. This package ships no service provider, no facade, no config publishable, and no Illuminate dependency — there is no integration surface for Laravel to attach to.

What it actually does. It provides content formatting for SonataAdminBundle text fields: a formatter pool (markdown, textile, raw HTML), a sonata_formatter Twig filter, an admin extension adding a per-field "formatter" selector, and persistence of the chosen formatter alongside the content. Its reason for existing is Sonata Admin UX, not generic text transformation — so even in Symfony, its value is tightly coupled to the Sonata admin stack.

Integration feasibility. Low. A composer require into a modern Laravel app would attempt to pull symfony/framework-bundle, sonata-project/admin-bundle, twig/twig, and a Markdown bundle. Given the fork's era, constraints are likely PHP 5.6/7.x and Symfony 2.8/3.x, which directly conflict with Laravel 9+ (PHP 8.1+, Symfony ^6/^7 components via illuminate/*). Outcomes are either a hard resolution failure or — worse — a forced downgrade of shared Symfony components that silently destabilizes the framework. The only genuinely reusable artifact is the pattern (formatter interface + registry + per-field selection), not the code.

Technical risk. High.

  • Archived — no security patches, no PHP 8 compatibility work, no release cadence.
  • Abandoned transitive dependencies (sonata-project/*, knp-markdown-bundle) that will themselves be unpatched.
  • 0 stars / 0 dependents — no community validation, no downstream users absorbing breakage, no ecosystem signal.
  • Provenance — an unverified personal fork of a Sonata package; confirm the MIT license carries over and that the fork has not diverged in ways nobody is tracking.
  • Supply chain — archived third-party code pulled into a build is a standing audit finding.

Key questions. (1) What problem are we solving — Markdown rendering for user content, or per-field formatter selection in an admin UI? (2) Do we operate any Symfony/Sonata estate at all, or is "Laravel/PHP" the entire footprint? (3) If a legacy Sonata app exists, why would we use this fork rather than upstream sonata-project/formatter-bundle? (4) What is our policy on archived dependencies in production composer.json, and does this pass a security review? (5) Is the 6.81 opportunity score reflecting a real need ("formatting is common") or this artifact's viability? The latter is near zero.

Integration Approach

Stack fit. None for Laravel. For a hypothetical Symfony/Sonata estate, fit is moderate — but the correct dependency is upstream Sonata, not a dormant fork. In Laravel, the equivalent capability is composed from maintained libraries: league/commonmark (Markdown → HTML, extensible, actively maintained), spatie/laravel-markdown for Blade-side rendering, and mews/purifier or ezyang/htmlpurifier for sanitization. The bundle's DI formatter pool maps cleanly to a Laravel singleton manager; its Twig filter maps to a Blade directive or a HtmlString-returning helper; its per-field selection maps to a model cast or accessor.

Migration path. There is no migration from this package — there is a reimplementation of its concept, which is small:

  1. Formatter interface with transform(string $text): string.
  2. Implementations: Markdown, Plain, RawHtml (each wrapping a maintained library).
  3. FormatterManager bound as a singleton, reading config/formatters.php for name → class mappings.
  4. Blade directive @format('markdown', $text) plus a FormatsContent trait/cast for per-model formatter selection.
  5. Sanitize on output, cache rendered HTML keyed by content hash.

This is roughly 1–2 engineer-days and produces code the team can actually maintain.

Compatibility. Assume incompatible until proven otherwise: expect PHP <8.0, Symfony 2/3, Twig 1/2, Sonata Admin ^3. Modernizing it is a fork-and-rewrite project against an archived upstream — i.e., we become the maintainer of a dead package.

Sequencing.

  1. Confirm whether any Symfony/Sonata application exists in the portfolio. If not, close this as not applicable — no further work.
  2. If a legacy Sonata app exists, inventory its formatter usage and target upstream sonata-project/formatter-bundle there, isolated from the Laravel estate.
  3. In parallel, spike league/commonmark + purifier in a Laravel service (half a day), and if more than one service needs identical formatting behavior, promote it to an internal package.
  4. Do not sequence any milestone against this fork.

Operational Impact

Maintenance. Archived means the maintenance burden transfers entirely to us on day one: PHP upgrades, security advisories, and dependency drift are all ours. composer audit will flag it and its transitive tree indefinitely. With zero dependents, there is no shared maintenance and no upstream to send patches to.

Support. No active maintainer, no responsive issue tracker, no documentation beyond Sonata's (which describes a different version). Internal support means reverse-engineering bundle conventions from an obsolete framework generation — the opposite of leverage.

Scaling. Not the constraint. The formatters are stateless and CPU-bound on content length; horizontal scaling is trivial. The real concern is whether the code runs at all in our runtime. If any piece were reused, cache rendered HTML per content version so parsing happens once per edit, not once per read.

Failure modes.

  • Loud: Composer refuses to resolve; install aborts. Cheap to detect, cheap to recover.
  • Silent (worst): resolution succeeds by downgrading shared Symfony components, degrading the host Laravel app in ways that surface weeks later.
  • Runtime: Twig extension and admin extension expect services (Twig environment, Sonata admin pool) that Laravel never constructs.
  • Security: unpatched HTML/Markdown pipeline producing XSS if raw formatter is exposed to user input without sanitization.
  • Availability: an orphaned fork disappearing from Packagist/GitHub breaks reproducible builds.

Ramp-up. Negative. Nothing an engineer learns here transfers to the Laravel codebase; the bundle's conventions are a dead end. The cost to properly evaluate and rule it out (~half a day proving incompatibility) already exceeds the cost of implementing a native equivalent with maintained libraries (~1–2 days).

Recommendation: decline. The 6.81 opportunity score should be discounted — it reads as a generic "formatting is a common need" signal, not an assessment of this artifact. The decisive facts are 0 stars, 0 dependents, archived, and a framework mismatch with the stated stack. If the underlying requirement is real, satisfy it with league/commonmark + a purifier in Laravel, or with upstream Sonata in a legacy Symfony estate; do not adopt this fork in either case.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
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