PHPackages                             maantje/xhprof-buggregator-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. maantje/xhprof-buggregator-laravel

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

maantje/xhprof-buggregator-laravel
==================================

Xhprof buggregator integration for Laravel

v0.8.0(3mo ago)46351.4k↓34.5%10[1 PRs](https://github.com/maantje/xhprof-buggregator-laravel/pulls)MITPHPPHP ^8.2CI passing

Since Oct 17Pushed 1w ago2 watchersCompare

[ Source](https://github.com/maantje/xhprof-buggregator-laravel)[ Packagist](https://packagist.org/packages/maantje/xhprof-buggregator-laravel)[ Docs](https://github.com/maantje/xhprof-buggregator-laravel)[ RSS](/packages/maantje-xhprof-buggregator-laravel/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (12)Versions (15)Used By (0)

Xhprof support in buggregator for Laravel
=========================================

[](#xhprof-support-in-buggregator-for-laravel)

Welcome to the Xhprof integration package for [buggregator](https://buggregator.dev/) in Laravel. This repository allows you to effortlessly enable Xhprof support for buggregator in your Laravel application.

Requirements
------------

[](#requirements)

Make sure that your server is configured with following PHP version and extensions:

- PHP 8.2+
- Laravel 10, 11 or 12
- [XHProf](http://pecl.php.net/package/xhprof) ext or its fork [longxinH/xhprof](https://github.com/longxinH/xhprof).

Installation
------------

[](#installation)

To get started, install the package via composer:

```
composer require --dev maantje/xhprof-buggregator-laravel
```

Usage
-----

[](#usage)

Set the buggregator endpoint in your environment file, the displayed value is the default value:

```
PROFILER_ENDPOINT=http://127.0.0.1:8000/api/profiler/store
```

Toggle Xhprof in your environment file as needed, but remember to disable it when not in use to avoid performance impact

```
XHPROF_ENABLED=true
```

Alternatively, you can include the `X-Xhprof-Enabled` header in your request to explicitly enable or disable profiling for that specific call. When this header is present, it takes precedence over the environment variable.

Enabled values: `true` `1` `on` `yes`
Disabled values: `false` `0` `off` `no`

This feature works great with a browser extension like [ModHeader](https://modheader.com/). It lets you switch profiling on and off right from your browser.

### Usage Profiler

[](#usage-profiler)

By default, the profiler is turned on and off with each HTTP request. However, you may have other points where your\\application starts. For example, it can be queues, commands, and so on.

In such cases, you can configure the profiler to run in the desired location yourself:

```
use SpiralPackages\Profiler\Profiler;

class RegisterUserActionJob
{
    public function __construct(
        public string $name,
        public string $password
    ) {
    }

    /**
     * Get Profiler object from Container DI
     *
     * @param Profiler $profiler
     * @return void
     */
    public function handle(Profiler $profiler): void
    {
        try {
            $profiler->start();

            // code for register new user
        }
        finally {
            $profiler->end();
        }
    }
}
```

### Usage with Sail

[](#usage-with-sail)

Add the buggregator service to your docker-compose file:

```
buggregator:
    image: ghcr.io/buggregator/server:dev
    ports:
        - 8000:8000
        - 1025:1025
        - 9912:9912
        - 9913:9913
    networks:
        - sail
```

Set the profiler endpoint in your environment file:

```
PROFILER_ENDPOINT=http://buggregator:8000/api/profiler/store
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance91

Actively maintained with recent releases

Popularity49

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~99 days

Recently: every ~156 days

Total

10

Last Release

95d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.7.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/f40d5cff5f8299f4f3909701969fd2c677e41245b2ce26f975f3dd806b010ee1?d=identicon)[moijamie](/maintainers/moijamie)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (17 commits)")[![maantje](https://avatars.githubusercontent.com/u/9058265?v=4)](https://github.com/maantje "maantje (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![phh](https://avatars.githubusercontent.com/u/1304003?v=4)](https://github.com/phh "phh (1 commits)")[![alies-dev](https://avatars.githubusercontent.com/u/5278175?v=4)](https://github.com/alies-dev "alies-dev (1 commits)")[![popkovkirill](https://avatars.githubusercontent.com/u/6718174?v=4)](https://github.com/popkovkirill "popkovkirill (1 commits)")[![ARTWINPRO](https://avatars.githubusercontent.com/u/16427316?v=4)](https://github.com/ARTWINPRO "ARTWINPRO (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")

---

Tags

buggregatorlaravelphpxhproflaravelxhprofmaantjebuggregator

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/maantje-xhprof-buggregator-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/maantje-xhprof-buggregator-laravel/health.svg)](https://phpackages.com/packages/maantje-xhprof-buggregator-laravel)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
