phprofiler/symfony-phprofiler

Symfony bundle to capture PHProfiler profiling data

dev-main 2024-06-11 22:23 UTC

This package is auto-updated.

Last update: 2024-11-11 23:13:41 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Laravel middleware to capture PHProfiler profiling data. This bundle is compatible with Symfony 5.4, 6.0, and 7.0.

Installation

You can install the bundle via composer:

composer require phprofiler/symfony-phprofiler

Configuration

Add the following environment variables to your .env file:

PHPROFILER_ENABLED=true
PHPROFILER_DSN={Get your DSN from the PHProfiler UI}

Usage

Register the Bundle

If your Symfony version does not support Flex or auto-discovery, you need to register the bundle manually in config/bundles.php:

return [
    // Other bundles...

    PHProfiler\SymfonyPHProfilerBundle\PHProfilerBundle::class => ['all' => true],
];

Publishing Configuration

To publish the configuration file, run the following command:

php bin/console config:dump-reference PHProfilerBundle

Profiling Data Capture

The bundle automatically captures profiling data for each request and sends it asynchronously to the configured DSN.

License

The Apache 2.0 License (Apache-2.0). Please see License File for more information.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any issues, please create a new issue in the GitHub Issue Tracker.