Skip to content

Commit

Permalink
Merge pull request #27 from nextapps-be/php82-support
Browse files Browse the repository at this point in the history
PHP 8.2 support
  • Loading branch information
gdebrauwer authored Feb 19, 2023
2 parents a481325 + e84fe95 commit 71f33db
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2

- name: Get Composer cache cirectory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -39,5 +39,5 @@ jobs:
- name: Execute linting
run: |
vendor/bin/php-cs-fixer fix --dry-run
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run
vendor/bin/phpcs --colors --report-full
13 changes: 10 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.3, 7.4, 8.0, 8.1]
php: [7.3, 7.4, 8.0, 8.1, 8.2]
laravel: [7.*, 8.*, 9.*, 10.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.2
laravel: 9.*
dependency-version: prefer-lowest
- php: 8.2
laravel: 8.*
- php: 8.2
laravel: 7.*
- php: 8.1
laravel: 8.*
dependency-version: prefer-lowest
Expand Down Expand Up @@ -43,7 +50,7 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -57,7 +64,7 @@ jobs:
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
],
"require": {
"php": "^7.3|^7.4|^8.0|^8.1",
"php": "^7.3|^7.4|^8.0|^8.1|^8.2",
"illuminate/database": "^7.0|^8.0|^9.0|^10.0",
"illuminate/notifications": "^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "^7.0|^8.0|^9.0|^10.0"
Expand Down
13 changes: 7 additions & 6 deletions tests/Feature/SendVerificationCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ function ($notification, $channels, $notifiable) {
/** @test */
public function it_sends_notification_using_provided_channel()
{
$this->mock(NotificationFake::class, function ($mock) {
$mock->shouldReceive('route')
->with('a-random-channel', '[email protected]')
->andReturnSelf()
->shouldReceive('notify');
});
if (! method_exists(NotificationFake::class, 'assertSentOnDemand')) {
$this->markTestSkipped('assertSentOnDemand method not available on NotificationFake');
}

VerificationCodeFacade::send('[email protected]', 'a-random-channel');

Notification::assertSentOnDemand(function (VerificationCodeCreated $notification, array $channels, object $notifiable) {
return $notifiable->routes === ['a-random-channel' => '[email protected]'];
});
}

/** @test */
Expand Down

0 comments on commit 71f33db

Please sign in to comment.