Repository: dynaconf/dynaconf

Issue:
[bug] Yaml Top Level Keys Not being Interpreted as Environments
**Describe the bug**
Environments are not working with yaml files which had been working in dynaconf 2.2.3.

**To Reproduce**
1. Install dynaconf==3.1.2
2. Create file test.yaml
```
default:
  key: default-from-settings

development:
  key: dev-from-settings
  
production:
    key: production-from-settings
```
3. Create script test.py
```
import dynaconf
import pathlib
CONFIG_FILE_FOLDER = pathlib.Path(__file__).parent

Config = dynaconf.LazySettings(PRELOAD_FOR_DYNACONF=[str(CONFIG_FILE_FOLDER / 'test.yaml')])
Config.setenv('DEVELOPMENT')

print(Config.to_dict())
```
Output
```
{'DEFAULT': {'key': 'default-from-settings'}, 'DEVELOPMENT': {'key': 'dev-from-settings'}, 'PRODUCTION': {'key': 'production-from-settings'}}
```
**Expected behavior**
The script should output 
```
{'KEY': 'dev-from-settings'}
```
** Other Context**

I am basing the layered Yaml file from docs:
https://www.dynaconf.com/#layered-environments-on-files

I tried this in a docker image, python:slim-buster. It's the same result. 

**Environment (please complete the following information):**
 - OS: Ubuntu/18.04
 - Dynaconf Version 2.2.3
 - Frameworks in use: N/A
[bug] Yaml Top Level Keys Not being Interpreted as Environments
**Describe the bug**
Environments are not working with yaml files which had been working in dynaconf 2.2.3.

**To Reproduce**
1. Install dynaconf==3.1.2
2. Create file test.yaml
```
default:
  key: default-from-settings

development:
  key: dev-from-settings
  
production:
    key: production-from-settings
```
3. Create script test.py
```
import dynaconf
import pathlib
CONFIG_FILE_FOLDER = pathlib.Path(__file__).parent

Config = dynaconf.LazySettings(PRELOAD_FOR_DYNACONF=[str(CONFIG_FILE_FOLDER / 'test.yaml')])
Config.setenv('DEVELOPMENT')

print(Config.to_dict())
```
Output
```
{'DEFAULT': {'key': 'default-from-settings'}, 'DEVELOPMENT': {'key': 'dev-from-settings'}, 'PRODUCTION': {'key': 'production-from-settings'}}
```
**Expected behavior**
The script should output 
```
{'KEY': 'dev-from-settings'}
```
** Other Context**

I am basing the layered Yaml file from docs:
https://www.dynaconf.com/#layered-environments-on-files

I tried this in a docker image, python:slim-buster. It's the same result. 

**Environment (please complete the following information):**
 - OS: Ubuntu/18.04
 - Dynaconf Version 2.2.3
 - Frameworks in use: N/A


Discussion:
starting on 3.0.0 you nees to pass `environments=True`
@rochacbruno Thanks for the quick reply. I'll give it a try. I'm happy to close. I re-read the new docs and the example has `environments=True`. I missed that. 

If you added a note that the new flag is needed I think it'll more clear for folks.
starting on 3.0.0 you nees to pass `environments=True`
@rochacbruno Thanks for the quick reply. I'll give it a try. I'm happy to close. I re-read the new docs and the example has `environments=True`. I missed that. 

If you added a note that the new flag is needed I think it'll more clear for folks.

Resolving patch:
diff --git a/dynaconf/utils/__init__.py b/dynaconf/utils/__init__.py
--- a/dynaconf/utils/__init__.py
+++ b/dynaconf/utils/__init__.py
@@ -44,7 +44,7 @@ def object_merge(old, new, unique=False, full_path=None):
 
             if (
                 existing_value is not None
-                and key == full_path[-1]
+                and key.lower() == full_path[-1].lower()
                 and existing_value is value
             ):
                 # Here Be The Dragons
diff --git a/example/issues/519_underscore_in_name/app.py b/example/issues/519_underscore_in_name/app.py
new file mode 100644
--- /dev/null
+++ b/example/issues/519_underscore_in_name/app.py
@@ -0,0 +1,13 @@
+import os
+
+from dynaconf import Dynaconf
+
+config = Dynaconf(settings_files=["settings.yml"], envvar_prefix="ATC",)
+
+# envvar set is case insensitive
+# ATC_BLE__DEVICE_ID=x and ATC_BLE__device_id=x are the same
+expected = os.environ.get("EXPECTED_VALUE", 0)
+
+# access is case insensitive
+assert config.ble.device_id == int(expected)
+assert config.BLE.DEVICE_ID == int(expected)


Test patch: