File tree Expand file tree Collapse file tree 5 files changed +42
-9
lines changed Expand file tree Collapse file tree 5 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CHANGELOG
4
4
7.3
5
5
---
6
6
7
+ * Add ` errors.php ` and ` webhook.php ` routing configuration files (use them instead of their XML equivalent)
7
8
* Add support for the ObjectMapper component
8
9
* Add support for assets pre-compression
9
10
* Rename ` TranslationUpdateCommand ` to ` TranslationExtractCommand `
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ use Symfony \Component \Routing \Loader \Configurator \RoutingConfigurator ;
13
+
14
+ return function (RoutingConfigurator $ routes ): void {
15
+ $ routes ->add ('_preview_error ' , '/{code}.{_format} ' )
16
+ ->controller ('error_controller::preview ' )
17
+ ->defaults (['_format ' => 'html ' ])
18
+ ->requirements (['code ' => '\d+ ' ])
19
+ ;
20
+ };
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
xsi : schemaLocation =" http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd" >
6
6
7
- <route id =" _preview_error" path =" /{code}.{_format}" >
8
- <default key =" _controller" >error_controller::preview</default >
9
- <default key =" _format" >html</default >
10
- <requirement key =" code" >\d+</requirement >
11
- </route >
7
+ <import resource =" errors.php" type =" php" />
12
8
</routes >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ use Symfony \Component \Routing \Loader \Configurator \RoutingConfigurator ;
13
+
14
+ return function (RoutingConfigurator $ routes ): void {
15
+ $ routes ->add ('_webhook_controller ' , '/{type} ' )
16
+ ->controller ('webhook_controller::handle ' )
17
+ ->requirements (['type ' => '.+ ' ])
18
+ ;
19
+ };
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
xsi : schemaLocation =" http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd" >
6
6
7
- <route id =" _webhook_controller" path =" /{type}" >
8
- <default key =" _controller" >webhook.controller::handle</default >
9
- <requirement key =" type" >.+</requirement >
10
- </route >
7
+ <import resource =" webhook.php" type =" php" />
11
8
</routes >
You can’t perform that action at this time.
0 commit comments