Skip to content

Commit ae4cec4

Browse files
authored
Merge pull request #2 from mauricius/feature/laravel-10
Feature/laravel 10
2 parents ba673d5 + 44b6f0d commit ae4cec4

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

.github/workflows/run-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ jobs:
88
fail-fast: true
99
matrix:
1010
php: [8.0, 8.1, 8.2]
11-
laravel: [^8.80, 9.*]
11+
laravel: [^8.80, 9.*, 10.*]
1212
dependency-version: [prefer-lowest, prefer-stable]
1313
include:
14+
- laravel: 10.*
15+
testbench: 8.*
1416
- laravel: 9.*
1517
testbench: 7.*
1618
- laravel: ^8.80
1719
testbench: 6.23
1820
exclude:
21+
- laravel: 10.*
22+
php: 8.0
1923
- laravel: ^8.80
2024
php: 8.2
2125

@@ -29,7 +33,6 @@ jobs:
2933
uses: shivammathur/setup-php@v2
3034
with:
3135
php-version: ${{ matrix.php }}
32-
extensions: dom, mbstring, libxml, pdo, sqlite, pdo_sqlite
3336
coverage: none
3437

3538
- name: Install dependencies

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Laravel integration for [htmx](https://htmx.org/).
44

55
[![Latest Version on Packagist](https://img.shields.io/packagist/v/mauricius/laravel-htmx.svg?style=flat-square)](https://packagist.org/packages/mauricius/laravel-htmx)
6-
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/mauricius/laravel-htmx/run-tests?label=tests)](https://github.com/mauricius/laravel-htmx/actions?query=workflow%3Arun-tests+branch%3Amaster)
6+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/mauricius/laravel-htmx/run-tests.yml?branch=master&label=tests)](https://github.com/mauricius/laravel-htmx/actions?query=workflow%3Arun-tests+branch%3Amaster)
77
[![Total Downloads](https://img.shields.io/packagist/dt/mauricius/laravel-htmx.svg?style=flat-square)](https://packagist.org/packages/mauricius/laravel-htmx)
88

99
Supported Laravel Versions >= v8.80.0.

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
],
1818
"require": {
1919
"php": "^8.0|^8.1|^8.2",
20-
"illuminate/contracts": "^8.80|^9.0"
20+
"illuminate/contracts": "^8.80|^9.0|^10.0"
2121
},
2222
"require-dev": {
23-
"nunomaduro/collision": "^5.0|^6.0",
24-
"orchestra/testbench": "^6.0|^7.0",
25-
"phpunit/phpunit": "^9.5",
23+
"nunomaduro/collision": "^5.0|^6.0|^7.0",
24+
"orchestra/testbench": "^6.0|^7.0|^8.0",
25+
"phpunit/phpunit": "^9.5|^10.0",
2626
"spatie/phpunit-snapshot-assertions": "^4.2"
2727
},
2828
"autoload": {
@@ -37,10 +37,11 @@
3737
},
3838
"scripts": {
3939
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
40-
"analyse": "vendor/bin/phpstan analyse",
4140
"test": "vendor/bin/phpunit",
42-
"test-coverage": "vendor/bin/phpunit --coverage",
43-
"format": "vendor/bin/pint"
41+
"test-coverage": "vendor/bin/phpunit --coverage"
42+
},
43+
"scripts-descriptions": {
44+
"test": "Runs phpunit to test the code."
4445
},
4546
"config": {
4647
"sort-packages": true

src/LaravelHtmxServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function boot()
3131
return BladeFragment::render($view, $fragment, $data);
3232
});
3333
}
34-
34+
3535
/**
3636
* Console-specific booting.
3737
*

tests/Http/HtmxResponseTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ public function the_response_should_trigger_a_client_side_event_by_setting_the_h
8383
/** @test */
8484
public function the_response_supports_triggering_multiple_events()
8585
{
86-
Route::get('test', fn () => with(new HtmxResponse())
86+
Route::get(
87+
'test',
88+
fn () => with(new HtmxResponse())
8789
->addTrigger('htmx:abort')
8890
->addTrigger('htmx:load')
8991
);
@@ -108,7 +110,9 @@ public function the_response_should_trigger_a_client_side_event_after_the_settli
108110
/** @test */
109111
public function the_response_supports_triggering_after_settle_multiple_events()
110112
{
111-
Route::get('test', fn () => with(new HtmxResponse())
113+
Route::get(
114+
'test',
115+
fn () => with(new HtmxResponse())
112116
->addTriggerAfterSettle('htmx:abort')
113117
->addTriggerAfterSettle('htmx:load')
114118
);
@@ -133,7 +137,9 @@ public function the_response_should_trigger_a_client_side_event_after_the_swap_s
133137
/** @test */
134138
public function the_response_supports_triggering_after_swap_multiple_multiple_events()
135139
{
136-
Route::get('test', fn () => with(new HtmxResponse())
140+
Route::get(
141+
'test',
142+
fn () => with(new HtmxResponse())
137143
->addTriggerAfterSwap('htmx:abort')
138144
->addTriggerAfterSwap('htmx:load')
139145
);

0 commit comments

Comments
 (0)