thephpleague / omnipay-common

Core components for the Omnipay PHP payment processing library
MIT License
330 stars 244 forks source link

[3.0] Only allow scalar configuration values #152

Open aimeos opened 7 years ago

aimeos commented 7 years ago

I would propose to reapply https://github.com/thephpleague/omnipay-common/pull/81/files

The commit has been reverted because for 2.x this may have been a breaking change as e.g. the PayPal drivers sets the credit card object using setParameter() too. For Omnipay 3.x we can be more restrictive now to increase driver quality

barryvdh commented 7 years ago

I want the 3.x release be as non-breaking as possible.

colinodell commented 7 years ago

Could we use Symfony's OptionResolver for this? It supports type validation.

aimeos commented 7 years ago

It doesn't involve a break in the API but only a change to decrease the probability of implementing something unusable in the drivers.

@colinodell I wouldn't make it to complicated. Scalar or not is enough to avoid objects.