Skip to content

Commit e9b8223

Browse files
Merge pull request #34 from stackkit/feature/php8
PHP 8
2 parents 9be5758 + 3896586 commit e9b8223

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

.github/workflows/run-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: [7.4, 7.3, 7.2]
14+
php: [8.0, 7.4, 7.3, 7.2]
1515
laravel: [8.*, 7.*, 6.*, 5.8.*, 5.7.*, 5.6.*]
1616
os: [ubuntu-latest]
1717
include:
@@ -36,6 +36,12 @@ jobs:
3636
php: 7.4
3737
- laravel: 5.5.*
3838
php: 7.4
39+
- laravel: 5.8.*
40+
php: 8.0
41+
- laravel: 5.7.*
42+
php: 8.0
43+
- laravel: 5.6.*
44+
php: 8.0
3945

4046
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
4147

@@ -57,7 +63,7 @@ jobs:
5763
uses: actions/checkout@v1
5864

5965
- name: Setup PHP
60-
uses: shivammathur/setup-php@v1
66+
uses: shivammathur/setup-php@v2
6167
with:
6268
php-version: ${{ matrix.php }}
6369
extensions: mbstring, dom, fileinfo, mysql

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Please check the table below for supported Laravel and PHP versions:
2828
| 5.6 | 7.2 or 7.3
2929
| 5.7 | 7.2 or 7.3
3030
| 5.8 | 7.2 or 7.3 or 7.4
31-
| 6.x | 7.2 or 7.3 or 7.4
32-
| 7.x | 7.2 or 7.3 or 7.4
33-
| 8.x | 7.3 or 7.4
31+
| 6.x | 7.2 or 7.3 or 7.4 or 8.0
32+
| 7.x | 7.2 or 7.3 or 7.4 or 8.0
33+
| 8.x | 7.3 or 7.4 or 8.0
3434

3535
# Installation
3636

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"require-dev": {
3232
"mockery/mockery": "^1.2",
3333
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0 || ^5.0",
34-
"symfony/console": "^4.4|^5.0",
35-
"tecnickcom/tcpdf": "^6.3"
34+
"symfony/console": "^4.4|^5.0"
3635
}
3736
}

tests/DatabaseInteractionTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Carbon\Carbon;
66
use Illuminate\Support\Facades\DB;
7-
use TCPDF;
87

98
class DatabaseInteractionTest extends TestCase
109
{
@@ -209,10 +208,7 @@ public function attachments_should_be_saved_correctly()
209208
/** @test */
210209
public function in_memory_attachments_should_be_saved_correctly()
211210
{
212-
$pdf = new TCPDF;
213-
$pdf->Write(0, 'Hello CI!');
214-
215-
$rawData = $pdf->Output('generated.pdf', 'S');
211+
$rawData = file_get_contents(__DIR__ . '/files/pdf-sample.pdf');
216212

217213
$email = $this->composeEmail()
218214
->attachData($rawData, 'generated.pdf', [

tests/SenderTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Swift_Events_SendEvent;
66
use Illuminate\Support\Facades\Mail;
77
use Stackkit\LaravelDatabaseEmails\Email;
8-
use TCPDF;
98

109
class SenderTest extends TestCase
1110
{
@@ -192,10 +191,7 @@ public function attachments_are_not_added_if_the_data_is_not_valid()
192191
/** @test */
193192
public function raw_attachments_are_added_to_the_email()
194193
{
195-
$pdf = new TCPDF;
196-
$pdf->Write(0, 'Hello CI!');
197-
198-
$rawData = $pdf->Output('generated.pdf', 'S');
194+
$rawData = file_get_contents(__DIR__ . '/files/pdf-sample.pdf');
199195

200196
$this->composeEmail()
201197
->attachData($rawData, 'hello-ci.pdf', [

0 commit comments

Comments
 (0)