Skip to content

Commit

Permalink
Merge pull request #2 from mauricius/feature/laravel-10
Browse files Browse the repository at this point in the history
Feature/laravel 10
  • Loading branch information
mauricius authored Mar 25, 2023
2 parents ba673d5 + 44b6f0d commit ae4cec4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ jobs:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2]
laravel: [^8.80, 9.*]
laravel: [^8.80, 9.*, 10.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: ^8.80
testbench: 6.23
exclude:
- laravel: 10.*
php: 8.0
- laravel: ^8.80
php: 8.2

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

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Laravel integration for [htmx](https://htmx.org/).

[![Latest Version on Packagist](https://img.shields.io/packagist/v/mauricius/laravel-htmx.svg?style=flat-square)](https://packagist.org/packages/mauricius/laravel-htmx)
[![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)
[![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)
[![Total Downloads](https://img.shields.io/packagist/dt/mauricius/laravel-htmx.svg?style=flat-square)](https://packagist.org/packages/mauricius/laravel-htmx)

Supported Laravel Versions >= v8.80.0.
Expand Down
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
],
"require": {
"php": "^8.0|^8.1|^8.2",
"illuminate/contracts": "^8.80|^9.0"
"illuminate/contracts": "^8.80|^9.0|^10.0"
},
"require-dev": {
"nunomaduro/collision": "^5.0|^6.0",
"orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.5",
"nunomaduro/collision": "^5.0|^6.0|^7.0",
"orchestra/testbench": "^6.0|^7.0|^8.0",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/phpunit-snapshot-assertions": "^4.2"
},
"autoload": {
Expand All @@ -37,10 +37,11 @@
},
"scripts": {
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage",
"format": "vendor/bin/pint"
"test-coverage": "vendor/bin/phpunit --coverage"
},
"scripts-descriptions": {
"test": "Runs phpunit to test the code."
},
"config": {
"sort-packages": true
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelHtmxServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function boot()
return BladeFragment::render($view, $fragment, $data);
});
}

/**
* Console-specific booting.
*
Expand Down
12 changes: 9 additions & 3 deletions tests/Http/HtmxResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public function the_response_should_trigger_a_client_side_event_by_setting_the_h
/** @test */
public function the_response_supports_triggering_multiple_events()
{
Route::get('test', fn () => with(new HtmxResponse())
Route::get(
'test',
fn () => with(new HtmxResponse())
->addTrigger('htmx:abort')
->addTrigger('htmx:load')
);
Expand All @@ -108,7 +110,9 @@ public function the_response_should_trigger_a_client_side_event_after_the_settli
/** @test */
public function the_response_supports_triggering_after_settle_multiple_events()
{
Route::get('test', fn () => with(new HtmxResponse())
Route::get(
'test',
fn () => with(new HtmxResponse())
->addTriggerAfterSettle('htmx:abort')
->addTriggerAfterSettle('htmx:load')
);
Expand All @@ -133,7 +137,9 @@ public function the_response_should_trigger_a_client_side_event_after_the_swap_s
/** @test */
public function the_response_supports_triggering_after_swap_multiple_multiple_events()
{
Route::get('test', fn () => with(new HtmxResponse())
Route::get(
'test',
fn () => with(new HtmxResponse())
->addTriggerAfterSwap('htmx:abort')
->addTriggerAfterSwap('htmx:load')
);
Expand Down

0 comments on commit ae4cec4

Please sign in to comment.