From a696ebf7396b0fdb01718d160ed7f2a753f1c0b9 Mon Sep 17 00:00:00 2001 From: Damien Fernandes Date: Thu, 10 Apr 2025 14:55:43 +0200 Subject: [PATCH] docs(config): add warn about invalid characters in env name --- configuration.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configuration.rst b/configuration.rst index a4ffc2866e1..80339e89bd7 100644 --- a/configuration.rst +++ b/configuration.rst @@ -594,6 +594,13 @@ going to production: use `symbolic links`_ between ``config/packages//`` directories to reuse the same configuration. +.. warning:: + + Some characters are not allowed in environment name, e.g. the + ``-`` character. If you try to use it, it will throw this exception: + The environment "%s" contains invalid characters, it can only contain + characters allowed in PHP class names. + Instead of creating new environments, you can use environment variables as explained in the following section. This way you can use the same application and environment (e.g. ``prod``) but change its behavior thanks to the