PHPackages                             tourze/symfony-profiler-markdown-bundle - 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. tourze/symfony-profiler-markdown-bundle

ActiveSymfony-bundle[Debugging &amp; Profiling](/categories/debugging)

tourze/symfony-profiler-markdown-bundle
=======================================

A Symfony bundle that exports Symfony Profiler data as Markdown format for easy sharing and archiving

0.0.2(5mo ago)00MITPHPCI passing

Since Nov 14Pushed 4mo agoCompare

[ Source](https://github.com/tourze/symfony-profiler-markdown-bundle)[ Packagist](https://packagist.org/packages/tourze/symfony-profiler-markdown-bundle)[ RSS](/packages/tourze-symfony-profiler-markdown-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (26)Versions (3)Used By (0)

Symfony Profiler Markdown Bundle
================================

[](#symfony-profiler-markdown-bundle)

[English](README.md) | [中文](README.zh-CN.md)

A Symfony bundle that exports Symfony Profiler data as Markdown format, making it easy to share and archive profiling reports.

🚀 Features
----------

[](#-features)

- **Markdown Export**: Export Symfony Profiler data to well-formatted Markdown
- **Multiple Collectors**: Supports all standard Symfony profiler collectors (Request, Time, Memory, Security, Doctrine, etc.)
- **Extensible Formatters**: Customizable formatter system for different data types
- **Direct Access**: Access profiler reports via `/_profiler/{token}.md` endpoint
- **Rich Formatting**: Includes tables, code blocks, and emoji indicators for better readability

📦 Installation
--------------

[](#-installation)

Install the bundle using Composer:

```
composer require tourze/symfony-profiler-markdown-bundle
```

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Enable the Bundle

[](#1-enable-the-bundle)

Add the bundle to your `config/bundles.php`:

```
// config/bundles.php
return [
    // ...
    Tourze\ProfilerMarkdownBundle\ProfilerMarkdownBundle::class => ['all' => true],
];
```

### 2. Configure Dependencies

[](#2-configure-dependencies)

This bundle requires the following bundles:

- `DoctrineBundle` (for database profiling)
- `SecurityBundle` (for security profiling)
- `RoutingAutoLoaderBundle` (for automatic route loading)

Make sure these are enabled in your application.

🔧 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

Once installed, you can access any profiler report in Markdown format by visiting:

```
http://your-app.com/_profiler/{token}.md

```

Replace `{token}` with the actual profiler token from your Symfony toolbar.

### Example URL

[](#example-url)

```
http://localhost:8000/_profiler/a1b2c3d.md

```

This will generate a comprehensive Markdown report including:

- **Summary**: Request overview with token, URL, method, status, time, IP
- **Table of Contents**: Navigation links to all collector sections
- **Detailed Sections**: Formatted data from each profiler collector:
    - 📨 **Request**: HTTP request details, headers, parameters
    - ⏱️ **Performance**: Execution time, timeline data
    - 💾 **Memory**: Memory usage statistics
    - 🔒 **Security**: Authentication and authorization details
    - 🗄️ **Database**: Doctrine queries and performance metrics
    - 🎨 **Templates**: Twig rendering information
    - 📋 **Logs**: Application log entries
    - And more...

🎨 Formatters
------------

[](#-formatters)

The bundle includes specialized formatters for different data types:

### Built-in Formatters

[](#built-in-formatters)

- **RequestFormatter**: HTTP request/response data
- **TimeFormatter**: Performance timing data
- **MemoryFormatter**: Memory usage statistics
- **SecurityFormatter**: Security events and decisions
- **DoctrineFormatter**: Database queries and metrics
- **TwigFormatter**: Template rendering data
- **LoggerFormatter**: Log entries with levels and formatting

### Custom Formatters

[](#custom-formatters)

You can create custom formatters by implementing `MarkdownFormatterInterface`:

```
