minor #35303 [FrameworkBundle] Add missing entry about framework.router.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
-------

5a83b07bf4 [FrameworkBundle] Add missing entry about framework.router.context
This commit is contained in:
Fabien Potencier 2020-01-11 08:28:35 +01:00
commit 596caf7b8f
3 changed files with 3 additions and 2 deletions

View File

@ -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()`

View File

@ -483,7 +483,7 @@ class Configuration implements ConfigurationInterface
->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()

View File

@ -854,7 +854,7 @@ class FrameworkExtension extends Extension
$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']);