Skip to content

Commit 71f33db

Browse files
authored
Merge pull request #27 from nextapps-be/php82-support
PHP 8.2 support
2 parents a481325 + e84fe95 commit 71f33db

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

.github/workflows/run-linting.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ jobs:
1313
run: sudo apt-get update --fix-missing
1414

1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717

1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: 8.1
21+
php-version: 8.2
2222

2323
- name: Get Composer cache cirectory
2424
id: composer-cache
2525
run: |
2626
echo "::set-output name=dir::$(composer config cache-files-dir)"
2727
2828
- name: Cache Composer packages
29-
uses: actions/cache@v2
29+
uses: actions/cache@v3
3030
with:
3131
path: ${{ steps.composer-cache.outputs.dir }}
3232
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -39,5 +39,5 @@ jobs:
3939
4040
- name: Execute linting
4141
run: |
42-
vendor/bin/php-cs-fixer fix --dry-run
42+
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run
4343
vendor/bin/phpcs --colors --report-full

.github/workflows/run-tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php: [7.3, 7.4, 8.0, 8.1]
13+
php: [7.3, 7.4, 8.0, 8.1, 8.2]
1414
laravel: [7.*, 8.*, 9.*, 10.*]
1515
dependency-version: [prefer-lowest, prefer-stable]
1616
exclude:
17+
- php: 8.2
18+
laravel: 9.*
19+
dependency-version: prefer-lowest
20+
- php: 8.2
21+
laravel: 8.*
22+
- php: 8.2
23+
laravel: 7.*
1724
- php: 8.1
1825
laravel: 8.*
1926
dependency-version: prefer-lowest
@@ -43,7 +50,7 @@ jobs:
4350
run: sudo apt-get update --fix-missing
4451

4552
- name: Checkout code
46-
uses: actions/checkout@v2
53+
uses: actions/checkout@v3
4754

4855
- name: Setup PHP
4956
uses: shivammathur/setup-php@v2
@@ -57,7 +64,7 @@ jobs:
5764
echo "::set-output name=dir::$(composer config cache-files-dir)"
5865
5966
- name: Cache Composer packages
60-
uses: actions/cache@v2
67+
uses: actions/cache@v3
6168
with:
6269
path: ${{ steps.composer-cache.outputs.dir }}
6370
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929
],
3030
"require": {
31-
"php": "^7.3|^7.4|^8.0|^8.1",
31+
"php": "^7.3|^7.4|^8.0|^8.1|^8.2",
3232
"illuminate/database": "^7.0|^8.0|^9.0|^10.0",
3333
"illuminate/notifications": "^7.0|^8.0|^9.0|^10.0",
3434
"illuminate/support": "^7.0|^8.0|^9.0|^10.0"

tests/Feature/SendVerificationCodeTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ function ($notification, $channels, $notifiable) {
5151
/** @test */
5252
public function it_sends_notification_using_provided_channel()
5353
{
54-
$this->mock(NotificationFake::class, function ($mock) {
55-
$mock->shouldReceive('route')
56-
->with('a-random-channel', 'taylor@laravel.com')
57-
->andReturnSelf()
58-
->shouldReceive('notify');
59-
});
54+
if (! method_exists(NotificationFake::class, 'assertSentOnDemand')) {
55+
$this->markTestSkipped('assertSentOnDemand method not available on NotificationFake');
56+
}
6057

6158
VerificationCodeFacade::send('taylor@laravel.com', 'a-random-channel');
59+
60+
Notification::assertSentOnDemand(function (VerificationCodeCreated $notification, array $channels, object $notifiable) {
61+
return $notifiable->routes === ['a-random-channel' => 'taylor@laravel.com'];
62+
});
6263
}
6364

6465
/** @test */

0 commit comments

Comments
 (0)