From: Raphaƫl Gertz Date: Thu, 16 Oct 2025 15:29:40 +0000 (+0200) Subject: Add default uri X-Git-Tag: 0.0.1~6 X-Git-Url: https://git.rapsys.eu/blog/commitdiff_plain/c13e370950cfd2878d99019d17cfab375c6ccc91 Add default uri Update symfony recipe --- diff --git a/.env b/.env index 0ae5e63..73d1be2 100644 --- a/.env +++ b/.env @@ -32,3 +32,9 @@ DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&ch ###> symfony/mailer ### MAILER_DSN=null://null ###< symfony/mailer ### + +###> symfony/routing ### +# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. +# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands +DEFAULT_URI=http://localhost +###< symfony/routing ### diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml index 8166181..0f34f87 100644 --- a/config/packages/routing.yaml +++ b/config/packages/routing.yaml @@ -2,7 +2,7 @@ framework: router: # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands - #default_uri: http://localhost + default_uri: '%env(DEFAULT_URI)%' when@prod: framework: diff --git a/symfony.lock b/symfony.lock index 21095d3..82ead31 100644 --- a/symfony.lock +++ b/symfony.lock @@ -224,12 +224,12 @@ ] }, "symfony/routing": { - "version": "7.0", + "version": "7.3", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "7.0", - "ref": "21b72649d5622d8f7da329ffb5afb232a023619d" + "ref": "ab1e60e2afd5c6f4a6795908f646e235f2564eb2" }, "files": [ "config/packages/routing.yaml",