- What is reiterus/app-stats-symfony used for?
- It is a lightweight Symfony bundle that collects and exposes application-level statistics so you can track basic usage metrics inside an existing project. It integrates with Symfony's configuration and service container, so metrics are wired up as services rather than bolted on ad hoc. The architecture is extensible, meaning you can register custom metrics alongside the built-in ones and expose the collected results through your own controllers or commands.
- How do I install reiterus/app-stats-symfony with Composer?
- Install it as a normal Composer dependency and then register the bundle in your Symfony application's bundle configuration, typically in config/bundles.php. After that, publish or write the bundle configuration under config/packages and let Symfony's container wire the services. Because it is a standard Composer-installable PHP library, no custom build step is required beyond refreshing the lockfile and clearing the cache.
- How do I configure which statistics are collected?
- Configuration is handled through the bundle's Symfony configuration tree, which is merged into the service container at boot. You enable or adjust the statistics you care about in your application config rather than editing vendor code. For metrics that are not covered out of the box, the extensible architecture lets you add your own collectors as services and register them with the bundle.
- Does reiterus/app-stats-symfony work with Laravel?
- No, it is a Symfony bundle built around Symfony's bundle system, configuration tree, and service container, so it does not install or boot natively in a Laravel application. If you are evaluating it from a Laravel codebase, treat it as a reference implementation rather than a drop-in package. Laravel teams usually want a Laravel-native package or a small custom service instead.
- Which PHP version does v2.0.0 require, and can I still use PHP 8.0?
- Version 2.0.0 raises the minimum runtime to PHP 8.1, so applications on PHP 7.4 or 8.0 cannot adopt that release without upgrading the runtime first. The PHP requirement should be treated as a hard gate, not an optional upgrade, because Composer will refuse to resolve the package on older interpreters. Confirm whether the package declares only a minimum of 8.1 or also a maximum PHP version before planning your runtime matrix.
- Can I add custom metrics to the bundle?
- Yes, custom metrics are the main reason the bundle is described as extensible. You implement your own collector as a Symfony service and register it so the bundle includes it in the collected statistics. This keeps application-specific logic in your own code while the bundle handles configuration and exposure.
- How should I test that statistics are being collected correctly?
- Write functional tests that boot the Symfony kernel with the bundle enabled and assert on the values exposed by the stats services. Run those tests on the same PHP version you deploy, since 8.1 deprecations such as dynamic properties or implicit float-to-int conversions can surface as warnings or failures under strict error handling. Also run the existing suite after updating the Composer constraint so environment problems are caught before deployment.
- Is it safe and performant to run this bundle in production?
- The bundle is described as lightweight and focused on collecting and exposing basic app-level metrics, so there are no direct scaling implications called out in the evaluation. Standard production hygiene still applies: keep the configuration explicit per environment, avoid exposing raw internal metrics publicly, and verify behavior in staging. Monitor for deprecation warnings after upgrading, since strict error handling can turn them into exceptions.
- What breaking changes are in the v1 to v2 upgrade?
- The published release note is a single line covering the PHP 8.1 minimum, and it does not enumerate any signature, behavior, or configuration changes beyond that. Plan the upgrade as a major-version bump: read the changelog if one exists, diff the public API surface, and run your full test suite plus static analysis. Isolate the runtime upgrade from the package upgrade so any failure is attributable to one change.
- Who maintains reiterus/app-stats-symfony and what is the support outlook?
- The package is published under the reiterus vendor name and is installable from Packagist via Composer. Before adopting it, confirm the vendor's support policy for v1 versus v2, because if v1 is deprecated, security fixes may only land on v2. Also note that PHP 8.1 is past active support and approaching end of security support, so budget for a follow-on move to PHP 8.2 or 8.3 rather than treating 8.1 as the destination.