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

Fractal Bundle Laravel Package

samj/fractal-bundle

Symfony bundle integrating League\Fractal for transforming API data with transformers, serializers, and includes. Fractal's manager, serializers, and transformers are wired through Symfony's DI container, so you can produce consistent, well-structured JSON responses for your REST API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Framing correction up front: despite the request describing this as a "Laravel/PHP package," samj/fractal-bundle is a Symfony2 bundle, not a Laravel package. It exists to wire Symfony's service container into League Fractal transformers so transformers can receive constructor dependencies. There is no Laravel service provider, no facade, no config publishing. This distinction is the single most important finding in the evaluation, because it determines whether the package is merely stale or categorically unusable for our stack.

Architecture fit. The underlying library, league/fractal, is sound: a transformation/presentation layer for API output with support for includes, embedded resources, serializers, and pagination adapters. The bundle adds only one thing of substance — dependency injection into transformer classes. That is a genuinely useful convenience in a Symfony 2 codebase where autowiring was immature, but it is a thin layer. On a Laravel or modern Symfony stack, the container can autowire transformer constructors natively, so the bundle's entire value proposition collapses into roughly a few dozen lines of service-provider or service-configuration code we could own ourselves.

Integration feasibility. Poor. The bundle is archived, last released 2020-06-19, with 27 stars and zero dependents. Zero dependents is the most damning signal: no downstream project in the ecosystem validates that this thing installs and runs against anything. It almost certainly constrains league/fractal to a 0.x line and targets Symfony 2.x service definition conventions — a framework branch that has been end-of-life since 2018. Installing it alongside a modern PHP runtime (8.x) and a supported Symfony or Laravel release would likely fail Composer resolution outright, or succeed only by pinning transitive dependencies to versions we do not want to defend in a security review.

Technical risk: high.

  • Abandonment risk — realized, not prospective. Archived means no security patches, no PHP 8.x compatibility work, no upstream fixes. This is not a "watch" item; it is a closed book.
  • Ecosystem mismatch. Wrong framework family for our stated stack.
  • Low signal quality. 27 stars and the low opportunity score (13.18) indicate a package that never achieved adoption, so there is little community knowledge to draw on when it misbehaves.
  • Version lock. Adopting it would pin Fractal and possibly PSR/container versions, rippling into unrelated upgrade work.

Key questions I would need answered before any decision:

  1. What is the actual target stack — Laravel, Symfony 2.x legacy, or a modern Symfony? If Laravel, this package is out of scope on day one.
  2. What is the real requirement: dependency injection into transformers, or output transformation generally? If the latter, native options (Laravel API Resources, Symfony Serializer/Normalizers) may remove the Fractal dependency entirely.
  3. Is there an existing application already running this bundle, or is this a greenfield consideration? The answer changes this from "evaluate" to "migration planning."
  4. What PHP version must we support over the next 24 months?

Integration Approach

Stack fit. None for a Laravel codebase. Marginal-to-poor for a modern Symfony codebase. Acceptable only inside an existing Symfony 2.x application that already depends on it and cannot be upgraded this quarter — and even then, only as a frozen, quarantined dependency.

Recommended path: do not integrate the bundle. Integrate Fractal directly, if at all.

  • Bind League\Fractal\Manager as a singleton in our own container configuration.
  • Register transformers as ordinary autowired services; constructor injection then works without any third-party bundle.
  • Where transformation is a means to an end rather than a hard requirement, evaluate framework-native serialization first — it removes a dependency rather than adding a fragile one.

Migration path for an existing install.

  1. Inventory every transformer and the services it injects; the bundle's DI graph is the only thing we actually depend on.
  2. Reproduce that graph in application-owned configuration (Laravel service provider or Symfony services.yaml with autowiring).
  3. Verify transformer resolution and output parity against a golden-file test suite built from current API responses.
  4. Remove the bundle; pin league/fractal to a supported major version, adjusting serializers and include handling as needed.
  5. Delete the archived dependency from the lockfile so it cannot quietly reappear.

Compatibility. Expect breakage at the Fractal major-version boundary (serializer API, resource/collection interfaces) and at the Symfony container-definition boundary. Budget for both, not one.

Sequencing. (a) Confirm stack and requirement — one week; (b) spike the native DI wiring in a branch — days, not weeks; (c) parity testing against captured responses; (d) cut over behind a feature flag; (e) remove the bundle and re-run dependency and security scans. If an existing install must stay for now, wrap it so no new code imports bundle classes, and set an explicit removal date.

Operational Impact

Maintenance. The maintenance burden transfers entirely to us. Archiving means upstream will not accept issues, fix container incompatibilities, or address CVEs in the dependency chain. Any fix we need becomes a fork we own forever — a poor trade for a package that saves perhaps a day of wiring.

Support. No vendor, no active maintainer, no community of dependents to consult. Internal knowledge will decay quickly, and the original author owes us nothing. This is unsupportable software by any reasonable definition.

Scaling. Runtime scaling is a non-issue: Fractal is CPU-bound transformation work, trivially horizontally scalable, and often cacheable per response shape. The bundle adds container-compilation cost at boot, not request-time scaling risk. The scaling problem here is organizational — every engineer who touches the API layer must learn a dead framework's conventions.

Failure modes to expect.

  • Composer resolution failure on a PHP or Symfony upgrade, blocking unrelated work.
  • Container compilation errors from stale service-definition syntax.
  • Silent misconfiguration where a transformer is resolved but a dependency is null, producing subtly wrong output rather than a loud error.
  • Security scanners flagging an unmaintained dependency, forcing an unplanned migration under time pressure.
  • Fractal major-version drift making third-party documentation and Stack Overflow answers inapplicable.

Ramp-up. The conceptual learning curve is low — it is a thin bundle over a well-understood library. The real cost is the absence of documentation and the wrongness of most online examples relative to our pinned versions. Estimate a few days for an engineer familiar with the framework, plus the hidden tax of debugging a dependency nobody else in the world is running.

Bottom line for the portfolio. Do not adopt. The opportunity score, star count, dependent count, archive status, and framework mismatch all point the same direction. If an existing application depends on it, treat removal as planned technical-debt retirement with a dated milestone, and fund the small amount of application-owned DI wiring that replaces it.

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.
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
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource