Skip to content

SW-6089 Update to use Guzzle 7 #5

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
vendor/
composer.lock
composer.lock

testGuzzleScript.php
testSmartWaiver
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@
- Added new route to retrieve waiver photos ([Example](https://github.com/smartwaivercom/php-sdk#retrieve-photos-on-a-waiver))
- Added new search route ([Example](https://github.com/smartwaivercom/php-sdk#search-for-waivers))
- Added first and last name query parameters to waivers route ([Example](https://github.com/smartwaivercom/php-sdk#list-all-signed-waivers))


## v4.2.4 (2023-11-15)

- Updated PHP to use 7.4
- Updated Guzzle to use ^7.0
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"license": "Apache-2.0",
"type": "library",
"require": {
"php": ">= 5.6",
"guzzlehttp/guzzle": "^6.2"
"php": ">=5.6|>=7.4",
"guzzlehttp/guzzle": "^6.0|^7.0"
},
"require-dev": {
"phpunit/phpunit": ">= 5.2"
"phpunit/phpunit": "^5.0|^6.0"
},
"autoload": {
"psr-4" : {
Expand Down
4 changes: 2 additions & 2 deletions tests/SmartwaiverExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverExceptionTest extends \PHPUnit_Framework_TestCase
class SmartwaiverExceptionTest extends \PHPUnit\Framework\TestCase
{
/**
* Test that an HTTP Exception allows access to all the correct information
Expand Down Expand Up @@ -98,4 +98,4 @@ public function testSDKExceptionCreatedProperly()
$this->assertEquals('Body Content', $swException->getGuzzleBody());
$this->assertEquals(404, $swException->getGuzzleResponse()->getStatusCode());
}
}
}
4 changes: 2 additions & 2 deletions tests/SmartwaiverRawResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverRawResponseTest extends \PHPUnit_Framework_TestCase
class SmartwaiverRawResponseTest extends \PHPUnit\Framework\TestCase
{
/**
* Test that response object is properly created
Expand All @@ -38,4 +38,4 @@ public function testResponseCreation()
$this->assertEquals(200, $response->statusCode);
$this->assertEquals('TestingResponseBody', $response->body);
}
}
}
4 changes: 2 additions & 2 deletions tests/SmartwaiverResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverResponseTest extends \PHPUnit_Framework_TestCase
class SmartwaiverResponseTest extends \PHPUnit\Framework\TestCase
{
/**
* API Key used for tests
Expand Down Expand Up @@ -266,4 +266,4 @@ public function testGetGuzzleResponse()
$this->assertInstanceOf(Response::class, $guzzleResponse);
$this->assertEquals(201, $guzzleResponse->getStatusCode());
}
}
}
4 changes: 2 additions & 2 deletions tests/SmartwaiverRoutesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverRoutesTest extends \PHPUnit_Framework_TestCase
class SmartwaiverRoutesTest extends \PHPUnit\Framework\TestCase
{
/**
* Base URI for all URLs
Expand Down Expand Up @@ -271,4 +271,4 @@ public function testProcessDynamicTemplate()
$url = SmartwaiverRoutes::processDynamicTemplate('TestingGUID');
$this->assertEquals(self::BASE_URI . '/v4/dynamic/process/TestingGUID', $url);
}
}
}
4 changes: 2 additions & 2 deletions tests/SmartwaiverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTest extends \PHPUnit\Framework\TestCase
{
/**
* API Key used for tests
Expand Down Expand Up @@ -987,4 +987,4 @@ private function checkRequests($method, $container, $paths, $data = [])
}
}
}
}
}
2 changes: 1 addition & 1 deletion tests/Types/Data/SmartwaiverTemplateDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateDataTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateDataTest extends \PHPUnit\Framework\TestCase
{
/**
* Test blank data object is generated properly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverCustomFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverCustomFieldTest extends \PHPUnit_Framework_TestCase
class SmartwaiverCustomFieldTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverDynamicProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverDynamicProcessTest extends \PHPUnit_Framework_TestCase
class SmartwaiverDynamicProcessTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverDynamicTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverDynamicTemplateTest extends \PHPUnit_Framework_TestCase
class SmartwaiverDynamicTemplateTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverFlagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverFlagTest extends \PHPUnit_Framework_TestCase
class SmartwaiverFlagTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverGuardianTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverGuardianTest extends \PHPUnit_Framework_TestCase
class SmartwaiverGuardianTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverParticipantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverParticipantTest extends \PHPUnit_Framework_TestCase
class SmartwaiverParticipantTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverPhotoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverPhotoTest extends \PHPUnit_Framework_TestCase
class SmartwaiverPhotoTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverPhotosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverPhotosTest extends \PHPUnit_Framework_TestCase
class SmartwaiverPhotosTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverSearchTest extends \PHPUnit_Framework_TestCase
class SmartwaiverSearchTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverSignaturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverSignaturesTest extends \PHPUnit_Framework_TestCase
class SmartwaiverSignaturesTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTypeTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTypeTest extends \PHPUnit\Framework\TestCase
{
/**
* Test that the input array is properly accessible
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverWaiverSummaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverWaiverSummaryTest extends \PHPUnit_Framework_TestCase
class SmartwaiverWaiverSummaryTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverWaiverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverWaiverTest extends \PHPUnit_Framework_TestCase
class SmartwaiverWaiverTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
2 changes: 1 addition & 1 deletion tests/Types/SmartwaiverWebhookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverWebhookTest extends \PHPUnit_Framework_TestCase
class SmartwaiverWebhookTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether a required keys error is generated correctly
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateBodyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateBodyTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateBodyTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$body = new SmartwaiverTemplateBody();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateCompletionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateCompletionTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateCompletionTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$completion = new SmartwaiverTemplateCompletion();
$this->assertTrue(true);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateElectronicConsentTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateElectronicConsentTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$electronicConsent = new SmartwaiverTemplateElectronicConsent();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateGuardianTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateGuardianTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateGuardianTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$guardian = new SmartwaiverTemplateGuardian();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateHeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateHeaderTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateHeaderTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$header = new SmartwaiverTemplateHeader();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateMetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateMetaTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateMetaTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$meta = new SmartwaiverTemplateMeta();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateParticipantsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateParticipantsTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateParticipantsTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$participants = new SmartwaiverTemplateParticipants();
$this->assertTrue(true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/Types/Template/SmartwaiverTemplateProcessingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*
* @package Smartwaiver\Tests
*/
class SmartwaiverTemplateProcessingTest extends \PHPUnit_Framework_TestCase
class SmartwaiverTemplateProcessingTest extends \PHPUnit\Framework\TestCase
{
/**
* Test whether no required keys error is generated
*/
public function testRequiredKeysEmpty()
{
$processing = new SmartwaiverTemplateProcessing();
$this->assertTrue(true);
}

/**
Expand Down
Loading