migration symfony 5 4 (#300)

* symfony 5.4 (diff dev)

* symfony 5.4 (working)

* symfony 5.4 (update autoload)

* symfony 5.4 (remove swiftmailer mailer implementation)

* symfony 5.4 (php doc and split Global accessor class)


### Impacted packages:

composer require php:">=7.2.5 <8.0.0" symfony/console:5.4.* symfony/dotenv:5.4.* symfony/framework-bundle:5.4.* symfony/twig-bundle:5.4.* symfony/yaml:5.4.* --update-with-dependencies

composer require symfony/stopwatch:5.4.* symfony/web-profiler-bundle:5.4.* --dev --update-with-dependencies
This commit is contained in:
bdalsass
2022-06-16 09:13:24 +02:00
committed by GitHub
parent abb13b70b9
commit 79da71ecf8
2178 changed files with 87439 additions and 59451 deletions

View File

@@ -0,0 +1,83 @@
<?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 Symfony\Bundle\WebProfilerBundle\Controller\ExceptionPanelController;
use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController;
use Symfony\Bundle\WebProfilerBundle\Controller\RouterController;
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
use Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator;
use Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension;
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
return static function (ContainerConfigurator $container) {
$container->services()
->set('web_profiler.controller.profiler', ProfilerController::class)
->public()
->args([
service('router')->nullOnInvalid(),
service('profiler')->nullOnInvalid(),
service('twig'),
param('data_collector.templates'),
service('web_profiler.csp.handler'),
param('kernel.project_dir'),
])
->set('web_profiler.controller.router', RouterController::class)
->public()
->args([
service('profiler')->nullOnInvalid(),
service('twig'),
service('router')->nullOnInvalid(),
null,
tagged_iterator('routing.expression_language_provider'),
])
->set('web_profiler.controller.exception_panel', ExceptionPanelController::class)
->public()
->args([
service('error_handler.error_renderer.html'),
service('profiler')->nullOnInvalid(),
])
->set('web_profiler.csp.handler', ContentSecurityPolicyHandler::class)
->args([
inline_service(NonceGenerator::class),
])
->set('twig.extension.webprofiler', WebProfilerExtension::class)
->args([
inline_service(HtmlDumper::class)
->args([null, param('kernel.charset'), HtmlDumper::DUMP_LIGHT_ARRAY])
->call('setDisplayOptions', [['maxStringLength' => 4096, 'fileLinkFormat' => service('debug.file_link_formatter')]]),
])
->tag('twig.extension')
->set('debug.file_link_formatter', FileLinkFormatter::class)
->args([
param('debug.file_link_format'),
service('request_stack')->ignoreOnInvalid(),
param('kernel.project_dir'),
'/_profiler/open?file=%%f&line=%%l#line%%l',
])
->set('debug.file_link_formatter.url_format', 'string')
->factory([FileLinkFormatter::class, 'generateUrlFormat'])
->args([
service('router'),
'_profiler_open_file',
'?file=%%f&line=%%l#line%%l',
])
;
};

View File

@@ -1,70 +0,0 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults public="false" />
<service id="web_profiler.controller.profiler" class="Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController" public="true">
<argument type="service" id="router" on-invalid="null" />
<argument type="service" id="profiler" on-invalid="null" />
<argument type="service" id="twig" />
<argument>%data_collector.templates%</argument>
<argument>%web_profiler.debug_toolbar.position%</argument>
<argument type="service" id="web_profiler.csp.handler" />
<argument>%kernel.project_dir%</argument>
</service>
<service id="web_profiler.controller.router" class="Symfony\Bundle\WebProfilerBundle\Controller\RouterController" public="true">
<argument type="service" id="profiler" on-invalid="null" />
<argument type="service" id="twig" />
<argument type="service" id="router" on-invalid="null" />
</service>
<service id="web_profiler.controller.exception" class="Symfony\Bundle\WebProfilerBundle\Controller\ExceptionController" public="true">
<argument type="service" id="profiler" on-invalid="null" />
<argument type="service" id="twig" />
<argument>%kernel.debug%</argument>
<argument type="service" id="debug.file_link_formatter" />
</service>
<service id="web_profiler.csp.handler" class="Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler">
<argument type="service">
<service class="Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator" />
</argument>
</service>
<service id="twig.extension.webprofiler" class="Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension">
<tag name="twig.extension" />
<argument type="service">
<service class="Symfony\Component\VarDumper\Dumper\HtmlDumper">
<argument>null</argument>
<argument>%kernel.charset%</argument>
<argument type="constant">Symfony\Component\VarDumper\Dumper\HtmlDumper::DUMP_LIGHT_ARRAY</argument>
<call method="setDisplayOptions">
<argument type="collection">
<argument key="maxStringLength">4096</argument>
<argument key="fileLinkFormat" type="service" id="debug.file_link_formatter"></argument>
</argument>
</call>
</service>
</argument>
</service>
<service id="debug.file_link_formatter" class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter">
<argument>%debug.file_link_format%</argument>
<argument type="service" id="request_stack" on-invalid="ignore" />
<argument>%kernel.project_dir%</argument>
<argument>/_profiler/open?file=%%f&amp;line=%%l#line%%l</argument>
</service>
<service id="debug.file_link_formatter.url_format" class="string">
<factory class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter" method="generateUrlFormat" />
<argument type="service" id="router" />
<argument>_profiler_open_file</argument>
<argument>?file=%%f&amp;line=%%l#line%%l</argument>
</service>
</services>
</container>

View File

@@ -5,43 +5,43 @@
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
<route id="_profiler_home" path="/">
<default key="_controller">web_profiler.controller.profiler:homeAction</default>
<default key="_controller">web_profiler.controller.profiler::homeAction</default>
</route>
<route id="_profiler_search" path="/search">
<default key="_controller">web_profiler.controller.profiler:searchAction</default>
<default key="_controller">web_profiler.controller.profiler::searchAction</default>
</route>
<route id="_profiler_search_bar" path="/search_bar">
<default key="_controller">web_profiler.controller.profiler:searchBarAction</default>
<default key="_controller">web_profiler.controller.profiler::searchBarAction</default>
</route>
<route id="_profiler_phpinfo" path="/phpinfo">
<default key="_controller">web_profiler.controller.profiler:phpinfoAction</default>
<default key="_controller">web_profiler.controller.profiler::phpinfoAction</default>
</route>
<route id="_profiler_search_results" path="/{token}/search/results">
<default key="_controller">web_profiler.controller.profiler:searchResultsAction</default>
<default key="_controller">web_profiler.controller.profiler::searchResultsAction</default>
</route>
<route id="_profiler_open_file" path="/open">
<default key="_controller">web_profiler.controller.profiler:openAction</default>
<default key="_controller">web_profiler.controller.profiler::openAction</default>
</route>
<route id="_profiler" path="/{token}">
<default key="_controller">web_profiler.controller.profiler:panelAction</default>
<default key="_controller">web_profiler.controller.profiler::panelAction</default>
</route>
<route id="_profiler_router" path="/{token}/router">
<default key="_controller">web_profiler.controller.router:panelAction</default>
<default key="_controller">web_profiler.controller.router::panelAction</default>
</route>
<route id="_profiler_exception" path="/{token}/exception">
<default key="_controller">web_profiler.controller.exception:showAction</default>
<default key="_controller">web_profiler.controller.exception_panel::body</default>
</route>
<route id="_profiler_exception_css" path="/{token}/exception.css">
<default key="_controller">web_profiler.controller.exception:cssAction</default>
<default key="_controller">web_profiler.controller.exception_panel::stylesheet</default>
</route>
</routes>

View File

@@ -5,6 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
<route id="_wdt" path="/{token}">
<default key="_controller">web_profiler.controller.profiler:toolbarAction</default>
<default key="_controller">web_profiler.controller.profiler::toolbarAction</default>
</route>
</routes>

View File

@@ -10,13 +10,5 @@
<xsd:complexType name="config">
<xsd:attribute name="toolbar" type="xsd:boolean" />
<xsd:attribute name="intercept-redirects" type="xsd:boolean" />
<xsd:attribute name="position" type="positions" />
</xsd:complexType>
<xsd:simpleType name="positions">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="top"/>
<xsd:enumeration value="bottom"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@@ -0,0 +1,31 @@
<?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 Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
return static function (ContainerConfigurator $container) {
$container->services()
->set('web_profiler.debug_toolbar', WebDebugToolbarListener::class)
->args([
service('twig'),
param('web_profiler.debug_toolbar.intercept_redirects'),
param('web_profiler.debug_toolbar.mode'),
service('router')->ignoreOnInvalid(),
abstract_arg('paths that should be excluded from the AJAX requests shown in the toolbar'),
service('web_profiler.csp.handler'),
service('data_collector.dump')->ignoreOnInvalid(),
])
->tag('kernel.event_subscriber')
;
};

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults public="false" />
<service id="web_profiler.debug_toolbar" class="Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener">
<tag name="kernel.event_subscriber" />
<argument type="service" id="twig" />
<argument>%web_profiler.debug_toolbar.intercept_redirects%</argument>
<argument>%web_profiler.debug_toolbar.mode%</argument>
<argument>%web_profiler.debug_toolbar.position%</argument>
<argument type="service" id="router" on-invalid="ignore" />
<argument /> <!-- paths that should be excluded from the AJAX requests shown in the toolbar -->
<argument type="service" id="web_profiler.csp.handler" />
</service>
</services>
</container>