Skip to content

Commit 7a447ee

Browse files
committed
Add PHP 8.5 to CI, start testing against Laravel 13, misc. updates
1 parent 0e0a095 commit 7a447ee

7 files changed

Lines changed: 34 additions & 27 deletions

File tree

.github/workflows/facades.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Setup PHP
2626
uses: shivammathur/setup-php@v2
2727
with:
28-
php-version: '8.4'
28+
php-version: '8.5'
2929
tools: composer:v2
3030
coverage: none
3131

@@ -38,7 +38,7 @@ jobs:
3838
run: php -f vendor/bin/facade.php BabDev\\Twilio\\Facades\\TwilioClient
3939

4040
- name: Commit updates
41-
uses: stefanzweifel/git-auto-commit-action@v5
41+
uses: stefanzweifel/git-auto-commit-action@v7
4242
with:
4343
commit_message: Update facade docblocks
4444
file_pattern: src/

.github/workflows/run-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,26 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: ['8.2', '8.3', '8.4']
13-
laravel: ['11.*', '12.*']
12+
php: ['8.2', '8.3', '8.4', '8.5']
13+
laravel: ['11.*', '12.*', '13.*@dev']
1414
composer-flags: ['--prefer-stable']
1515
can-fail: [false]
1616
include:
1717
- php: '8.2'
1818
laravel: '11.*'
1919
composer-flags: '--prefer-stable --prefer-lowest'
2020
can-fail: false
21+
exclude:
22+
- php: '8.5'
23+
laravel: '11.*'
24+
- php: '8.2'
25+
laravel: '13.*@dev'
2126

2227
name: "PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
2328

2429
steps:
2530
- name: Checkout code
26-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
2732

2833
- name: Setup PHP
2934
uses: shivammathur/setup-php@v2

