Skip to content

Commit

Permalink
Merge pull request #35 from zaporylie/php-8.0
Browse files Browse the repository at this point in the history
Support for PHP 8.0
  • Loading branch information
zaporylie authored Oct 23, 2021
2 parents 741f0fb + 71f6541 commit 7b43dbf
Show file tree
Hide file tree
Showing 49 changed files with 52 additions and 53 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
fail-fast: false
matrix:
php-version:
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
composer-version:
- "2"
steps:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
"type": "library",
"keywords": ["payment"],
"require": {
"php": "^5.6 || ^7.0",
"php": "^7.1 || ^8.0",
"psr/http-message": "^1.0",
"php-http/message": "^1.6",
"php-http/httplug": "^1.0",
"php-http/client-implementation": "^1.0",
"php-http/discovery": "^1.0",
"eloquent/enumeration": "^5.1",
"jms/serializer": "^1.8"
"jms/serializer": "^1.8 || ^3.0"
},
"require-dev": {
"php-http/guzzle6-adapter": "^1.0",
"phpunit/phpunit": ">=5 <8",
"phpunit/phpunit": ">=5 <9",
"symfony/yaml": "^2.0",
"symfony/filesystem": "^3.1",
"squizlabs/php_codesniffer": "^2.0",
"squizlabs/php_codesniffer": "^3.0",
"php-coveralls/php-coveralls": "^2.0"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion test/Integration/Api/PaymentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PaymentsTest extends IntegrationTestBase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp(); // TODO: Change the autogenerated stub
$this->api = $this->vipps->payment('test_subscription_key', $this->merchantSerialNumber);
Expand Down
2 changes: 1 addition & 1 deletion test/Integration/IntegrationTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class IntegrationTestBase extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();
$this->httpClient = $this->getMockBuilder(HttpClient::class)
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Api/ApiBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ApiBaseTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();
$this->apiBase = $this->getMockForAbstractClass(ApiBase::class, [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Authentication/TokenMemoryCacheStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TokenMemoryCacheStorageTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();
AnnotationRegistry::registerLoader('class_exists');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ClientTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/EndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EndpointTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();
}
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Exception/VippsExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class VippsExceptionTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();
$this->vipps = $this->createMock(Vipps::class);
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Authorization/ResponseGetTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ResponseGetTokenTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->resource = new GetToken($this->vipps, 'test', 'test');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Error/AuthorizationErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AuthorizationErrorTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
AnnotationRegistry::registerLoader('class_exists');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Error/PaymentErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PaymentErrorTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
AnnotationRegistry::registerLoader('class_exists');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/ModelTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class ModelTestBase extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AddressTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new Address();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/CallbackErrorInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CallbackErrorInfoTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new CallbackErrorInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CallbackTransactionInfoStatusTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new CallbackTransactionInfoStatus();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/CustomerInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CustomerInfoTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = (new CustomerInfo())->setMobileNumber(12345);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ExpressCheckOutPaymentRequestTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new ExpressCheckOutPaymentRequest();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/FetchShippingCostAndMethodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FetchShippingCostAndMethodTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new FetchShippingCostAndMethod();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/MerchantInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MerchantInfoTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = (new MerchantInfo())
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/PaymentShippingDetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PaymentShippingDetailsTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new PaymentShippingDetails();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RegularCheckOutPaymentRequestTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new RegularCheckOutPaymentRequest();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/RequestCancelPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RequestCancelPaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new RequestCancelPayment();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/RequestCapturePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RequestCapturePaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new RequestCapturePayment();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/RequestInitiatePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RequestInitiatePaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new RequestInitiatePayment();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/RequestRefundPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RequestRefundPaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new RequestRefundPayment();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseCancelPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ResponseCancelPaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new CancelPayment($this->vipps, 'test', 'test', new RequestCancelPayment());
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseCapturePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ResponseCapturePaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new CapturePayment($this->vipps, 'test', 'test', new RequestCapturePayment());
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseGetOrderStatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ResponseGetOrderStatusTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new GetOrderStatus($this->vipps, 'test', 'test_merchant_serial_number', 'test_order_id');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseGetPaymentDetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ResponseGetPaymentDetailsTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new GetPaymentDetails($this->vipps, 'test', 'test_merchant_serial_number', 'test_order_id');
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseInitiatePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ResponseInitiatePaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new InitiatePayment($this->vipps, 'test', new RequestInitiatePayment());
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ResponseRefundPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ResponseRefundPaymentTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$resource = new RefundPayment($this->vipps, 'test', 'test', new RequestRefundPayment());
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ShippingDetailsRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ShippingDetailsRequestTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new ShippingDetailsRequest();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/ShippingDetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ShippingDetailsTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new ShippingDetails();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/TransactionInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionInfoTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new TransactionInfo();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/TransactionLogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionLogTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new TransactionLog();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/TransactionSummaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionSummaryTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new TransactionSummary();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TransactionTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new Transaction();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Model/Payment/UserDetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class UserDetailsTest extends ModelTestBase
/**
* {@inheritdoc}
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
$this->model = new UserDetails();
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Resource/Authorization/GetTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GetTokenTest extends ResourceTestBase
*/
protected $resource;

protected function setUp()
protected function setUp() : void
{
parent::setUp(); // TODO: Change the autogenerated stub
$this->resource = $this->getMockBuilder(GetToken::class)
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Resource/Payment/CancelPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CancelPaymentTest extends PaymentResourceBaseTestBase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp(); // TODO: Change the autogenerated stub
$this->resource = $this->getMockBuilder(CancelPayment::class)
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Resource/Payment/CapturePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CapturePaymentTest extends PaymentResourceBaseTestBase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp() : void
{
parent::setUp(); // TODO: Change the autogenerated stub
$this->resource = $this->getMockBuilder(CapturePayment::class)
Expand Down
Loading

0 comments on commit 7b43dbf

Please sign in to comment.