Skip to content

Commit

Permalink
fix: actually allow route defaults (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi authored Jan 5, 2022
1 parent 1149cce commit b01ea5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function getConfigTreeBuilder(): TreeBuilder
->isRequired()
->cannotBeEmpty()
->end()
->variableNode('defaults')
->end()
->variableNode('catalog')
->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/Routing/Loader/RouteLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __invoke(): RouteCollection
$route = new Route(
$route['path'].'/{_filename}',
array_replace(
$route['_defaults'] ?? [],
$route['defaults'] ?? [],
[
'_controller' => DefaultController::class,
'_filename' => null,
Expand Down

0 comments on commit b01ea5e

Please sign in to comment.