config-env-parameters

Installation
SKILL.md

Config Env Parameters (Symfony)

Use when

  • Adding or changing an environment variable, a parameter, or a secret.
  • A value differs between environments (dev, test, prod).
  • Casting or parsing env values (int:, bool:, json:, csv:, file:).
  • Storing credentials in the Symfony secrets vault.

Default workflow

  1. Decide where the value lives: .env default, .env.local, real environment, or the vault for secrets.
  2. Declare it with a safe committed default, never a real credential.
  3. Inject it with %env(...)% and the right processor, through a parameter or #[Autowire].
  4. Put environment-specific settings in config/packages/<env>/ or when@<env> blocks.
  5. Fail fast in the service when a required value is empty.
Installs
73
GitHub Stars
224
First Seen
Sep 18, 2026