Skip to content

Commit

Permalink
Support Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Mar 12, 2024
1 parent b9c51c0 commit cddf535
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,25 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.0, 8.1 ]
laravel: [ 8.*, 9.* ]
php: [ 8.3, 8.2 ]
laravel: [ 11.*, 10.* ]
dependency-version: [ prefer-stable ]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 9.*
testbench: 7.*
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Setup problem matchers
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ auth.json

phpunit.xml
.phpunit.result.cache
.phpunit.cache

.DS_Store
Thumbs.db
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{
"name": "interaction-design-foundation/nova-html-code-field",
"description": "A Laravel Nova field to write raw HTML and preview.",
"license": "MIT",
"keywords": [
"laravel",
"nova",
"laravel-nova-field",
"html"
],
"license": "MIT",
"require": {
"php": ">=8.0",
"php": "^8.2",
"ext-json": "*",
"laravel/nova": "^4.0"
"laravel/nova": "^4.25"
},
"require-dev": {
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.5"
"orchestra/testbench": "^8.0 || ^9.0",
"phpunit/phpunit": "^10.5 || ^11.0"
},
"repositories": [
{
"type": "composer",
"url": "https://nova.laravel.com"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"InteractionDesignFoundation\\NovaHtmlCodeField\\": "src/"
Expand All @@ -33,18 +35,16 @@
"InteractionDesignFoundation\\NovaHtmlCodeField\\Tests\\": "tests"
}
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"InteractionDesignFoundation\\NovaHtmlCodeField\\ServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"test": "phpunit --colors=always"
}
Expand Down
20 changes: 14 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
processIsolation="false"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="IxDF Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
3 changes: 2 additions & 1 deletion tests/HtmlCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
namespace InteractionDesignFoundation\NovaHtmlCodeField\Tests;

use InteractionDesignFoundation\NovaHtmlCodeField\HtmlCode;
use PHPUnit\Framework\Attributes\Test;

final class HtmlCodeTest extends TestCase
{
/** @test */
#[Test]
public function it_throws_an_exception_if_invalid_template_used(): void
{
$this->expectException(\InvalidArgumentException::class);
Expand Down

0 comments on commit cddf535

Please sign in to comment.