8000 [FrameworkBundle] switch to parameter for base url to make it configu… · symfony/symfony@e77ecc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit e77ecc9

Browse files
committed
[FrameworkBundle] switch to parameter for base url to make it configurable for tests and cli as done for host and scheme in d30943c
1 parent b337655 commit e77ecc9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

UPGRADE-2.2.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
`MongoDate` instead of `MongoTimestamp`, which also makes it possible to use
1111
TTL collections in MongoDB 2.2+ instead of relying on the `gc()` method.
1212

13+
### Routing
14+
15+
* A new parameter has been added to the DIC: `router.request_context.base_url`
16+
You can customize it for your functional tests or for generating urls with
17+
the right base url when your are in the cli context.
18+
19+
1320
#### Deprecations
1421

1522
* The `Request::splitHttpAcceptHeader()` is deprecated and will be removed in 2.3.

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<parameter key="router_listener.class">Symfony\Component\HttpKernel\EventListener\RouterListener</parameter>
2525
<parameter key="router.request_context.host">localhost</parameter>
2626
<parameter key="router.request_context.scheme">http</parameter>
27+
<parameter key="router.request_context.base_url"></parameter>
2728
</parameters>
2829

2930
<services>
@@ -74,7 +75,7 @@
7475
<service id="router" alias="router.default" />
7576

7677
<service id="router.request_context" class="%router.request_context.class%" public="false">
77-
<argument></argument>
78+
<argument>%router.request_context.base_url%</argument>
7879
<argument>GET</argument>
7980
<argument>%router.request_context.host%</argument>
8081
<argument>%router.request_context.scheme%</argument>

0 commit comments

Comments
 (0)
0