Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ node_modules/
composer.lock

.claude/
CLAUDE.md
16 changes: 15 additions & 1 deletion .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Example markdownlint YAML configuration with all properties set to their default value
#########################################################################
#
# █▀▀▄ ▀ ▀▀█▀▀ ▀█ █
# █ █ ▀█ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ █ ▄▀▀▄ ▄▀▀▄ █ █▀▀▄ ▄▀▀▄ █▄▀
# █ █ █ ▀▄ █ █ █ █ █ █ █ █ █ █ █ ▄▄█ █
# █▄▄▀ ▄█▄ ▀▄▄▀ ▀▄▄▀ ▀▄▄▀ █ ▀▄▄▀ ▀▄▄▀ ▄█▄ █▄▄▀ ▀▄▄▀ █
#
######### Customizable developer toolbar for Symfony projects ########
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
# @copyright 2025-2026 Marcin Orlowski
# @license https://opensource.org/license/mit MIT
# @link https://github.com/MarcinOrlowski/php-discotoolbar-symfony
#
#########################################################################

# Default state for all rules
default: true
Expand Down
40 changes: 23 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
##################################################################################
#
# Laravel API Response Builder PHPStan config file
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
# @copyright 2016-2025 Marcin Orlowski
# @license http://www.opensource.org/licenses/mit-license.php MIT
# @link https://github.com/MarcinOrlowski/laravel-api-response-builder
#
##################################################################################
#########################################################################
#
# █▀▀▄ ▀ ▀▀█▀▀ ▀█ █
# █ █ ▀█ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ █ ▄▀▀▄ ▄▀▀▄ █ █▀▀▄ ▄▀▀▄ █▄▀
# █ █ █ ▀▄ █ █ █ █ █ █ █ █ █ █ █ ▄▄█ █
# █▄▄▀ ▄█▄ ▀▄▄▀ ▀▄▄▀ ▀▄▄▀ █ ▀▄▄▀ ▀▄▄▀ ▄█▄ █▄▄▀ ▀▄▄▀ █
#
######### Customizable developer toolbar for Symfony projects ########
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
# @copyright 2025-2026 Marcin Orlowski
# @license https://opensource.org/license/mit MIT
# @link https://github.com/MarcinOrlowski/php-discotoolbar-symfony
#
#########################################################################

#
# Using pre-commit hooks #
#
# To improve quality of your commit, it's recommended to use "pre-commit"
# (http://pre-commit.com) hooks, that will block your commits unless all tests
# pass. This project comes with template configuration file
# `.pre-commit-config.yaml.dist`.
# (http://pre-commit.com) hooks, that will block your commits unless all tests pass.
#
# Brief installation instruction:
#
# * Ensure you got Python installed
# * Install pre-commit: `pip install pre-commit`
# * Go to your Logisim-evolution source code root directory
# * Copy provided config file template: `cp .pre-commit-config.yaml.dist .pre-commit-config.yaml`
# * Install pipx: https://pypi.org/project/pipx/
# * Run `pipx ensurepath`
# * Install pre-commit: `pipx install pre-commit`
# * Plug hooks into Git pipeline: `pre-commit install`
# * Update hooks to most recent version: `pre-commit autoupdate`
#
# To commit with hooks not run, use `--no-verify` while doing `git commit`
#
# See `pre-commit` official installation docs too: https://pre-commit.com/#install
#
Expand Down
10 changes: 8 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
![img](img/banner.webp)

# Changelog

## 1.6.0 (TBD)
## 2.0.0 (2026-01-30)

