You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…RI with a DSN (nicolas-grekas)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[FrameworkBundle] Allow configuring the default base URI with a DSN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fixes#35121, replaces #35580, partially reverts #35281
| License | MIT
| Doc PR | -
Instead of defining 3-4 parameters, this PR enables using a single DSN to configure the default URL context (for commands mainly):
```
framework:
router:
base_uri: 'https://my.host:8443/base-path/'
```
When using parameters directly, one can now set the same absolute URI in the `router.request_context.base_url` parameter, this will provide the same benefit.
Commits
-------
250fa7e [FrameworkBundle] Allow configuring the default base URI with a DSN
Description
Today when we want to change the generated URLs in commands, we need to set a lot of parameters (scheme, host, port, ...): https://symfony.com/doc/current/routing.html#generating-urls-in-commands.
It could be useful and less cumbersome to set an URL instead. It would be parsed in a compiler pass and the parameters would be set there.
Example
Before:
After:
The text was updated successfully, but these errors were encountered: