]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Remove SMTP configuration environment overrides
authorMathieu Bruyen <code@mais-h.eu>
Thu, 25 Feb 2016 08:19:12 +0000 (09:19 +0100)
committerNicolas LÅ“uillet <nicolas@loeuillet.org>
Tue, 29 Mar 2016 11:44:12 +0000 (13:44 +0200)
SMTP configuration has been added in #1518 to use ParameterHandle's
env-map. But Symfony actually has a native way of allowing parameters to
be overriden from environment so rather than having to define a mapping
for each possible parameter, users can define any override in
parameters.yml:

> parameters:
>     database_host: %WALLABAG_DB_HOST%

and define an environment variable SYMFONY__WALLABAG_DB_HOST.

Links:
env-map: https://github.com/Incenteev/ParameterHandler#using-environment-variables-to-set-the-parameters
Symfony external parameters: http://symfony.com/doc/current/cookbook/configuration/external_parameters.html

composer.json

index 1abf6f20b0eef9e2cc341655a6f0c76fb96ef036..4c3fbdafe13398d50861d224a2194da21aa7cc91 100644 (file)
         "fabpot/php-cs-fixer": "~1.9"
     },
     "scripts": {
-        "build-parameters": [
-            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
-        ],
         "post-cmd": [
-            "@build-parameters",
+            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
         "symfony-tests-dir": "tests",
         "symfony-assets-install": "relative",
         "incenteev-parameters": {
-            "file": "app/config/parameters.yml",
-            "env-map": {
-                "mailer_host": "WALLABAG_MAILER_HOST",
-                "mailer_user": "WALLABAG_MAILER_USER",
-                "mailer_password": "WALLABAG_MAILER_PASSWORD",
-                "secret": "WALLABAG_SECRET"
-            }
+            "file": "app/config/parameters.yml"
         }
     },
     "autoload": {