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
Symfony Aggregated Queries

Symfony Aggregated Queries Laravel Package

rgalstyan/symfony-aggregated-queries

Symfony bundle for building and running aggregated SQL queries via Doctrine DBAL. It helps compose queries with filters, groupings, and aggregate functions such as COUNT, SUM, AVG, and MIN/MAX, simplifying reporting and analytics inside Symfony applications.

View on GitHub
Deep Wiki
Context7

Reduce multi-relation Doctrine queries to a single SQL statement using JSON aggregation. Solves Doctrine's N+1 problem.

Frequently asked questions about Symfony Aggregated Queries
What is rgalstyan/symfony-aggregated-queries used for?
It is a Symfony bundle for defining named query groups and running multiple aggregated SQL queries in a single request using Doctrine DBAL. It supports filters, groupings, and aggregate functions such as COUNT, SUM, AVG, MIN, and MAX. The result is a structured, cache-friendly response that helps reduce round trips for reporting and batch data fetching.
How do I install rgalstyan/symfony-aggregated-queries with Composer?
Install it with composer require rgalstyan/symfony-aggregated-queries and register the bundle using normal Symfony bundle conventions. The package is published as a Symfony bundle, so the documented setup path is Symfony-oriented. If you are evaluating it for Laravel, plan to wire configuration and services yourself unless you confirm a supported integration path.
Does rgalstyan/symfony-aggregated-queries support Laravel?
The published package is a Symfony bundle, and the provided overview does not document a Laravel service provider or Laravel-specific installation steps. The benchmarks being built on a Symfony application suggest the core is decoupled from Symfony internals, which is a portability signal but not a Laravel support guarantee. Treat Laravel adoption as an integration spike and verify it in a non-production branch first.
How do I configure named query groups in this Symfony bundle?
You define named query groups in configuration and then execute multiple queries as one grouped request. The package is designed around a clean, configurable API for composing filters, groupings, and aggregate selections. The exact configuration schema is not included in the provided excerpt, so follow the repository README for the concrete syntax and keep the configuration under version control.
Can it run COUNT, SUM, AVG, MIN and MAX aggregate queries?
Yes. The package is described as supporting aggregate functions including COUNT, SUM, AVG, and MIN/MAX, composed with filters and groupings. That makes it suitable for reporting and analytics queries that need several aggregate results returned together. Results are returned as one structured response rather than as separate query calls.
Is rgalstyan/symfony-aggregated-queries fast enough for Laravel production reporting?
Version 1.0.2 adds benchmarks, but they are built on a Symfony application and the published environment details are not included in the provided context. Those numbers are useful evidence of reproducibility, not a direct proxy for performance inside a Laravel request lifecycle with middleware, container resolution, and Eloquent overhead. Run the harness against your own read-heavy and write-heavy endpoints before relying on it for production reporting.
What changed in version 1.0.2 of rgalstyan/symfony-aggregated-queries?
Version 1.0.2 is a documentation and benchmark-only release with no API, configuration, or runtime behavior changes. Upgrading is a Composer version bump with no migration steps for consuming applications. Before deploying, confirm that any new benchmark tooling sits under require-dev and is excluded from production installs using --no-dev.
What are alternatives to this package for aggregated queries in Laravel?
In Laravel you can use the query builder or DB facade to run aggregate queries, use Eloquent for model-based aggregation, or write raw SQL for complex reporting. Dedicated reporting and analytics packages may also fit if you need dashboards or scheduled summaries. This package is worth considering only if its named query groups and multi-query composition model justify the Symfony-first integration work.
How should I test and benchmark this package in a Laravel application?
Install the patch in a non-production environment, confirm the composer.lock diff adds no production dependencies, and run your existing smoke and integration tests, which should pass unchanged. Then reuse the published benchmark harness against representative Laravel endpoints and pin PHP version, opcache or JIT settings, database engine, and hardware so results are comparable. Record the baseline next to your own SLOs so future upgrades can be diffed.
Is rgalstyan/symfony-aggregated-queries maintained and safe to pin in Composer?
The v1.0.2 release is a semver-compatible patch on the pre-1.1 line, so pinning ^1.0 and taking patches on your normal dependency cadence is reasonable. Technical risk is low, but benchmark suites can drift if they are not run in CI, so confirm whether the harness is CI-gated and whether a support matrix exists. Also verify that the package's Symfony orientation and Doctrine DBAL dependency match your application's constraints.
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