PHPackages                             mgdsoft/symfony-profiler-spa - 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. mgdsoft/symfony-profiler-spa

ActiveLibrary

mgdsoft/symfony-profiler-spa
============================

Symfony profiler enabled from vanilla js

v1.0.6(10mo ago)922.0k↑35.8%3MITJavaScriptPHP &gt;=7.0

Since Apr 6Pushed 10mo ago3 watchersCompare

[ Source](https://github.com/MGDSoft/symfony-profiler-spa)[ Packagist](https://packagist.org/packages/mgdsoft/symfony-profiler-spa)[ RSS](/packages/mgdsoft-symfony-profiler-spa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Symfony profiler for your SPA (Single page application)
=======================================================

[](#symfony-profiler-for-your-spa-single-page-application)

[![Symfony Sersion](https://camo.githubusercontent.com/320e09ebc82db90860805cd9632e920addbcee757ece7edef1887309f01b21a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d352f362f372d707572706c652e7376673f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79)](https://camo.githubusercontent.com/320e09ebc82db90860805cd9632e920addbcee757ece7edef1887309f01b21a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d352f362f372d707572706c652e7376673f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79)[![php Version](https://camo.githubusercontent.com/43ec75959670051369f4bc8bcb4c33d1709b3f6a31908c8f6804a9b98dd34ce3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372f382d626c756576696f6c6574)](https://camo.githubusercontent.com/43ec75959670051369f4bc8bcb4c33d1709b3f6a31908c8f6804a9b98dd34ce3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372f382d626c756576696f6c6574)[![Licence](https://camo.githubusercontent.com/dabf5f4e340f5feccb28b06b6248dca0d8a052fb5caf2abd614b1a656bc2edc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e63652d4d49542d627269676874677265656e)](https://camo.githubusercontent.com/dabf5f4e340f5feccb28b06b6248dca0d8a052fb5caf2abd614b1a656bc2edc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e63652d4d49542d627269676874677265656e)

This bundle allows you to integrate the Symfony profiler bar into your preferred JavaScript framework.

[![example](https://github.com/MGDSoft/symfony-profiler-spa/raw/main/docs/example_profiler_spa.png?raw=true "photo")](https://github.com/MGDSoft/symfony-profiler-spa/blob/main/docs/example_profiler_spa.png?raw=true)

### Here's a quick installation guide

[](#heres-a-quick-installation-guide)

Install the bundle into your **API PROJECT**

```
composer req mgdsoft/symfony-profiler-spa --dev
```

Add the new route to your **API PROJECT**:

```
# config/routes/web_profiler.yaml
when@dev:
    mgd_profiler_spa:
        resource: '@SymfonyProfilerSPABundle/Resources/config/routing/routing.yml'
        prefix: /
```

Create the asset or copy if you are not using asset component:

```
bin/console assets:install
```

This execution will copy 'load\_toolbar\_spa.js' file to your public folder, you only have to include it in your html file to your **FRONTEND project**:

```

```

That's all! The `load_toolbar_spa.js` is created in vanilla JavaScript, so it's available for use in all frameworks and libraries. Interceptors available for XHR and fetch.

### JS Config

[](#js-config)

For custom url toolbar you have to use this custom attribute `data-url-toolbar`

```

```

How it works
------------

[](#how-it-works)

If you take a look inside `src/Resources/public/load_toolbar_spa.js`, you'll find a simple script that creates an HTTP interceptor. The first `x-debug-token-link` header it detects will trigger a request to the API server to retrieve the profiler.

[![example](https://github.com/MGDSoft/symfony-profiler-spa/raw/main/docs/example_profiler_spa_loading_profile.gif?raw=true "loading profile")](https://github.com/MGDSoft/symfony-profiler-spa/blob/main/docs/example_profiler_spa_loading_profile.gif?raw=true)

Repo demo
---------

[](#repo-demo)

Here is a repository installed and ready for testing:

Trouble with CORS
-----------------

[](#trouble-with-cors)

Dont forget your nginx configuration to avoid cors

```
add_header Access-Control-Allow-Origin "http://yourdomain.lol";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization, x-debug-token-link, X-Debug-Token";
add_header Access-Control-Expose-Headers "X-Debug-Token, X-Debug-Token-Link";
```

Cool things
-----------

[](#cool-things)

Don't forget to configure your IDE to open errors/controllers, and for more information, please visit . If you have trouble configuring PHPStorm, you can use this snippet for a quick solution.

```
parameters:
    env(SYMFONY_IDE): "javascript: (function () { let file = '%%f'; file = file.replace('/var/www/your-project/', ''); let newUrl = 'http://localhost:63342/api/file?file='+file+'&line=%%l'; fetch(newUrl); })()"

framework:
    ide: '%env(SYMFONY_IDE)%'
```

Replace `/var/www/your-project/` with the current path of your project. It works using relative paths, so it will work in Docker. For more information, please visit ."

Enjoy!

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance53

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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.

###  Release Activity

Cadence

Every ~135 days

Recently: every ~198 days

Total

7

Last Release

326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/896bc1dc22720fe832ca4d74135728066f636f9604291176678d097c0dbfbed9?d=identicon)[MGDSoft](/maintainers/MGDSoft)

---

Top Contributors

[![MGDSoft](https://avatars.githubusercontent.com/u/3816465?v=4)](https://github.com/MGDSoft "MGDSoft (8 commits)")[![bigfoot90](https://avatars.githubusercontent.com/u/4598274?v=4)](https://github.com/bigfoot90 "bigfoot90 (1 commits)")[![Markus-Helfenstein](https://avatars.githubusercontent.com/u/163517883?v=4)](https://github.com/Markus-Helfenstein "Markus-Helfenstein (1 commits)")

---

Tags

ajaxdevelopmentprofilerspasymfony

### Embed Badge

![Health badge](/badges/mgdsoft-symfony-profiler-spa/health.svg)

```
[![Health](https://phpackages.com/badges/mgdsoft-symfony-profiler-spa/health.svg)](https://phpackages.com/packages/mgdsoft-symfony-profiler-spa)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[contao/manager-bundle

Provides the Contao Managed Edition

181.3M61](/packages/contao-manager-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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