sylius/report-bundle
Sylius ReportBundle adds configurable reporting to Sylius stores, with data fetchers, renderers, and admin integration for building and viewing reports. It helps manage report definitions and display store metrics.
Treat this as legacy-only. sylius/report-bundle is an archived, read-only subtree split of the Sylius monorepo, so a Laravel developer's realistic "day one" is either (a) maintaining an existing Sylius install that already has it, or (b) reading it for one hour to steal its domain model before building a Laravel-native equivalent. Do not composer require it into a Laravel app: it is a Symfony bundle and assumes a Sylius kernel, Doctrine, Twig, and the admin grid stack.
If you are on a legacy Sylius install that already depends on it:
composer.json and in the bundle registration (config/bundles.php on Symfony Flex, AppKernel::registerBundles() on older versions). Only register it if it is already a locked dependency — never add it fresh.@SyliusReportBundle/Resources/config/routing.yml).sylius_report-style entity) exists via your migrations or Doctrine schema tool; the bundle does not ship a Laravel migration.bin/console cache:clear) after touching registration or service tags.Where to look first, in order:
Model/Report — the actual contract. A report is a named row holding a data fetcher string alias, a renderer string alias, and some serialized configuration.DataFetcher/ and Renderer/ — the only two extension points you will realistically touch. This is where the bundle's value lives.DependencyInjection/ — find the compiler pass that collects tagged fetchers/renderers. That tag name is the real public API; read it rather than guessing.Resources/config/ — service wiring plus any shipped fetchers/renderers.Resources/views/ and Resources/translations/ — what you override for presentation.First use case: reproduce a trivial sales or registration report end-to-end. Create a report record (admin UI, fixture, or data migration), point it at a shipped fetcher and renderer, and confirm the admin list and report view render without template errors. That one loop teaches the entire bundle: fetcher produces data, renderer consumes it, the entity binds them by string alias.
The core loop is: resolve report by code → resolve fetcher by alias → fetch data → resolve renderer by alias → render. Everything else in the bundle is plumbing around that sentence.
Custom data fetcher:
DataFetcherInterface (check the vendored copy for the exact signature; broadly it receives the Report and returns something the renderer can consume).Custom renderer:
RendererInterface, inject Twig, render a template you own.Seeding reports without the admin UI:
code, name, dataFetcher alias, renderer alias, and serialized options. Seed them in a fixture or data migration when the admin screens are unreliable.code so you can load reports by code from your own controllers, console commands, or exporters.Reusing reports outside the admin:
If your real goal is a Laravel-native reporting module, mine this codebase for the vocabulary rather than the code: report definition, data source, filters, permissions, renderer, exporter, scheduler. Then implement it against Laravel primitives — queued generation for heavy queries, cached output keyed by report code plus filter hash, Eloquent/query builder fetchers behind an interface, Blade/API resources for renderers, and explicit policy classes for row-level access.
Sylius/Sylius; issues and PRs filed here go nowhere. Any bug you hit is your bug. Plan an exit, not a fork.DependencyInjection/ in your vendored copy and pin your version; do not copy tag strings from blog posts or older docs.Resources/views/.Model/Report, the fetcher interface, and the renderer interface, then rebuild the ~200 lines of pattern you actually want. You will get queueing, caching, caching invalidation, and Laravel auth policies — none of which this bundle has — for less effort than isolating a dead Symfony subtree.How can I help you explore Laravel packages today?