Skip to content

Commit

Permalink
minor #35303 [FrameworkBundle] Add missing entry about framework.rout…
Browse files Browse the repository at this point in the history
…er.context (ogizanagi)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Add missing entry about framework.router.context

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Relates to #35281 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A

Some minor tweaks about #35281

Commits
-------

5a83b07 [FrameworkBundle] Add missing entry about framework.router.context
  • Loading branch information
fabpot committed Jan 11, 2020
2 parents de4c45c + 5a83b07 commit 596caf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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
5.1.0
-----

* Added the `framework.router.context` configuration node to configure the `RequestContext`
* Made `MicroKernelTrait::configureContainer()` compatible with `ContainerConfigurator`
* Added a new `mailer.message_bus` option to configure or disable the message bus to use to send mails.
* Added flex-compatible default implementations for `MicroKernelTrait::registerBundles()` and `getProjectDir()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ private function addRouterSection(ArrayNodeDefinition $rootNode)
->end()
->booleanNode('utf8')->defaultFalse()->end()
->arrayNode('context')
->info('router request context')
->info('The request context used to generate URLs in a non-HTTP context')
->addDefaultsIfNotSet()
->children()
->scalarNode('host')->defaultValue('%router.request_context.host%')->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
$container->setParameter('request_listener.http_port', $config['http_port']);
$container->setParameter('request_listener.https_port', $config['https_port']);

$requestContext = $container->findDefinition('router.request_context');
$requestContext = $container->getDefinition('router.request_context');
$requestContext->replaceArgument(0, $config['context']['base_url']);
$requestContext->replaceArgument(2, $config['context']['host']);
$requestContext->replaceArgument(3, $config['context']['scheme']);
Expand Down

0 comments on commit 596caf7

Please sign in to comment.