[FrameworkBundle] switch to parameter for base url to make it configurable for tests and cli as done for host and scheme in d30943c2e8
This commit is contained in:
parent
b337655feb
commit
e77ecc95de
@ -10,6 +10,13 @@
|
|||||||
`MongoDate` instead of `MongoTimestamp`, which also makes it possible to use
|
`MongoDate` instead of `MongoTimestamp`, which also makes it possible to use
|
||||||
TTL collections in MongoDB 2.2+ instead of relying on the `gc()` method.
|
TTL collections in MongoDB 2.2+ instead of relying on the `gc()` method.
|
||||||
|
|
||||||
|
### Routing
|
||||||
|
|
||||||
|
* A new parameter has been added to the DIC: `router.request_context.base_url`
|
||||||
|
You can customize it for your functional tests or for generating urls with
|
||||||
|
the right base url when your are in the cli context.
|
||||||
|
|
||||||
|
|
||||||
#### Deprecations
|
#### Deprecations
|
||||||
|
|
||||||
* The `Request::splitHttpAcceptHeader()` is deprecated and will be removed in 2.3.
|
* The `Request::splitHttpAcceptHeader()` is deprecated and will be removed in 2.3.
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
<parameter key="router_listener.class">Symfony\Component\HttpKernel\EventListener\RouterListener</parameter>
|
<parameter key="router_listener.class">Symfony\Component\HttpKernel\EventListener\RouterListener</parameter>
|
||||||
<parameter key="router.request_context.host">localhost</parameter>
|
<parameter key="router.request_context.host">localhost</parameter>
|
||||||
<parameter key="router.request_context.scheme">http</parameter>
|
<parameter key="router.request_context.scheme">http</parameter>
|
||||||
|
<parameter key="router.request_context.base_url"></parameter>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<services>
|
<services>
|
||||||
@ -74,7 +75,7 @@
|
|||||||
<service id="router" alias="router.default" />
|
<service id="router" alias="router.default" />
|
||||||
|
|
||||||
<service id="router.request_context" class="%router.request_context.class%" public="false">
|
<service id="router.request_context" class="%router.request_context.class%" public="false">
|
||||||
<argument></argument>
|
<argument>%router.request_context.base_url%</argument>
|
||||||
<argument>GET</argument>
|
<argument>GET</argument>
|
||||||
<argument>%router.request_context.host%</argument>
|
<argument>%router.request_context.host%</argument>
|
||||||
<argument>%router.request_context.scheme%</argument>
|
<argument>%router.request_context.scheme%</argument>
|
||||||
|
Reference in New Issue
Block a user