Skip to content

Commit 90e420a

Browse files
feature #61065 [FrameworkBundle][WebProfilerBundle] remove XML routing configuration files (xabbuh)
This PR was merged into the 8.0 branch. Discussion ---------- [FrameworkBundle][WebProfilerBundle] remove XML routing configuration files | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | | License | MIT Commits ------- c693f3d remove XML routing configuration files
2 parents d1d33e2 + c693f3d commit 90e420a

File tree

12 files changed

+12
-77
lines changed

12 files changed

+12
-77
lines changed

UPGRADE-8.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ Form
173173
FrameworkBundle
174174
---------------
175175

176+
* Remove `errors.xml` and `webhook.xml` routing configuration files (use their PHP equivalent instead)
176177
* Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()`
177178

178179
*Before*
@@ -512,6 +513,11 @@ VarExporter
512513
* Remove `LazyGhostTrait` and `LazyProxyTrait`, use native lazy objects instead
513514
* Remove `ProxyHelper::generateLazyGhost()`, use native lazy objects instead
514515

516+
WebProfilerBundle
517+
-----------------
518+
519+
* Remove `profiler.xml` and `wdt.xml` routing configuration files (use their PHP equivalent instead)
520+
515521
Workflow
516522
--------
517523

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
8.0
55
---
66

7+
* Remove `errors.xml` and `webhook.xml` routing configuration files (use their PHP equivalent instead)
78
* Enable the property info constructor extractor by default
89
* Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()`
910
* Make `Router` class `final`

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing/errors.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@
1010
*/
1111

1212
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
13-
use Symfony\Component\Routing\Loader\XmlFileLoader;
1413

1514
return function (RoutingConfigurator $routes): void {
16-
foreach (debug_backtrace() as $trace) {
17-
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
18-
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
19-
trigger_deprecation('symfony/routing', '7.3', 'The "errors.xml" routing configuration file is deprecated, import "errors.php" instead.');
20-
21-
break;
22-
}
23-
}
24-
}
25-
2615
$routes->add('_preview_error', '/{code}.{_format}')
2716
->controller('error_controller::preview')
2817
->defaults(['_format' => 'html'])

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing/errors.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing/webhook.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@
1010
*/
1111

1212
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
13-
use Symfony\Component\Routing\Loader\XmlFileLoader;
1413

1514
return function (RoutingConfigurator $routes): void {
16-
foreach (debug_backtrace() as $trace) {
17-
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
18-
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
19-
trigger_deprecation('symfony/routing', '7.3', 'The "webhook.xml" routing configuration file is deprecated, import "webhook.php" instead.');
20-
21-
break;
22-
}
23-
}
24-
}
25-
2615
$routes->add('_webhook_controller', '/{type}')
2716
->controller('webhook.controller::handle')
2817
->requirements(['type' => '.+'])

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing/webhook.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
8.0
5+
---
6+
7+
* Remove `profiler.xml` and `wdt.xml` routing configuration files (use their PHP equivalent instead)
8+
49
7.3
510
---
611

src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@
1010
*/
1111

1212
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
13-
use Symfony\Component\Routing\Loader\XmlFileLoader;
1413

1514
return function (RoutingConfigurator $routes): void {
16-
foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) {
17-
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
18-
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
19-
trigger_deprecation('symfony/routing', '7.3', 'The "profiler.xml" routing configuration file is deprecated, import "profiler.php" instead.');
20-
21-
break;
22-
}
23-
}
24-
}
25-
2615
$routes->add('_profiler_home', '/')
2716
->controller('web_profiler.controller.profiler::homeAction')
2817
;

src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@
1010
*/
1111

1212
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
13-
use Symfony\Component\Routing\Loader\XmlFileLoader;
1413

1514
return function (RoutingConfigurator $routes): void {
16-
foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) {
17-
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
18-
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
19-
trigger_deprecation('symfony/routing', '7.3', 'The "wdt.xml" routing configuration file is deprecated, import "wdt.php" instead.');
20-
21-
break;
22-
}
23-
}
24-
}
25-
2615
$routes->add('_wdt_stylesheet', '/styles')
2716
->controller('web_profiler.controller.profiler::toolbarStylesheetAction')
2817
;

0 commit comments

Comments
 (0)