Skip to content

Commit 8e71b99

Browse files
authored
Laravel 12.x Support (#1072)
* Laravel 12.x Support * PHPStan fixes
1 parent 2a59de0 commit 8e71b99

File tree

6 files changed

+24
-19
lines changed

6 files changed

+24
-19
lines changed

.github/workflows/run-static-analysis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
php: [8.1, 8.2, 8.3, 8.4]
26-
laravel: [9.*, 10.*, 11.*]
26+
laravel: [9.*, 10.*, 11.*, 12.*]
2727
dependency-version: [prefer-stable]
2828
exclude:
29+
- laravel: 12.*
30+
php: 8.1
2931
- laravel: 11.*
3032
php: 8.1
3133

.github/workflows/run-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
php: [8.1, 8.2, 8.3, 8.4]
26-
laravel: ['9.*', '10.*', '11.*']
26+
laravel: ['9.*', '10.*', '11.*', '12.*']
2727
dependency-version: [prefer-lowest, prefer-stable]
2828
exclude:
29+
- laravel: 12.*
30+
php: 8.1
2931
- laravel: 11.*
3032
php: 8.1
3133

@@ -44,7 +46,7 @@ jobs:
4446

4547
- name: Install dependencies
4648
run: |
47-
composer remove phpro/grumphp --no-update --dev
49+
composer remove "phpro/grumphp" "larastan/larastan" --no-update --dev
4850
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
4951
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
5052

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ composer.phar
33
composer.lock
44
.DS_Store
55
/.idea
6-
.phpunit.result.cache
6+
.phpunit.cache
7+
.phpunit.result.cache

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"require": {
1717
"php": "^8.1",
1818
"dompdf/dompdf": "^3.0",
19-
"illuminate/support": "^9|^10|^11"
19+
"illuminate/support": "^9|^10|^11|^12"
2020
},
2121
"require-dev": {
22-
"orchestra/testbench": "^7|^8|^9",
22+
"orchestra/testbench": "^7|^8|^9|^10",
2323
"squizlabs/php_codesniffer": "^3.5",
2424
"phpro/grumphp": "^2.5",
25-
"larastan/larastan": "^2.7.0"
25+
"larastan/larastan": "^2.7|^3.0"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/Facade/Pdf.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
* @method static BasePDF setBaseHost(string $baseHost)
1111
* @method static BasePDF setBasePath(string $basePath)
1212
* @method static BasePDF setCanvas(\Dompdf\Canvas $canvas)
13-
* @method static BasePDF setCallbacks(array $callbacks)
13+
* @method static BasePDF setCallbacks(array<string, mixed> $callbacks)
1414
* @method static BasePDF setCss(\Dompdf\Css\Stylesheet $css)
15-
* @method static BasePDF setDefaultView(string $defaultView, array $options)
15+
* @method static BasePDF setDefaultView(string $defaultView, array<string, mixed> $options)
1616
* @method static BasePDF setDom(\DOMDocument $dom)
1717
* @method static BasePDF setFontMetrics(\Dompdf\FontMetrics $fontMetrics)
18-
* @method static BasePDF setHttpContext(resource|array $httpContext)
18+
* @method static BasePDF setHttpContext(resource|array<string, mixed> $httpContext)
1919
* @method static BasePDF setPaper(string|float[] $paper, string $orientation = 'portrait')
2020
* @method static BasePDF setProtocol(string $protocol)
2121
* @method static BasePDF setTree(\Dompdf\Frame\FrameTree $tree)
2222
* @method static BasePDF setWarnings(bool $warnings)
23-
* @method static BasePDF setOption(array|string $attribute, $value = null)
24-
* @method static BasePDF setOptions(array $options)
25-
* @method static BasePDF loadView(string $view, array $data = [], array $mergeData = [], ?string $encoding = null)
23+
* @method static BasePDF setOption(array<string, mixed>|string $attribute, $value = null)
24+
* @method static BasePDF setOptions(array<string, mixed> $options)
25+
* @method static BasePDF loadView(string $view, array<string, mixed> $data = [], array<string, mixed> $mergeData = [], ?string $encoding = null)
2626
* @method static BasePDF loadHTML(string $string, ?string $encoding = null)
2727
* @method static BasePDF loadFile(string $file)
28-
* @method static BasePDF addInfo(array $info)
29-
* @method static string output(array $options = [])
28+
* @method static BasePDF addInfo(array<string, string> $info)
29+
* @method static string output(array<string, int> $options = [])
3030
* @method static BasePDF save()
3131
* @method static \Illuminate\Http\Response download(string $filename = 'document.pdf')
3232
* @method static \Illuminate\Http\Response stream(string $filename = 'document.pdf')

src/PDF.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@
2323
* @method PDF setBaseHost(string $baseHost)
2424
* @method PDF setBasePath(string $basePath)
2525
* @method PDF setCanvas(\Dompdf\Canvas $canvas)
26-
* @method PDF setCallbacks(array $callbacks)
26+
* @method PDF setCallbacks(array<string, mixed> $callbacks)
2727
* @method PDF setCss(\Dompdf\Css\Stylesheet $css)
28-
* @method PDF setDefaultView(string $defaultView, array $options)
28+
* @method PDF setDefaultView(string $defaultView, array<string, mixed> $options)
2929
* @method PDF setDom(\DOMDocument $dom)
3030
* @method PDF setFontMetrics(\Dompdf\FontMetrics $fontMetrics)
31-
* @method PDF setHttpContext(resource|array $httpContext)
31+
* @method PDF setHttpContext(resource|array<string, mixed> $httpContext)
3232
* @method PDF setPaper(string|float[] $paper, string $orientation = 'portrait')
3333
* @method PDF setProtocol(string $protocol)
3434
* @method PDF setTree(\Dompdf\Frame\FrameTree $tree)
3535
* @method string getBaseHost()
3636
* @method string getBasePath()
3737
* @method \Dompdf\Canvas getCanvas()
38-
* @method array getCallbacks()
38+
* @method array<string, mixed> getCallbacks()
3939
* @method \Dompdf\Css\Stylesheet getCss()
4040
* @method \DOMDocument getDom()
4141
* @method \Dompdf\FontMetrics getFontMetrics()

0 commit comments

Comments
 (0)