Skip to content

Commit fa4a10c

Browse files
committed
Merge branch 'release/3.3.0'
2 parents 9591496 + 68ee44d commit fa4a10c

4 files changed

Lines changed: 41 additions & 29 deletions

File tree

.github/workflows/tests.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ jobs:
1818
strategy:
1919
fail-fast: true
2020
matrix:
21-
php: [ 8.2, 8.3, 8.4 ]
22-
core: [ '4.3.2', '5.2' ]
23-
laravel: [ 11, 12 ]
21+
php: [ 8.2, 8.3, 8.4, 8.5 ]
22+
laravel: [ 11, 12, 13 ]
2423
exclude:
25-
- laravel: 12
26-
core: '4.3.2'
24+
- php: 8.5
25+
laravel: 11
26+
- php: 8.2
27+
laravel: 13
2728

2829
steps:
2930
- name: Checkout Code
30-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3132

3233
- name: Setup PHP
3334
uses: shivammathur/setup-php@v2
@@ -38,14 +39,11 @@ jobs:
3839
coverage: none
3940
ini-values: error_reporting=E_ALL
4041

41-
- name: Set Laravel JSON:API Core Version
42-
run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update
43-
4442
- name: Set Laravel Version
4543
run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
4644

4745
- name: Install dependencies
48-
uses: nick-fields/retry@v3
46+
uses: nick-fields/retry@v4
4947
with:
5048
timeout_minutes: 5
5149
max_attempts: 5

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. This projec
55

66
## Unreleased
77

8+
## [3.3.0] - 2026-03-28
9+
10+
### Added
11+
12+
- Package now supports Laravel 13.
13+
14+
### Changed
15+
16+
- Dropped support for `laravel-json-api/core` v4.
17+
818
## [3.2.0] - 2025-02-24
919

1020
### Added

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@
1919
},
2020
{
2121
"name": "Christopher Gammie",
22-
"email": "contact@gammie.co.uk"
22+
"email": "chris@cloudcreativity.co.uk"
2323
}
2424
],
2525
"require": {
2626
"php": "^8.2",
2727
"ext-json": "*",
28-
"illuminate/contracts": "^11.0|^12.0",
29-
"illuminate/pipeline": "^11.0|^12.0",
30-
"laravel-json-api/core": "^4.3.2|^5.2",
31-
"laravel-json-api/validation": "^4.2"
28+
"illuminate/contracts": "^11.0|^12.0|^13.0",
29+
"illuminate/pipeline": "^11.0|^12.0|^13.0",
30+
"laravel-json-api/core": "^5.3",
31+
"laravel-json-api/validation": "^4.4"
3232
},
3333
"require-dev": {
34-
"laravel-json-api/testing": "^3.1",
35-
"orchestra/testbench": "^9.0|^10.0",
34+
"laravel-json-api/testing": "^3.2",
35+
"orchestra/testbench": "^9.0|^10.0|^11.0",
3636
"phpunit/phpunit": "^10.5|^11.5.3"
3737
},
3838
"autoload": {

tests/Integration/AcceptHeaderTest.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,13 @@ public function testAcceptsMiddlewareDoesNotMatch(): void
150150
->acceptsMiddleware('foo', 'bar')
151151
->renderable();
152152

153-
$this->get('/test', ['Accept' => '*/*'])
153+
$response = $this->get('/test', ['Accept' => '*/*']);
154+
155+
$response
154156
->assertStatus(418)
155-
->assertHeader('Content-Type', 'text/html; charset=UTF-8')
156157
->assertSee('teapot');
158+
159+
$this->assertSame('text/html; charset=utf-8', strtolower($response->headers->get('Content-Type')));
157160
}
158161

159162
/**
@@ -167,11 +170,7 @@ public function testAcceptsMiddlewareWhenRouteNotFound(): void
167170

168171
$response = $this->get('/blah', ['Accept' => '*/*']);
169172
$response->assertStatus(404)->assertSee('Not Found');
170-
171-
// @TODO remove once Laravel 8 is no longer supported (8 doesn't add the header)
172-
if (version_compare(Application::VERSION, '9.0.0') >= 0) {
173-
$response->assertHeader('Content-Type', 'text/html; charset=UTF-8');
174-
}
173+
$this->assertSame('text/html; charset=utf-8', strtolower($response->headers->get('Content-Type')));
175174
}
176175

177176
public function testAcceptsMiddlewareWhenRouteNotFoundWithJsonApiMediaType(): void
@@ -223,10 +222,12 @@ public function testAcceptFalse(): void
223222
->accept(fn(\Throwable $ex, Request $request) => false)
224223
->renderable();
225224

226-
$this->get('/test', ['Accept' => '*/*'])
227-
->assertStatus(418)
228-
->assertHeader('Content-Type', 'text/html; charset=UTF-8')
225+
$response = $this->get('/test', ['Accept' => '*/*']);
226+
227+
$response->assertStatus(418)
229228
->assertSee('teapot');
229+
230+
$this->assertSame('text/html; charset=utf-8', strtolower($response->headers->get('Content-Type')));
230231
}
231232

232233
public function testAcceptFalseWithJsonApiAcceptHeader(): void
@@ -279,9 +280,12 @@ public function testMultipleAcceptCallbacks2(): void
279280

280281
public function testHtml(): void
281282
{
282-
$this->get('/test', ['Accept' => '*/*'])
283+
$response = $this->get('/test', ['Accept' => '*/*']);
284+
285+
$response
283286
->assertStatus(418)
284-
->assertHeader('Content-Type', 'text/html; charset=UTF-8')
285287
->assertSee('teapot');
288+
289+
$this->assertSame('text/html; charset=utf-8', strtolower($response->headers->get('Content-Type')));
286290
}
287291
}

0 commit comments

Comments
 (0)