initial commit

This commit is contained in:
boris
2025-09-30 09:24:25 +01:00
committed by boris
parent a783a12c97
commit c7770ea03b
4695 changed files with 525784 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://symfony.com/schema/dic/debug"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://symfony.com/schema/dic/debug"
elementFormDefault="qualified">
<xsd:element name="config" type="config" />
<xsd:complexType name="config">
<xsd:attribute name="max-items" type="xsd:integer" />
<xsd:attribute name="min-depth" type="xsd:integer" />
<xsd:attribute name="max-string-length" type="xsd:integer" />
<xsd:attribute name="dump-destination" type="xsd:string" />
</xsd:complexType>
</xsd:schema>

View File

@@ -0,0 +1,140 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Monolog\Formatter\FormatterInterface;
use Symfony\Bridge\Monolog\Command\ServerLogCommand;
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
use Symfony\Bridge\Twig\Extension\DumpExtension;
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
use Symfony\Component\HttpKernel\EventListener\DumpListener;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor;
use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor;
use Symfony\Component\VarDumper\Command\ServerDumpCommand;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider;
use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider;
use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider;
use Symfony\Component\VarDumper\Dumper\ContextualizedDumper;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
use Symfony\Component\VarDumper\Server\Connection;
use Symfony\Component\VarDumper\Server\DumpServer;
return static function (ContainerConfigurator $container) {
$container->parameters()
->set('env(VAR_DUMPER_SERVER)', '127.0.0.1:9912')
;
$container->services()
->set('twig.extension.dump', DumpExtension::class)
->args([
service('var_dumper.cloner'),
service('var_dumper.html_dumper'),
])
->tag('twig.extension')
->set('data_collector.dump', DumpDataCollector::class)
->public()
->args([
service('debug.stopwatch')->ignoreOnInvalid(),
service('debug.file_link_formatter')->ignoreOnInvalid(),
param('kernel.charset'),
service('.virtual_request_stack'),
null, // var_dumper.cli_dumper or var_dumper.server_connection when debug.dump_destination is set
])
->tag('data_collector', [
'id' => 'dump',
'template' => '@Debug/Profiler/dump.html.twig',
'priority' => 240,
])
->set('debug.dump_listener', DumpListener::class)
->args([
service('var_dumper.cloner'),
service('var_dumper.cli_dumper'),
null,
])
->tag('kernel.event_subscriber')
->set('var_dumper.cloner', VarCloner::class)
->public()
->set('var_dumper.cli_dumper', CliDumper::class)
->args([
null, // debug.dump_destination,
param('kernel.charset'),
0, // flags
])
->set('var_dumper.contextualized_cli_dumper', ContextualizedDumper::class)
->decorate('var_dumper.cli_dumper')
->args([
service('var_dumper.contextualized_cli_dumper.inner'),
[
'source' => inline_service(SourceContextProvider::class)->args([
param('kernel.charset'),
param('kernel.project_dir'),
service('debug.file_link_formatter')->nullOnInvalid(),
]),
],
])
->set('var_dumper.html_dumper', HtmlDumper::class)
->args([
null,
param('kernel.charset'),
0, // flags
])
->call('setDisplayOptions', [
['fileLinkFormat' => service('debug.file_link_formatter')->ignoreOnInvalid()],
])
->set('var_dumper.server_connection', Connection::class)
->args([
'', // server host
[
'source' => inline_service(SourceContextProvider::class)->args([
param('kernel.charset'),
param('kernel.project_dir'),
service('debug.file_link_formatter')->nullOnInvalid(),
]),
'request' => inline_service(RequestContextProvider::class)->args([service('request_stack')]),
'cli' => inline_service(CliContextProvider::class),
],
])
->set('var_dumper.dump_server', DumpServer::class)
->args([
'', // server host
service('logger')->nullOnInvalid(),
])
->tag('monolog.logger', ['channel' => 'debug'])
->set('var_dumper.command.server_dump', ServerDumpCommand::class)
->args([
service('var_dumper.dump_server'),
[
'cli' => inline_service(CliDescriptor::class)->args([service('var_dumper.contextualized_cli_dumper.inner')]),
'html' => inline_service(HtmlDescriptor::class)->args([service('var_dumper.html_dumper')]),
],
])
->tag('console.command')
->set('monolog.command.server_log', ServerLogCommand::class)
;
if (class_exists(ConsoleFormatter::class) && interface_exists(FormatterInterface::class)) {
$container->services()->get('monolog.command.server_log')->tag('console.command');
}
};

View File

@@ -0,0 +1,83 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{% if collector.dumpsCount %}
{% set icon %}
{{ source('@Debug/Profiler/icon.svg') }}
<span class="sf-toolbar-value">{{ collector.dumpsCount }}</span>
{% endset %}
{% set text %}
{% for dump in collector.getDumps('html') %}
<div class="sf-toolbar-info-piece">
<span>
{% if dump.label is defined and '' != dump.label %}
<span class="sf-toolbar-file-line"><strong>{{ dump.label }}</strong> in </span>
{% endif %}
{% if dump.file %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
<a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
{% else %}
<abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
{% endif %}
{% else %}
{{ dump.name }}
{% endif %}
</span>
<span class="sf-toolbar-file-line">line {{ dump.line }}</span>
{{ dump.data|raw }}
</div>
{% endfor %}
{% endset %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{% endif %}
{% endblock %}
{% block menu %}
<span class="label {{ collector.dumpsCount == 0 ? 'disabled' }}">
<span class="icon">{{ source('@Debug/Profiler/icon.svg') }}</span>
<strong>Debug</strong>
</span>
{% endblock %}
{% block panel %}
<h2>Dumped Contents</h2>
{% for dump in collector.getDumps('html') %}
<div class="sf-dump sf-reset">
<span class="metadata">
{% if dump.label is defined and '' != dump.label %}
<strong>{{ dump.label }}</strong> in
{% else %}
In
{% endif %}
{% if dump.line %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
<a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
{% else %}
<abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
{% endif %}
{% else %}
{{ dump.name }}
{% endif %}
line <a class="text-small sf-toggle" data-toggle-selector="#sf-trace-{{ loop.index0 }}">{{ dump.line }}</a>:
</span>
<div class="sf-dump-compact hidden" id="sf-trace-{{ loop.index0 }}">
<div class="trace">
{{ dump.fileExcerpt ? dump.fileExcerpt|raw : dump.file|file_excerpt(dump.line) }}
</div>
</div>
{{ dump.data|raw }}
</div>
{% else %}
<div class="empty empty-panel">
<p>No content was dumped.</p>
</div>
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" data-icon-name="icon-tabler-viewfinder" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="12" r="9"></circle>
<line x1="12" y1="3" x2="12" y2="7"></line>
<line x1="12" y1="21" x2="12" y2="18"></line>
<line x1="3" y1="12" x2="7" y2="12"></line>
<line x1="21" y1="12" x2="18" y2="12"></line>
<line x1="12" y1="12" x2="12" y2="12.01"></line>
</svg>

After

Width:  |  Height:  |  Size: 586 B