Skip to content

Commit

Permalink
Allow environment to be defined in an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche committed Nov 25, 2019
1 parent 1f6bf28 commit 6dc004d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,12 @@ public function getConfigTreeBuilder()
->info('Default route name to use for error page (e.g. payment refused)')
->example(['default_error_route' => 'my_error_route'])
->end()
->enumNode('environment')
->scalarNode('environment')
->isRequired()
->values([
PaylineSDK::ENV_HOMO,
PaylineSDK::ENV_PROD,
PaylineSDK::ENV_INT,
PaylineSDK::ENV_DEV,
])
->beforeNormalization()
->always(function ($v) { return strtoupper($v); })
->end()
->info("The payment environment\ne.g. 'homo' for 'Homologation', 'prod' for 'Production'")
->info("The payment environment\ne.g. 'homo' for 'Homologation', 'prod' for 'Production'.\nValid values are HOMO, PROD, INT and DEV.")
->defaultValue('HOMO')
->end()
->enumNode('log_level')
Expand Down

0 comments on commit 6dc004d

Please sign in to comment.