Skip to content

Commit 85deabb

Browse files
authored
Merge branch 'main' into patch-1
2 parents 95ebbed + b48044b commit 85deabb

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/laravel/boost/compare/v1.0.2...main)
3+
## [Unreleased](https://github.com/laravel/boost/compare/v1.0.3...main)
4+
5+
## [v1.0.3](https://github.com/laravel/boost/compare/v1.0.2...v1.0.3) - 2025-08-13
6+
7+
### What's Changed
8+
9+
* Update Pint Guideline to Use `--dirty` Flag by [@yitzwillroth](https://github.com/yitzwillroth) in https://github.com/laravel/boost/pull/43
10+
* docs: README: add filament by [@ashleyhindle](https://github.com/ashleyhindle) in https://github.com/laravel/boost/pull/58
11+
* Fix Herd detection by [@mpociot](https://github.com/mpociot) in https://github.com/laravel/boost/pull/61
12+
* fix #49: disable boost inject if HTML isn't expected by [@ashleyhindle](https://github.com/ashleyhindle) in https://github.com/laravel/boost/pull/60
13+
14+
### New Contributors
15+
16+
* [@yitzwillroth](https://github.com/yitzwillroth) made their first contribution in https://github.com/laravel/boost/pull/43
17+
* [@mpociot](https://github.com/mpociot) made their first contribution in https://github.com/laravel/boost/pull/61
18+
19+
**Full Changelog**: https://github.com/laravel/boost/compare/v1.0.2...v1.0.3
420

521
## [v1.0.2](https://github.com/laravel/boost/compare/v1.0.1...v1.0.2) - 2025-08-13
622

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Laravel Boost includes AI guidelines for the following packages and frameworks.
6464
| Core & Boost | core |
6565
| Laravel Framework | core, 10.x, 11.x, 12.x |
6666
| Livewire | core, 2.x, 3.x |
67+
| Filament | core, 4.x |
6768
| Flux UI | core, free, pro |
6869
| Herd | core |
6970
| Inertia Laravel | core, 1.x, 2.x |
@@ -83,6 +84,7 @@ Laravel Boost includes AI guidelines for the following packages and frameworks.
8384
| Package | Versions Supported |
8485
|---------|-------------------|
8586
| Laravel Framework | 10.x, 11.x, 12.x |
87+
| Filament | 2.x, 3.x, 4.x |
8688
| Flux UI | 2.x Free, 2.x Pro |
8789
| Inertia | 1.x, 2.x |
8890
| Livewire | 1.x, 2.x, 3.x |

src/Install/Herd.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Herd
1010
{
1111
public function isInstalled(): bool
1212
{
13-
if ($this->isWindowsPlatform()) {
13+
if (! $this->isWindowsPlatform()) {
1414
return file_exists('/Applications/Herd.app/Contents/MacOS/Herd');
1515
}
1616

src/Middleware/InjectBoost.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function handle(Request $request, Closure $next): Response
1717
/** @var \Symfony\Component\HttpFoundation\Response $response */
1818
$response = $next($request);
1919

20-
if ($this->shouldInject($response->getContent())) {
20+
if ($this->shouldInject($response)) {
2121
$originalView = $response->original ?? null;
2222
$injectedContent = $this->injectScript($response->getContent());
2323
$response->setContent($injectedContent);
@@ -30,8 +30,13 @@ public function handle(Request $request, Closure $next): Response
3030
return $response;
3131
}
3232

33-
private function shouldInject(string $content): bool
33+
private function shouldInject(Response $response): bool
3434
{
35+
if (str_contains($response->headers->get('content-type', ''), 'html') === false) {
36+
return false;
37+
}
38+
39+
$content = $response->getContent();
3540
// Check if it's HTML
3641
if (! str_contains($content, '<html') && ! str_contains($content, '<head')) {
3742
return false;

tests/Feature/Mcp/Tools/BrowserLogsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
HTML;
209209

210210
$request = Request::create('/');
211-
$response = new \Illuminate\Http\Response($html);
211+
$response = new \Illuminate\Http\Response($html, 200, ['Content-Type' => 'text/html']);
212212

213213
$result = $middleware->handle($request, function ($req) use ($response) {
214214
return $response;
@@ -277,7 +277,7 @@
277277
HTML;
278278

279279
$request = Request::create('/');
280-
$response = new \Illuminate\Http\Response($html);
280+
$response = new \Illuminate\Http\Response($html, 200, ['Content-Type' => 'text/html']);
281281

282282
$result = $middleware->handle($request, function ($req) use ($response) {
283283
return $response;

0 commit comments

Comments
 (0)