- [#044] Renamed package to `marcin-orlowski/disco-toolbar-symfony`
- [#047] Rebranded from DiscoDevBar to DiscoToolbar
- [#041] Added Symfony 8 support
- [#042] Added project logo!
- [#035] Added customizable background colors for breathing stripes
- [#033] Added close widget type to dismiss devbar
- [#033] Added close widget type to dismiss toolbar

## 1.5.2 (2025-12-12)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Marcin Orlowski
Copyright (c) 2025-2026 Marcin Orlowski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
93 changes: 43 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
```ascii
▄▀▀▄ ▄▀█ █▀▀▄ ▀ █▀▀▄ █▀▀▄
▀▄▄ █▀█▀▄ █ ▄▀▀▄ █▀▀▄ █ █ ▀█ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ █ █ ▄▀▀▄ █ █ █▀▀▄ ▄▀▀▄ █▄▀
█ █ █ █ █ █ ▀█▀ █ █ █ █ █ █ █ █ █ ▀▄ █ █ █ █ █ █▀▀ █ █ █ █ ▄▄█ █
▀▄▄▀ ▀▄▄█ █ █ █ ▀▄▄▀ █ █ ▀▄▄█ █▄▄▀ ▄█▄ ▀▄▄▀ ▀▄▄▀ ▀▄▄▀ █▄▄▀ ▀▄▄▀ ▀▄▀ █▄▄▀ ▀▄▄▀ █
▄▄▄▀ ▄▄▄▀

Customizable developer toolbar for Symfony projects
```

![img](img/banner.webp)

[![Latest Stable Version](https://poser.pugx.org/marcin-orlowski/symfony-discodevbar/v)](https://packagist.org/packages/marcin-orlowski/symfony-discodevbar)
[![Monthly Downloads](https://poser.pugx.org/marcin-orlowski/symfony-discodevbar/d/monthly)](https://packagist.org/packages/marcin-orlowski/symfony-discodevbar)
[![License](https://poser.pugx.org/marcin-orlowski/symfony-discodevbar/license)](https://packagist.org/packages/marcin-orlowski/symfony-discodevbar)
[![Latest Stable Version](https://poser.pugx.org/marcin-orlowski/disco-toolbar-symfony/v)](https://packagist.org/packages/marcin-orlowski/disco-toolbar-symfony)
[![Monthly Downloads](https://poser.pugx.org/marcin-orlowski/disco-toolbar-symfony/d/monthly)](https://packagist.org/packages/marcin-orlowski/disco-toolbar-symfony)
[![License](https://poser.pugx.org/marcin-orlowski/disco-toolbar-symfony/license)](https://packagist.org/packages/marcin-orlowski/disco-toolbar-symfony)


# Welcome!

**DiscoDevBar** is a developer tool that adds a customizable toolbar/banner to your Symfony application,
providing all-time access to essential development resources right from your browser. Perfect for
streamlining your development workflow by keeping frequently-used tools, admin panels, and services
just one click away.
**DiscoToolbar** is a customizable toolbar for your Symfony application, providing all-time access to
essential resources right from your browser. Perfect for streamlining your workflow by keeping
frequently-used tools, admin panels, and services just one click away.

> **NOTE:** This package is also available for Laravel framework!
> See [project page](https://github.com/MarcinOrlowski/php-discotoolbar-laravel) for more information!

## What is DiscoDevBar?
## What is DiscoToolbar?

DiscoDevBar creates a persistent banner (typically placed at the top of your layout) that displays
DiscoToolbar creates a persistent banner (typically placed at the top of your layout) that displays
during development. It's highly configurable via YAML, allowing you to create custom buttons and
links to anything you need: admin panels, database tools, email catchers, API documentation, or
any other development resource.
any other resource.

![img](img/disco-devbar.png)
![img](img/disco-toolbar.webp)

### Perfect for Docker Environments

Since configuration is YAML-based, it's incredibly easy to generate dynamically when setting up new
development environments. When using Docker or similar containerization, port numbers often change
between setups - but with DiscoDevBar, you can regenerate the configuration file on each environment
environments. When using Docker or similar containerization, port numbers often change
between setups - but with DiscoToolbar, you can regenerate the configuration file on each environment
startup, ensuring all links always point to the correct ports and services.

## Features

- **Fully customizable via YAML** - Easy to configure and regenerate for different environments
- **Flexible widget system** - Create buttons with Font Awesome icons, emoji, text labels, or any combination
- **Display anything** - Add links to admin panels, database tools, email catchers, API docs, or any development resource
- **Display anything** - Add links to admin panels, database tools, email catchers, API docs, or any resource
- **Action buttons** - Direct access to frequently-used tools and services
- **Environment-aware** - Only loads in development environment, zero production overhead
- **Dynamic configuration** - Perfect for Docker setups where ports change - regenerate config on startup
Expand All @@ -50,22 +43,22 @@ startup, ensuring all links always point to the correct ports and services.
## Requirements

- PHP 8.1 or higher
- Symfony 6.4+ or 7.0+
- Symfony 6.4+, 7.0+, or 8.0+

## Installation

Install via Composer:

```bash
composer require marcinorlowski/symfony-discodevbar --dev
composer require --dev marcin-orlowski/disco-toolbar-symfony
```

Register the bundle in `config/bundles.php`:

```php
return [
// ... other bundles
MarcinOrlowski\DiscoDevBar\DiscoDevBarBundle::class => ['dev' => true],
MarcinOrlowski\DiscoToolbar\DiscoToolbarBundle::class => ['dev' => true],
];
```

Expand All @@ -80,10 +73,10 @@ php bin/console assets:install --symlink
Create a configuration file in your project root with widget configuration. The bundle will automatically
detect and load the first file found (in order of preference):

- `.disco-devbar.yaml` (recommended)
- `.disco-devbar.yml`
- `.disco.yaml` (recommended)
- `.disco.yml`

Example configuration that produces devbar shown in the screenshot above:
Example configuration that produces toolbar shown in the screenshot above:

```yaml
widgets:
Expand Down Expand Up @@ -121,26 +114,26 @@ widgets:

### Widget Properties

| Property | Type | Required | Description |
|-------------|:--------:|:--------:|--------------------------------------------------------------------------------|
| `type` | `string` | | Widget type: `link` (default) or `close` (dismisses devbar). |
| `icon`* | `string` | | Optional icon to display. Can be Font Awesome class or emoji/text. |
| `icon_type` | `string` | | Icon type: `fa` (Font Awesome, default) or `text` (emoji/plain text). |
| `text`* | `string` | | Optional widget label to display alongside icon. |
| `url` | `string` | * | Link URL to redirect to once widget is clicked. |
| `target` | `string` | | Link target (e.g., `_blank`). Default: no target |
| `title` | `string` | | Tooltip text. If not given, `url` is shown. |
| `expand` | `bool` | | Set to `true` to make widget expand and fill available space. Default `false`. |
| Property | Type | Required | Description |
|-------------|:--------:|:--------:|---------------------------------------------------------------------------------|
| `type` | `string` | | Widget type: `link` (default) or `close` (dismisses toolbar). |
| `icon`* | `string` | | Optional icon to display. Can be Font Awesome class or emoji/text. |
| `icon_type` | `string` | | Icon type: `fa` (Font Awesome, default) or `text` (emoji/plain text). |
| `text`* | `string` | | Optional widget label to display alongside icon. |
| `url` | `string` | * | Link URL to redirect to once widget is clicked. |
| `target` | `string` | | Link target (e.g., `_blank`). Default: no target |
| `title` | `string` | | Tooltip text. If not given, `url` is shown. |
| `expand` | `bool` | | Set to `true` to make widget expand and fill available space. Default `false`. |

*) Either `icon` or `text` must be provided or exception will be thrown.

### Font Awesome Icons

DiscoDevBar supports Font Awesome icons for widgets. You have two options for including Font Awesome:
DiscoToolbar supports Font Awesome icons for widgets. You have two options for including Font Awesome:

#### Option 1: Automatic Inclusion (Recommended for Quick Setup)

Enable automatic Font Awesome inclusion from CDN in your `.disco-devbar.yaml` configuration file:
Enable automatic Font Awesome inclusion from CDN in your `.disco.yaml` configuration file:

```yaml
font_awesome:
Expand All @@ -166,7 +159,7 @@ your project, use Option 2 instead to avoid version conflicts.
#### Option 2: Manual Setup (Recommended if Font Awesome Already Installed)

If your application already includes Font Awesome (via NPM, CDN, or other means), simply use Font Awesome icon
classes in your widget configuration. DiscoDevBar will use your existing Font Awesome installation.
classes in your widget configuration. DiscoToolbar will use your existing Font Awesome installation.

**Example:**

Expand Down Expand Up @@ -198,19 +191,19 @@ widgets:

## Usage

Include the devbar template in your base layout:
Include the toolbar template in your base layout:

```twig
{% if app.environment == 'dev' %}
{% include '@DiscoDevBar/devbar.html.twig' %}
{% include '@DiscoToolbar/toolbar.html.twig' %}
{% endif %}
```

## Customization

### Background Colors

Customize the breathing stripes background colors in your `.disco-devbar.yaml`:
Customize the breathing stripes background colors in your `.disco.yaml`:

```yaml
bg_color_light: '#b71c1c'
Expand All @@ -220,15 +213,15 @@ bg_color_dark: '#8e0000'
### Custom CSS

The bundle includes default styling. To customize, override the CSS after importing bundle assets or
create your own styles targeting `.disco-devbar` classes.
create your own styles targeting `.disco-toolbar` classes.

### Custom Template

Override the default template by creating:
`templates/bundles/DiscoDevBarBundle/devbar.html.twig`
`templates/bundles/DiscoToolbarBundle/toolbar.html.twig`

## License

- Written and copyrighted &copy;2025 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- DiscoDevBar is open-source software licensed under
- Written and copyrighted &copy;2025-2026 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- DiscoToolbar is open-source software licensed under
the [MIT license](http://opensource.org/licenses/MIT)
23 changes: 20 additions & 3 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@

#########################################################################
#
# █▀▀▄ ▀ ▀▀█▀▀ ▀█ █
# █ █ ▀█ ▄▀▀▄ ▄▀▀▄ ▄▀▀▄ █ ▄▀▀▄ ▄▀▀▄ █ █▀▀▄ ▄▀▀▄ █▄▀
# █ █ █ ▀▄ █ █ █ █ █ █ █ █ █ █ █ ▄▄█ █
# █▄▄▀ ▄█▄ ▀▄▄▀ ▀▄▄▀ ▀▄▄▀ █ ▀▄▄▀ ▀▄▄▀ ▄█▄ █▄▄▀ ▀▄▄▀ █
#
######### Customizable developer toolbar for Symfony projects ########
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
# @copyright 2025-2026 Marcin Orlowski
# @license https://opensource.org/license/mit MIT
# @link https://github.com/MarcinOrlowski/php-discotoolbar-symfony
#
#########################################################################

services:
_defaults:
autowire: true
autoconfigure: true

MarcinOrlowski\DiscoDevBar\:
MarcinOrlowski\DiscoToolbar\:
resource: '../../src/'
exclude: '../../src/{DependencyInjection,Dto}'

MarcinOrlowski\DiscoDevBar\Service\DiscoDevBarService:
MarcinOrlowski\DiscoToolbar\Service\DiscoToolbarService:
arguments:
$projectDir: '%kernel.project_dir%'

MarcinOrlowski\DiscoDevBar\Twig\DiscoDevBarExtension:
MarcinOrlowski\DiscoToolbar\Twig\DiscoToolbarExtension:
tags: ['twig.extension']
Loading