silverstripe / silverstripe-omnipay

Silverstripe integration with Omnipay PHP payments library.
BSD 3-Clause "New" or "Revised" License
39 stars 67 forks source link

Update .travis.yml to standardised build #233

Closed kinglozzer closed 2 years ago

kinglozzer commented 3 years ago

Let’s see if we can get Travis running again!

kinglozzer commented 2 years ago

I ran into issues with the tests for PaymentMath because it allows using floats as a fallback if bcmath isn’t installed, but floats + high precision are just a terrible combination.

I’ve opted to add a warning for now if people are using this without bcmath, but we should probably switch to using https://github.com/moneyphp/money and release a new major version of this module.

Even moneyphp requires bcmath in the latest version, so I think we should just accept this as a hard requirement instead of trying to provide any sort of fallback. For PHP 7 & 8 support, we’ll have to require "moneyphp/money": "^3 || ^4 but the API changes between the two versions are minimal so that should be okay.

kinglozzer commented 2 years ago

Travis builds are running now, no BC-breaking changes necessary - https://github.com/silverstripe/silverstripe-omnipay/pull/235.

The last couple of commits in this PR are probably still valid, but can be a separate PHP 8 and PHPUnit 9 support task now. I believe the 3.x release line will work with PHP 8, but PHPUnit 5.x tests won’t work so I can’t verify that.