Skip to content

Symfony Environment Variable Processor for decoding url-encoded strings

License

Notifications You must be signed in to change notification settings

scitotec/url-decode-env-var-processor-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScitotecUrlDecodeEnvVarProcessorBundle

A Symfony Bundle containing an Environment Variable Processors for decoding url-encoded strings.

Usage

Install and add the bundle:

composer require scitotec/url-decode-env-var-processor-bundle

You can use and combine it with other Environment Variable Processors, e.g.:

# .env
MONGODB_URL="mongodb://db_user:db_pa%24%[email protected]:27017/db_name"
# config/packages/mongodb.yaml
mongo_db_bundle:
    clients:
        default:
            hosts:
                - { host: '%env(string:key:host:url:MONGODB_URL)%', port: '%env(int:key:port:url:MONGODB_URL)%' }
            username: '%env(string:url_decode:key:user:url:MONGODB_URL)%' # ⬅️
            password: '%env(string:url_decode:key:pass:url:MONGODB_URL)%' # ⬅️
    connections:
        default:
            database_name: '%env(key:path:url:MONGODB_URL)%'

About

Symfony Environment Variable Processor for decoding url-encoded strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages