-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: drop support for EOL PHP versions and add support for PHP 8 (#…
…1090) Also upgraded phpunit.
- Loading branch information
childish-sambino
authored
May 2, 2022
1 parent
52021bd
commit 218e96d
Showing
38 changed files
with
280 additions
and
287 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
php: [ 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 ] | ||
php: [ '7.3', '7.4', '8.0', '8.1' ] | ||
env: | ||
DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }} | ||
steps: | ||
|
@@ -46,7 +46,7 @@ jobs: | |
- name: Setup PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: '7.4' | ||
php-version: '8.1' | ||
id: php | ||
|
||
- name: Build Release Artifacts | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Upgrade Guide | ||
|
||
_MAJOR version bumps will have upgrade notes posted here._ | ||
|
||
[2022-05-04] 7.x.x to 8.x.x | ||
--------------------------- | ||
|
||
### CHANGED - Drop support for PHP versions 5.6, 7.0, 7.1, and 7.2 which are EOL. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,12 @@ | |
/** | ||
* This file tests BccSettings. | ||
*/ | ||
|
||
namespace SendGrid\Tests\Unit; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use SendGrid\Mail\BccSettings; | ||
use SendGrid\Mail\TypeException; | ||
|
||
/** | ||
* This file tests BccSettings. | ||
|
@@ -31,24 +33,22 @@ public function testSetEmail() | |
$this->assertSame('[email protected]', $bccSettings->getEmail()); | ||
} | ||
|
||
/** | ||
* @expectedException \SendGrid\Mail\TypeException | ||
* @expectedExceptionMessage "$email" must be a valid email address. | ||
*/ | ||
public function testSetEmailOnInvalidEmailFormat() | ||
{ | ||
$this->expectException(TypeException::class); | ||
$this->expectExceptionMessageMatches('/"\$email" must be a valid email address/'); | ||
|
||
$bccSettings = new BccSettings(); | ||
$bccSettings->setEmail('invalid_email_address'); | ||
} | ||
|
||
/** | ||
* @expectedException \SendGrid\Mail\TypeException | ||
* @expectedExceptionMessage "$email" must be a string. | ||
*/ | ||
public function testSetEmailOnInvalidType() | ||
{ | ||
$this->expectException(TypeException::class); | ||
$this->expectExceptionMessageMatches('/"\$email" must be a string/'); | ||
|
||
$bccSettings = new BccSettings(); | ||
$bccSettings->setEmail(['invalid_type']); | ||
$bccSettings->setEmail(123); | ||
} | ||
|
||
public function testSetEnable() | ||
|
@@ -59,12 +59,11 @@ public function testSetEnable() | |
$this->assertTrue($bccSettings->getEnable()); | ||
} | ||
|
||
/** | ||
* @expectedException \SendGrid\Mail\TypeException | ||
* @expectedExceptionMessage "$enable" must be a boolean. | ||
*/ | ||
public function testSetEnableOnInvalidType() | ||
{ | ||
$this->expectException(TypeException::class); | ||
$this->expectExceptionMessageMatches('/"\$enable" must be a boolean/'); | ||
|
||
$bccSettings = new BccSettings(); | ||
$bccSettings->setEnable('invalid_bool_type'); | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.