scitotec / url-decode-env-var-processor-bundle
Symfony Environment Variable Processor for decoding url-encoded strings
v1.0.0
2023-03-14 14:25 UTC
Requires
- php: >=7.2
- symfony/framework-bundle: ^4.2|^5.0|^6.0
Requires (Dev)
- symfony/test-pack: ^1.1
This package is not auto-updated.
Last update: 2024-04-24 17:55:12 UTC
README
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%24word@127.0.0.1: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)%'