2017 © Pedro Peláez
 

shopware-plugin shopware-environment-variables

a small shopware plugin to use env variables

image

shopware-blog/shopware-environment-variables

a small shopware plugin to use env variables

  • Wednesday, May 16, 2018
  • by teiling88
  • Repository
  • 3 Watchers
  • 4 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 9 Versions
  • 9 % Grown

The README.md

Scrutinizer Code Quality, (*1)

Use Environment Variables to override Plugin Configurations

In multi stage environments it is usual to have different basic and plugin configurations for dev, stage and live systems., (*2)

This plugin can override basic and plugin configurations with environment variables or constants., (*3)

Integration

We use ShopwarePaypal as an example plugin. Below you can see an example config.php which overrides some plugin settings and basic configuration., (*4)

<?php return [
   'db' => [...],
   'custom' =>
           [
               'plugins' =>
                   [
                       1 => [
                           'SwagPaymentPaypal' => [
                               'paypalUsername' => '1' . getenv('paypalUsername'),
                               'paypalPassword' => '1' . getenv('paypalPassword'),
                           ],
                       ],
                       2 => [
                           'SwagPaymentPaypal' => [
                               'paypalUsername' => '2' . getenv('paypalUsername'),
                               'paypalPassword' => '2' . getenv('paypalPassword'),
                           ],
                       ],
                   ],
               'config' => [
                   1 => [
                       'mailer_mailer' => 'test123',
                   ],
                   2 => [
                       'mailer_mailer' => '321test',
                   ],
               ],
           ],
];

The Versions

16/05 2018

dev-master

9999999-dev

a small shopware plugin to use env variables

  Sources   Download

MIT

The Development Requires

by Thomas Eiling

09/05 2018

dev-#8/master/adding-docker-stack

dev-#8/master/adding-docker-stack

a small shopware plugin to use env variables

  Sources   Download

MIT

The Development Requires

by Thomas Eiling

08/05 2018

0.2.1

0.2.1.0

a small shopware plugin to use env variables

  Sources   Download

MIT

by Thomas Eiling

08/05 2018

0.2.0

0.2.0.0

a small shopware plugin to use env variables

  Sources   Download

MIT

by Thomas Eiling

04/05 2018

0.1.0

0.1.0.0

a small shopware plugin to use env variables

  Sources   Download

MIT

by Thomas Eiling

04/05 2018

0.0.4

0.0.4.0

a small shopware plugin to use env variables

  Sources   Download

MIT

by Thomas Eiling

20/04 2018

0.0.3

0.0.3.0

a small shopware plugin to use env variables

  Sources   Download

MIT

by Thomas Eiling

20/04 2018

0.0.2

0.0.2.0

  Sources   Download

MIT

by Thomas Eiling

20/04 2018

0.0.1

0.0.1.0

  Sources   Download

MIT

by Thomas Eiling