Skip to content

Commit cddf535

Browse files
committed
Support Laravel 11
1 parent b9c51c0 commit cddf535

File tree

5 files changed

+34
-25
lines changed

5 files changed

+34
-25
lines changed

.github/workflows/run-tests.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,25 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ ubuntu-latest ]
12-
php: [ 8.0, 8.1 ]
13-
laravel: [ 8.*, 9.* ]
12+
php: [ 8.3, 8.2 ]
13+
laravel: [ 11.*, 10.* ]
1414
dependency-version: [ prefer-stable ]
1515
include:
16-
- laravel: 8.*
17-
testbench: 6.*
18-
- laravel: 9.*
19-
testbench: 7.*
16+
- laravel: 11.*
17+
testbench: 9.*
18+
- laravel: 10.*
19+
testbench: 8.*
2020

2121
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
2222

2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2
2929
with:
3030
php-version: ${{ matrix.php }}
31-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
3231
coverage: none
3332

3433
- name: Setup problem matchers

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ auth.json
99

1010
phpunit.xml
1111
.phpunit.result.cache
12+
.phpunit.cache
1213

1314
.DS_Store
1415
Thumbs.db

composer.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
{
22
"name": "interaction-design-foundation/nova-html-code-field",
33
"description": "A Laravel Nova field to write raw HTML and preview.",
4+
"license": "MIT",
45
"keywords": [
56
"laravel",
67
"nova",
78
"laravel-nova-field",
89
"html"
910
],
10-
"license": "MIT",
1111
"require": {
12-
"php": ">=8.0",
12+
"php": "^8.2",
1313
"ext-json": "*",
14-
"laravel/nova": "^4.0"
14+
"laravel/nova": "^4.25"
1515
},
1616
"require-dev": {
17-
"orchestra/testbench": "^7.0",
18-
"phpunit/phpunit": "^9.5"
17+
"orchestra/testbench": "^8.0 || ^9.0",
18+
"phpunit/phpunit": "^10.5 || ^11.0"
1919
},
2020
"repositories": [
2121
{
2222
"type": "composer",
2323
"url": "https://nova.laravel.com"
2424
}
2525
],
26+
"minimum-stability": "dev",
27+
"prefer-stable": true,
2628
"autoload": {
2729
"psr-4": {
2830
"InteractionDesignFoundation\\NovaHtmlCodeField\\": "src/"
@@ -33,18 +35,16 @@
3335
"InteractionDesignFoundation\\NovaHtmlCodeField\\Tests\\": "tests"
3436
}
3537
},
38+
"config": {
39+
"sort-packages": true
40+
},
3641
"extra": {
3742
"laravel": {
3843
"providers": [
3944
"InteractionDesignFoundation\\NovaHtmlCodeField\\ServiceProvider"
4045
]
4146
}
4247
},
43-
"config": {
44-
"sort-packages": true
45-
},
46-
"minimum-stability": "dev",
47-
"prefer-stable": true,
4848
"scripts": {
4949
"test": "phpunit --colors=always"
5050
}

phpunit.xml.dist

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
backupGlobals="false"
6+
colors="true"
7+
processIsolation="false"
8+
stopOnFailure="false"
9+
cacheDirectory=".phpunit.cache"
10+
backupStaticProperties="false">
811
<testsuites>
912
<testsuite name="IxDF Test Suite">
1013
<directory>tests</directory>
1114
</testsuite>
1215
</testsuites>
1316
<php>
1417
</php>
18+
<source>
19+
<include>
20+
<directory suffix=".php">src/</directory>
21+
</include>
22+
</source>
1523
</phpunit>

tests/HtmlCodeTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
namespace InteractionDesignFoundation\NovaHtmlCodeField\Tests;
44

55
use InteractionDesignFoundation\NovaHtmlCodeField\HtmlCode;
6+
use PHPUnit\Framework\Attributes\Test;
67

78
final class HtmlCodeTest extends TestCase
89
{
9-
/** @test */
10+
#[Test]
1011
public function it_throws_an_exception_if_invalid_template_used(): void
1112
{
1213
$this->expectException(\InvalidArgumentException::class);

0 commit comments

Comments
 (0)