Skip to content

[FrameworkBundle][WebProfilerBundle] remove XML routing configuration files #61065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025
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
6 changes: 6 additions & 0 deletions UPGRADE-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Form
FrameworkBundle
---------------

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

*Before*
Expand Down Expand Up @@ -511,6 +512,11 @@ VarExporter
* Remove `LazyGhostTrait` and `LazyProxyTrait`, use native lazy objects instead
* Remove `ProxyHelper::generateLazyGhost()`, use native lazy objects instead

WebProfilerBundle
-----------------

* Remove `profiler.xml` and `wdt.xml` routing configuration files (use their PHP equivalent instead)

Workflow
--------

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
8.0
---

* Remove `errors.xml` and `webhook.xml` routing configuration files (use their PHP equivalent instead)
* Enable the property info constructor extractor by default
* Remove deprecated `Symfony\Bundle\FrameworkBundle\Console\Application::add()` method in favor of `Symfony\Bundle\FrameworkBundle\Console\Application::addCommand()`
* Make `Router` class `final`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
*/

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Routing\Loader\XmlFileLoader;

return function (RoutingConfigurator $routes): void {
foreach (debug_backtrace() as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
trigger_deprecation('symfony/routing', '7.3', 'The "errors.xml" routing configuration file is deprecated, import "errors.php" instead.');

break;
}
}
}

$routes->add('_preview_error', '/{code}.{_format}')
->controller('error_controller::preview')
->defaults(['_format' => 'html'])
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
*/

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Routing\Loader\XmlFileLoader;

return function (RoutingConfigurator $routes): void {
foreach (debug_backtrace() as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
trigger_deprecation('symfony/routing', '7.3', 'The "webhook.xml" routing configuration file is deprecated, import "webhook.php" instead.');

break;
}
}
}

$routes->add('_webhook_controller', '/{type}')
->controller('webhook.controller::handle')
->requirements(['type' => '.+'])
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

8.0
---

* Remove `profiler.xml` and `wdt.xml` routing configuration files (use their PHP equivalent instead)

7.3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
*/

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Routing\Loader\XmlFileLoader;

return function (RoutingConfigurator $routes): void {
foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
trigger_deprecation('symfony/routing', '7.3', 'The "profiler.xml" routing configuration file is deprecated, import "profiler.php" instead.');

break;
}
}
}

$routes->add('_profiler_home', '/')
->controller('web_profiler.controller.profiler::homeAction')
;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
*/

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Routing\Loader\XmlFileLoader;

return function (RoutingConfigurator $routes): void {
foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
if (__DIR__ === dirname(realpath($trace['args'][3]))) {
trigger_deprecation('symfony/routing', '7.3', 'The "wdt.xml" routing configuration file is deprecated, import "wdt.php" instead.');

break;
}
}
}

$routes->add('_wdt_stylesheet', '/styles')
->controller('web_profiler.controller.profiler::toolbarStylesheetAction')
;
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/Symfony/Bundle/WebProfilerBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"php": ">=8.4",
"composer-runtime-api": ">=2.1",
"symfony/config": "^7.4|^8.0",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/framework-bundle": "^7.4|^8.0",
"symfony/http-kernel": "^7.4|^8.0",
"symfony/routing": "^7.4|^8.0",
Expand Down
Loading