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

Framework Extra Bundle Laravel Package

short-edition/framework-extra-bundle

Framework Extra Bundle extends Laravel with practical helpers, traits, and utilities that reduce everyday boilerplate. With simple service provider registration, it drops convenient, reusable features into your app without restructuring existing code, helping you ship faster.

View on GitHub
Deep Wiki
Context7

Getting Started

Read this first: this is not a Laravel package. short-edition/framework-extra-bundle is a fork of sensio/framework-extra-bundle, a Symfony bundle that hooks into Symfony's HttpKernel to turn controller attributes/annotations into behavior. It has no service provider, no facade, no Blade/Twig-for-Laravel bridge, and no route integration with Laravel's router. A Laravel developer's realistic day-to-day leverage is zero unless you are maintaining a legacy Symfony app (or a hybrid project with a Symfony component you actually boot). If you are inside a Laravel codebase, do not install it — use the native equivalents below.

Before writing any code, check three things in the repo:

  1. composer.json — the symfony/* and php version constraints. A 0-star fork is usually kept alive for one specific version matrix; mismatches are the #1 install failure.
  2. The diff against upstream sensio/framework-extra-bundle (last upstream release is ancient and the bundle is effectively abandoned/replaced by Symfony core attributes). Know what the fork actually changed.
  3. Configuration/ and Attributes/ (or Configuration/ if it still uses annotations) — this is the entire public surface area: Template, Cache, Security/IsGranted, ParamConverter/Entity, Method, View.

Minimal Symfony steps (if you genuinely need it):

composer require short-edition/framework-extra-bundle
// config/bundles.php
return [
    // ...
    Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
];

Then use it on a controller:

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;

#[IsGranted('ROLE_USER')]
#[Cache(smaxage: 3600)]
#[Template]
public function show(Product $product): array
{
    return ['product' => $product];
}

First useful use case for a Laravel developer is conceptual, not runtime: read the ParamConverter and Template attributes as the direct ancestors of Laravel's route model binding and return view(...). If you are porting patterns from a Symfony codebase into Laravel, map them immediately rather than trying to run the bundle.

Implementation Patterns

Laravel developers should treat this bundle as a pattern dictionary and, in a real Symfony app, keep the attributes thin. Mapping table for daily work:

Bundle feature What it does Laravel equivalent
#[Template] Resolves view name from controller/action, returns array as view data return view('controller.action', $data); invokable controllers
#[ParamConverter] / #[Entity] Doctrine entity resolution into controller args, 404 on miss Route model binding; explicit Route::bind() in RouteServiceProvider
#[IsGranted] / #[Security] Runtime authorization check via Symfony's security $this->authorize(...), Gate::authorize, can: middleware
#[Cache] Sets ETag/Last-Modified/s-maxage/expires from attributes ->middleware('cache.headers:...'), response header helpers
#[Method] Restricts HTTP verbs Route::get/post/match, ->methods([...])
#[View] Serialization view layer API Resources / JsonResource

Workflow patterns that actually pay off in a Symfony codebase:

  • Thin controllers, attribute-driven config. Put one attribute per concern; avoid stacking #[Security] expressions that duplicate what a voter already does.
  • Authorization in one place. Prefer #[IsGranted] on the action or controller class over ad-hoc checks; treat #[Security] expressions as a last resort because they are strings and invisible to static analysis.
  • Implicit conversion is opt-in. #[ParamConverter] works best on typed scalar/entity args where the parameter name matches the route placeholder. For anything else, use an explicit converter or a service call.
  • Cache attributes for GET-only, user-agnostic responses. If the response varies by user, session, or flash messages, the attribute is a trap — see gotchas.
  • Integration tip: in a hybrid or migrating app, mirror the bundle's behavior in Laravel middleware first (cache headers, model binding, policy checks) so the Symfony-side attributes and the Laravel side stay behaviorally identical. Keep the Symfony controllers as the reference implementation while you port.

If you must work on the fork itself: pin a commit, run the upstream test suite against your Symfony version, and keep the diff in Attributes/ or Configuration/ small — those classes are consumed by compiler-pass-driven listeners whose API is not stable across Symfony majors.

Gotchas and Tips

  • Laravel won't boot it. There is no ServiceProvider, no Facade, and the entire mechanism is Symfony event listeners (kernel.controller, kernel.view, argument resolvers). Composer-installing it in a Laravel app does nothing except add dead weight.
  • Treat 0 stars / 0 dependents as a supply-chain signal. A fork with no adoption gets no security review. Prefer the official upstream until you confirm the fork patches something specific you need (PHP 8.x support, a removed Symfony class). Vendor the diff and review it.
  • Much of this bundle is superseded by Symfony core. Routing attributes moved into Symfony\Component\Routing\Attribute\Route (5.3+), IsGranted is in Symfony\Component\Security\Http\Attribute\IsGranted (5.2+), and ParamConverter is largely replaced by #[MapEntity] (Symfony\Bridge\Doctrine\Attribute\MapEntity) and #[MapRequestPayload]. Before adopting the bundle, grep your Symfony version for the attribute you need; you may not need the bundle at all.
  • #[Cache] misuse silently serves the wrong content. ETag/Last-Modified are computed from the response; if the response body varies by user, role, or locale, downstream shared caches can leak data. Never annotate authenticated or personalized actions. Debug with the Symfony profiler's Cache panel and bin/console debug:router --show-controllers.
  • ParamConverter misses look like 500s, not 404s. A typo'd entity class or a route param that doesn't match the argument name causes a conversion exception (or no conversion at all under implicit mode). Check sensio_framework_extra.request.auto_convert and the argument name first; use bin/console debug:container --tag=controller.argument_value_resolver.
  • #[Security] is an ExpressionLanguage string. Typos and subject scope errors blow up at request time, not compile time. Prefer #[IsGranted] and real voters.
  • Config quirks are per-concern and default to "on". sensio_framework_extra.router.annotations, .security.annotations, .view.annotations, .cache.annotations, and .request.converters toggles are independent — disabling one does not disable siblings. If a feature "doesn't work," check the config key for that specific area before the code.
  • Clear the cache after changing attributes or bundle config (bin/console cache:clear); attribute metadata is cached in the compiled container and stale attributes are a common red herring.
  • Extension points: implement ParamConverterInterface and tag the service request.param_converter; add a custom argument value resolver; subscribe to kernel.controller. These are the supported seams — do not monkey-patch the bundle's listeners.
  • Static analysis is blind to attributes. Add PHPStan/Psalm rules or rely on integration tests (WebTestCase hitting each annotated action) — this is the practical equivalent of Laravel feature tests for routes, and it is the only thing that reliably catches broken attribute wiring.
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.
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
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo