Dotvault for Symfony

A proper .env editor for Symfony apps.

Symfony layers its environment files: .env, then .env.local, then .env.$APP_ENV, each overriding the last. Working out which file a value actually came from is a genuine chore. Dotvault opens them side by side, knows the variables Symfony and its components expect, and tells you when a required one is missing.

What you get

  • Detects Symfony from symfony/framework-bundle in composer.json.
  • Recognises the core set, APP_ENV, APP_SECRET and DATABASE_URL, and flags APP_SECRET when it is absent, because Symfony will not boot without it.
  • Knows the DSN-shaped variables the components use: MAILER_DSN, MESSENGER_TRANSPORT_DSN, LOCK_DSN, NOTIFIER_DSN and the Mercure trio.
  • Recognises TRUSTED_PROXIES, TRUSTED_HOSTS and CORS_ALLOW_ORIGIN, the ones that are quietly security-relevant.
  • Diff .env against .env.local to see what your machine is overriding.

Known environment variables

Dotvault recognises these variables when you open a Symfony project and surfaces helpful descriptions and warnings in the editor. Symfony is detected via symfony/framework-bundle in composer.json.

  • APP_ENV

    Application environment (dev/prod/test)

  • APP_SECRETRequired

    Application secret for CSRF tokens

  • APP_DEBUG

    Debug mode toggle

  • DEFAULT_URI

    Base URL for CLI-generated URLs

  • DATABASE_URL

    Doctrine database connection URL

  • MESSENGER_TRANSPORT_DSN

    Messenger transport DSN

  • MAILER_DSN

    Mailer transport DSN

  • LOCK_DSN

    Lock component DSN (semaphore/flock/redis)

  • NOTIFIER_DSN

    Notifier transport DSN

  • MERCURE_URL

    Mercure hub publish URL

  • MERCURE_PUBLIC_URL

    Mercure hub public subscribe URL

  • MERCURE_JWT_SECRET

    Mercure JWT secret for publishing

  • TRUSTED_PROXIES

    Trusted reverse proxy IPs

  • TRUSTED_HOSTS

    Trusted hostnames regex pattern

  • CORS_ALLOW_ORIGIN

    Allowed CORS origin regex

  • HTTP_PORT

    HTTP port for URL generation

  • HTTPS_PORT

    HTTPS port for URL generation

  • REDIS_URL

    Redis connection URL for cache/session

  • MEMCACHED_URL

    Memcached connection URL

  • SENTRY_DSN

    Sentry data source name

Official Symfony docs: symfony.com/doc/current