.php-cs-fixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
return (new PhpCsFixer\Config())
1414
->setRules(
1515
[
16-
'@PHP82Migration' => true,
17-
'@PHP82Migration:risky' => true,
18-
'@PHPUnit100Migration:risky' => true,
16+
'@PHP8x2Migration' => true,
17+
'@PHP8x2Migration:risky' => true,
18+
'@PHPUnit11x0Migration:risky' => true,
1919
'@PER-CS' => true,
2020
'@PER-CS:risky' => true,
2121
'align_multiline_comment' => true,

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"keywords": ["laravel", "twilio"],
66
"require": {
77
"php": "^8.2",
8-
"illuminate/http": "^11.0 || ^12.0",
9-
"illuminate/support": "^11.0 || ^12.0",
8+
"illuminate/http": "^11.0 || ^12.0 || ^13.0",
9+
"illuminate/support": "^11.0 || ^12.0 || ^13.0",
1010
"twilio/sdk": "^8.5"
1111
},
1212
"require-dev": {
1313
"guzzlehttp/guzzle": "^7.8",
14-
"laravel/framework": "^11.0 || ^12.0",
15-
"orchestra/testbench": "^9.0 || ^10.0",
16-
"phpunit/phpunit": "^11.5"
14+
"laravel/framework": "^11.0 || ^12.0 || ^13.0",
15+
"orchestra/testbench": "^9.0 || ^10.0 || ^11.0",
16+
"phpunit/phpunit": "^11.5 || ^12.5"
1717
},
1818
"suggest": {
1919
"illuminate/notifications": "To use Laravel's notifications component with this package"

tests/ConnectionManagerTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Illuminate\Support\ServiceProvider;
1111
use Orchestra\Testbench\TestCase;
1212
use PHPUnit\Framework\MockObject\MockObject;
13+
use PHPUnit\Framework\MockObject\Stub;
1314
use Twilio\Rest\Api\V2010\Account\CallInstance;
1415
use Twilio\Rest\Api\V2010\Account\MessageInstance;
1516
use Twilio\Rest\Client;
@@ -39,8 +40,8 @@ public function testAnUnknownCustomConnectionCausesAnException(): void
3940

4041
public function testRetrievingTheSdkClientProxiesThrough(): void
4142
{
42-
/** @var MockObject&Client $twilioClient */
43-
$twilioClient = $this->createMock(Client::class);
43+
/** @var Stub&Client $twilioClient */
44+
$twilioClient = $this->createStub(Client::class);
4445

4546
/** @var MockObject&TwilioClientContract $client */
4647
$client = $this->createMock(TwilioClientContract::class);
@@ -60,8 +61,8 @@ public function testRetrievingTheSdkClientProxiesThrough(): void
6061

6162
public function testPlacingACallProxiesThrough(): void
6263
{
63-
/** @var MockObject&CallInstance $call */
64-
$call = $this->createMock(CallInstance::class);
64+
/** @var Stub&CallInstance $call */
65+
$call = $this->createStub(CallInstance::class);
6566

6667
/** @var MockObject&TwilioClientContract $client */
6768
$client = $this->createMock(TwilioClientContract::class);
@@ -81,8 +82,8 @@ public function testPlacingACallProxiesThrough(): void
8182

8283
public function testSendingAMessageProxiesThrough(): void
8384
{
84-
/** @var MockObject&MessageInstance $message */
85-
$message = $this->createMock(MessageInstance::class);
85+
/** @var Stub&MessageInstance $message */
86+
$message = $this->createStub(MessageInstance::class);
8687

8788
/** @var MockObject&TwilioClientContract $client */
8889
$client = $this->createMock(TwilioClientContract::class);

tests/Facades/TwilioClientTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Illuminate\Support\ServiceProvider;
1212
use Orchestra\Testbench\TestCase;
1313
use PHPUnit\Framework\MockObject\MockObject;
14+
use PHPUnit\Framework\MockObject\Stub;
1415
use Twilio\Rest\Api\V2010\Account\CallInstance;
1516
use Twilio\Rest\Api\V2010\Account\MessageInstance;
1617
use Twilio\Rest\Client;
@@ -37,8 +38,8 @@ public function testAnUnknownCustomConnectionCausesAnException(): void
3738

3839
public function testRetrievingTheSdkClientProxiesThrough(): void
3940
{
40-
/** @var MockObject&Client $twilioClient */
41-
$twilioClient = $this->createMock(Client::class);
41+
/** @var Stub&Client $twilioClient */
42+
$twilioClient = $this->createStub(Client::class);
4243

4344
/** @var MockObject&TwilioClientContract $client */
4445
$client = $this->createMock(TwilioClientContract::class);
@@ -58,8 +59,8 @@ public function testRetrievingTheSdkClientProxiesThrough(): void
5859

5960
public function testPlacingACallProxiesThrough(): void
6061
{
61-
/** @var MockObject&CallInstance $call */
62-
$call = $this->createMock(CallInstance::class);
62+
/** @var Stub&CallInstance $call */
63+
$call = $this->createStub(CallInstance::class);
6364

6465
/** @var MockObject&TwilioClientContract $client */
6566
$client = $this->createMock(TwilioClientContract::class);
@@ -79,8 +80,8 @@ public function testPlacingACallProxiesThrough(): void
7980

8081
public function testSendingAMessageProxiesThrough(): void
8182
{
82-
/** @var MockObject&MessageInstance $message */
83-
$message = $this->createMock(MessageInstance::class);
83+
/** @var Stub&MessageInstance $message */
84+
$message = $this->createStub(MessageInstance::class);
8485

8586
/** @var MockObject&TwilioClientContract $client */
8687
$client = $this->createMock(TwilioClientContract::class);

tests/Notifications/Channels/TwilioChannelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testANotificationIsSent(): void
1818
$twilio = $this->createMock(TwilioClient::class);
1919
$twilio->expects($this->once())
2020
->method('message')
21-
->willReturn($this->createMock(MessageInstance::class));
21+
->willReturn($this->createStub(MessageInstance::class));
2222

2323
$notifiable = new class() {
2424
use Notifiable;

0 commit comments

Comments
 (0)