Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Global Setting to Prefill ENV Variables

Đang mở
#641 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go, symfony, yaml
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start by reading the Symfony CLI code that reads Compose files and applies their environment variables, then check the Compose specification’s extension documentation linked in the issue. The issue proposes an opt-in x-symfony setting to disable this behavior, but does not identify files or tests; done would mean the setting controls whether Compose-provided environment variables are applied without breaking existing behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

We use the Symfony CLI only to run my local projects with symfony serve.
The behaviour that Symfony CLI read the compose file and overrides the DATABASE_URL is very unexpected and that my .env.local is just ignored maked more problems in the past, as it did ends in unwanted overwrites while you thought you switched the database but symfony still pointed to the other DB. I'm aware of SYMFONY_DOTENV_VARS but you need know all ENVs and thats also something which can not be commited to the code base.

It would be nice to have some config inside the compose via extension to not do this behaviour.

E.g.:

x-symfony:
  docker_envs: false

services:
###> doctrine/doctrine-bundle ###
  database:
    # ...

https://github.com/compose-spec/compose-spec/blob/main/11-extension.md

Why I think it would be better to make it opt in instead of opt out. I understand that the BC Break would be to hard to not longer do it.

Ngôn ngữ chính
Go
Star
608
Fork
140
Merge trung bình
13 giờ 6 phút
Pull request đã merge (30 ngày)
36

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của symfony-cli/symfony-cli

Tất cả issue của symfony-cli/symfony-cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.