-
Notifications
You must be signed in to change notification settings - Fork 67
Update PHPUnit to 9.5 #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php-http/discovery required for 7.4 tests
Upgraded PHPUnit to 9.5 and to php-http/guzzle7-adapter
setUp function
For incomplete tests
Wrapped testsuite in testsuites
To tearDown, setUpBeforeClass and tearDownAfterClass functions
Upgraded to php-http/guzzle7-adapter
Reduced decimal places due to the limitation of using the number_format function
As per PR #239
As a dev dependency
To all functions that expect failure
- Changed a payment gateway url to sec.windcave.com for Payment Express tests. Updated the version of omnipay/paymentexpress in composer.json to account for a recent branding change. - Changed assertInternalType('array', etc.) to assertIsArray - For Guzzlehttp\Psr7, replaced parse_response with Message::parseResponse - Replaced contains function with a callback in BasePurchaseServiceTest.php - Updated PaymentMathTest.php because the function bcsub cannot have a precision below 0 - Replaced strftime in Payment.php with date_format. Added SilverStripe\Omnipay\Model\Payment\TitleTemplateDateFormat to the language files. Removed unnecessary tests in PaymentModelTest.php because language settings cannot be dynamically changed. - Added symfony/http-foundation as a dev dependency to composer.json - Added php_codesniffer to ci.yml to ensure it is loaded - Updated phpcs.xml.dist to align with the one used by SilverStripe Framework
Code beautifier & fixer
Replaced by GitHub Actions
wilr
added a commit
that referenced
this pull request
Jul 8, 2023
* [CVE-2022-29254] Add extra validation on payment completion * Update PHPUnit to 9.5 (#241) * Added Github Actions Workflows php-http/discovery required for 7.4 tests * Updated composer.json Upgraded PHPUnit to 9.5 and to php-http/guzzle7-adapter * PHPUnit: Added void return type setUp function * PHPUnit: Added @doesNotPerformAssertions For incomplete tests * PHPUnit: Updated phpunit.xml.dist Wrapped testsuite in testsuites * PHPUnit: Added additional void return type To tearDown, setUpBeforeClass and tearDownAfterClass functions * PHPUnit: updated PaymentTest.php Upgraded to php-http/guzzle7-adapter * PHPUnit: updated PaymentMathTest.php Reduced decimal places due to the limitation of using the number_format function * PHP8.1 Compatibility As per PR #239 * PHPUnit: added guzzlehttp/psr7 to composer.json As a dev dependency * PHPUnit: added expectException function To all functions that expect failure * PHPUnit: updated various as highlighted by GitHub Actions - Changed a payment gateway url to sec.windcave.com for Payment Express tests. Updated the version of omnipay/paymentexpress in composer.json to account for a recent branding change. - Changed assertInternalType('array', etc.) to assertIsArray - For Guzzlehttp\Psr7, replaced parse_response with Message::parseResponse - Replaced contains function with a callback in BasePurchaseServiceTest.php - Updated PaymentMathTest.php because the function bcsub cannot have a precision below 0 - Replaced strftime in Payment.php with date_format. Added SilverStripe\Omnipay\Model\Payment\TitleTemplateDateFormat to the language files. Removed unnecessary tests in PaymentModelTest.php because language settings cannot be dynamically changed. - Added symfony/http-foundation as a dev dependency to composer.json - Added php_codesniffer to ci.yml to ensure it is loaded - Updated phpcs.xml.dist to align with the one used by SilverStripe Framework * Updated various with PHP_CodeSniffer Code beautifier & fixer * Dropped travis Replaced by GitHub Actions --------- Co-authored-by: Loz Calver <[email protected]> Co-authored-by: Antony Thorpe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in issue #240, this PR upgrades SilverStripe-Omnipay to PHPUnit 9.5. The only breaking change is with the lang files where
SilverStripe\Omnipay\Model\Payment.TitleTemplateDateFormat
was added to the getTitle function in Payment.php.