PHPackages                             valksor/php-spx-profiler - 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. valksor/php-spx-profiler

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

valksor/php-spx-profiler
========================

A Symfony profiler data collector for the SPX PHP profiler, which collects and displays profiling data for PHP applications

00PHPCI passing

Since Dec 28Pushed 3mo agoCompare

[ Source](https://github.com/valksor/php-spx-profiler)[ Packagist](https://packagist.org/packages/valksor/php-spx-profiler)[ RSS](/packages/valksor-php-spx-profiler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Valksor Component: SpxProfiler
==============================

[](#valksor-component-spxprofiler)

[![valksor](https://camo.githubusercontent.com/2af5a6a7e5f7da47cd0a924c8b00038f208f45f9b0d5be8d7a497a9808168187/68747470733a2f2f62616467656e2e6e65742f7374617469632f6f72672f76616c6b736f722f677265656e)](https://github.com/valksor)[![BSD-3-Clause](https://camo.githubusercontent.com/72547f8afb6b5ace804caebbf95c3bcbfc027ce9214777bc452f308f3165db01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4253442d2d332d2d436c617573652d677265656e3f7374796c653d666c6174)](https://github.com/valksor/php-spx-profiler/blob/master/LICENSE)[![Coverage Status](https://camo.githubusercontent.com/ee3800e59a44db9a47c925119a3be31962f270e37485768249870b6e43c1f213/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76616c6b736f722f7068702d7370782d70726f66696c65722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/valksor/php-spx-profiler?branch=master)[![php](https://camo.githubusercontent.com/77da2f7bbc049873edb2d1045a756d7a32e3ba50440a8e0e76a9109f62f0771b/68747470733a2f2f62616467656e2e6e65742f7374617469632f7068702f2533453d382e342f707572706c65)](https://www.php.net/releases/8.4/en.php)

A Symfony profiler data collector for the SPX PHP profiler, which collects and displays detailed profiling data for PHP applications. This component integrates SPX profiling directly into the Symfony web profiler for easy access to performance metrics during development.

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

[](#installation)

Install the package via Composer:

```
composer require valksor/php-spx-profiler
```

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

[](#requirements)

- **PHP 8.4 or higher**
- **SPX PHP extension** installed and configured
- **Symfony Framework** (7.2.0 or higher)
- **Valksor Bundle** for automatic configuration

Configuration
-------------

[](#configuration)

The SpxProfiler component has a simple configuration with a single user-configurable option:

```
# config/packages/valksor.yaml
valksor:
    spx_profiler:
        enabled: true # Enable/disable the SPX profiler integration
```

### Configuration Options

[](#configuration-options)

OptionTypeDefaultDescription`enabled`boolean`true`Enable or disable the SPX profiler data collector*See: [`SpxProfilerConfiguration.php`](DependencyInjection/SpxProfilerConfiguration.php) for the complete configuration schema.*

Features
--------

[](#features)

The SpxProfiler component provides comprehensive profiling integration for Symfony applications:

- **Symfony Profiler Integration**: Seamless integration with Symfony's web profiler toolbar
- **SPX Data Collection**: Automatic collection and display of detailed SPX profiling metrics
- **Real-time Performance Metrics**: Wall time, memory usage, call graphs, and execution traces
- **Request Matching**: Automatic matching of SPX reports with Symfony profiler requests
- **Development Workflow**: Streamlined profiling setup for development environments

### Viewing Profiling Data

[](#viewing-profiling-data)

Once the component is installed and enabled, you can view profiling data in the Symfony web profiler:

1. Enable SPX profiling for a request by adding the SPX\_KEY parameter to the URL or setting the SPX\_ENABLED cookie to 1
2. Make a request to your application
3. Open the Symfony web profiler for that request
4. Click on the SPX tab to view the profiling data

### Prerequisites

[](#prerequisites)

The SpxProfiler component requires the SPX PHP extension to be installed and configured separately. For SPX extension setup instructions, see the [SPX documentation](https://github.com/NoiseByNorthwest/php-spx).

Contributing
------------

[](#contributing)

Contributions are welcome!

- Code style requirements (PSR-12)
- Testing requirements for PRs
- One feature per pull request
- Development setup instructions

To contribute to SpxProfiler component:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/spx-enhancement`)
3. Implement your enhancement following existing patterns
4. Add comprehensive tests for new functionality
5. Ensure all tests pass and code style is correct
6. Submit a pull request

### Adding New Profiling Features

[](#adding-new-profiling-features)

When adding new profiling functionality:

1. Extend the data collector to capture additional metrics
2. Update Twig templates for displaying new data
3. Add configuration options for new features
4. Test integration with SPX extension
5. Update documentation with examples

Security
--------

[](#security)

If you discover any security-related issues, please email us at  instead of using the issue tracker.

Support
-------

[](#support)

- **Documentation**: [Full documentation](https://github.com/valksor/php-valksor)
- **Issues**: [GitHub Issues](https://github.com/valksor/php-valksor/issues) for bug reports and feature requests
- **Discussions**: [GitHub Discussions](https://github.com/orgs/valksor/discussions/categories/php-valksor) for questions and community support

Credits
-------

[](#credits)

- **[Original Author](https://github.com/valksor)** - Creator and maintainer
- **[All Contributors](https://github.com/valksor/php-valksor/graphs/contributors)** - Thank you to all who contributed
- **[SPX Author](https://github.com/NoiseByNorthwest)** - Creator of the SPX PHP profiler extension
- **[Symfony Profiler Team](https://symfony.com/doc/current/profiler.html)** - Profiler framework and best practices inspiration
- **[Valksor Project](https://github.com/valksor)** - Part of the larger Valksor PHP ecosystem

License
-------

[](#license)

This package is licensed under the [BSD-3-Clause License](LICENSE).

About Valksor
-------------

[](#about-valksor)

This package is part of the [valksor/php-valksor](https://github.com/valksor/php-valksor) project - a comprehensive PHP library and Symfony bundle that provides a collection of utilities, components, and integrations for Symfony applications.

The main project includes:

- Various utility functions and components
- Doctrine ORM tools and extensions
- API Platform integrations
- Symfony bundle for easy configuration
- And much more

If you find this SpxProfiler component useful, you might want to check out the full Valksor project for additional tools and utilities that can enhance your Symfony application development.

To install the complete package:

```
composer require valksor/php-valksor
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

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

---

Top Contributors

[![k0d3r1s](https://avatars.githubusercontent.com/u/38725938?v=4)](https://github.com/k0d3r1s "k0d3r1s (38 commits)")

### Embed Badge

![Health badge](/badges/valksor-php-spx-profiler/health.svg)

```
[![Health](https://phpackages.com/badges/valksor-php-spx-profiler/health.svg)](https://phpackages.com/packages/valksor-php-spx-profiler)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M909](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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