Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

symfony var:expose-from-tunnel not working

Aperta
#506 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go, symfony
Ambito
cli

Direzione di ricerca

Start by tracing the var:expose-from-tunnel command and how it reads tunnel details from ~/.upsun-cli/tunnels.json; the issue provides a reproduction using symfony tunnel:open followed by symfony var:expose-from-tunnel. Check how it handles multi-app projects and compare the resulting environment variables with the expected SYMFONY_TUNNEL_ENV and DATABASE_XXX values. Done means the command exposes the expected variables for the reported setup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi!
I followed https://docs.upsun.com/get-started/stacks/symfony/local.html but step 3 is not working, i.e., has no effect in my local environment.

To demonstrate:

I am on branch locally, that has an active environment on Upsun.

$ symfony tunnel:open --app=sf-demo

A tunnel is already opened to the relationship database, at: mysql://demo:[email protected]:30000/demo

List tunnels with: symfony tunnels
View tunnel details with: symfony tunnel:info
Close tunnels with: symfony tunnel:close

Save encoded tunnel details to the PLATFORM_RELATIONSHIPS variable using:
export PLATFORM_RELATIONSHIPS="$(symfony tunnel:info --encode)"

NB: symfony tunnel:info --encode does require -A parameter

$ symfony var:expose-from-tunnel

Exposing tunnel service environment variables

No effect on the symfony app. A getenv() shows:

"SYMFONY_TUNNEL" => ""
"SYMFONY_TUNNEL_ENV" => ""
"SYMFONY_TUNNEL_BRAND" => "Upsun"
"SYMFONY_DOCKER_ENV" => ""

But from the source code of symfony-cli, I assume SYMFONY_TUNNEL_ENV should be "1"; and I would also expect to see DATABASE_XXX env vars.

PS: also does not work on Platform.sh for my multi-app project.

I checked the files under ~/.upsun-cli/tunnels.json and it looks fine imho.

As a workaround I was always manually writing DATABASE_URL=mysql://demo:[email protected]:30000/demo to my .env.local

Lingua principale
Go
Stelle
608
Fork
140
Merge medio
17h 48m
PR unite (30g)
37

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di symfony-cli/symfony-cli

Tutte le issue di symfony-cli/symfony-cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.