Skip to content

Commit f11b815

Browse files
authored
Merge branch 'main' into replace_guidelines_from_vendor
2 parents d9ad12c + 12a0b57 commit f11b815

File tree

8 files changed

+60
-9
lines changed

8 files changed

+60
-9
lines changed

.ai/pint/core.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Laravel Pint Code Formatter
55

66
@if($assist->supportsPintAgentFormatter())
7-
- You must run `{{ $assist->binCommand('pint') }} --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style.
7+
- If you have modified any PHP files, you must run `{{ $assist->binCommand('pint') }} --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style.
88
- Do not run `{{ $assist->binCommand('pint') }} --test --format agent`, simply run `{{ $assist->binCommand('pint') }} --format agent` to fix any formatting issues.
99
@else
10-
- You must run `{{ $assist->binCommand('pint') }} --dirty` before finalizing changes to ensure your code matches the project's expected style.
10+
- If you have modified any PHP files, you must run `{{ $assist->binCommand('pint') }} --dirty` before finalizing changes to ensure your code matches the project's expected style.
1111
- Do not run `{{ $assist->binCommand('pint') }} --test`, simply run `{{ $assist->binCommand('pint') }}` to fix any formatting issues.
1212
@endif

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/laravel/boost/compare/v2.1.7...main)
3+
## [Unreleased](https://github.com/laravel/boost/compare/v2.1.8...main)
4+
5+
## [v2.1.8](https://github.com/laravel/boost/compare/v2.1.7...v2.1.8) - 2026-02-20
6+
7+
### What's Changed
8+
9+
* Fix read-only bypass in DatabaseQuery via CTE-wrapped writes by [@sulimanbenhalim](https://github.com/sulimanbenhalim) in https://github.com/laravel/boost/pull/588
10+
* Fix sendBeacon browser logs silently dropped on page unload by [@sulimanbenhalim](https://github.com/sulimanbenhalim) in https://github.com/laravel/boost/pull/590
11+
* Fix post-install Next steps URL by [@sulimanbenhalim](https://github.com/sulimanbenhalim) in https://github.com/laravel/boost/pull/587
12+
* Fix issue with Codex not automatically triggering the login flow by [@jessarcher](https://github.com/jessarcher) in https://github.com/laravel/boost/pull/592
13+
* Scope Pint guideline to PHP file changes only by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/boost/pull/593
14+
* Allow overriding the browser log channel by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/boost/pull/594
15+
16+
### New Contributors
17+
18+
* [@sulimanbenhalim](https://github.com/sulimanbenhalim) made their first contribution in https://github.com/laravel/boost/pull/588
19+
20+
**Full Changelog**: https://github.com/laravel/boost/compare/v2.1.7...v2.1.8
421

522
## [v2.1.7](https://github.com/laravel/boost/compare/v2.1.6...v2.1.7) - 2026-02-18
623

src/BoostServiceProvider.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ protected function registerRoutes(): void
117117
Route::post('/_boost/browser-logs', function (Request $request) {
118118
$logs = $request->input('logs', []);
119119

120+
// Handle sendBeacon's text/plain content type.
121+
if (empty($logs) && ! $request->isJson()) {
122+
$decoded = json_decode($request->getContent(), true);
123+
$logs = $decoded['logs'] ?? [];
124+
}
125+
120126
/** @var Logger $logger */
121127
$logger = Log::channel('browser');
122128

@@ -175,6 +181,10 @@ private static function buildLogMessageFromData(array $data): string
175181

176182
protected function registerBrowserLogger(): void
177183
{
184+
if (config('logging.channels.browser') !== null) {
185+
return;
186+
}
187+
178188
config([
179189
'logging.channels.browser' => [
180190
'driver' => 'single',

src/Console/InstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected function performInstallation(): void
136136

137137
protected function outro(): void
138138
{
139-
$url = 'https://boost.laravel.com/installed/';
139+
$url = 'https://laravel.com/docs/boost';
140140
$link = $this->hyperlink($url, $url);
141141
$text = 'Enjoy the boost 🚀 Next steps: ';
142142

src/Install/Agents/Codex.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function mcpConfigKey(): string
6666
public function httpMcpServerConfig(string $url): array
6767
{
6868
return [
69-
'url' => $url,
69+
'command' => 'npx',
70+
'args' => ['-y', 'mcp-remote', $url],
7071
];
7172
}
7273

src/Mcp/Tools/DatabaseQuery.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,14 @@ public function handle(Request $request): Response
6666
$isReadOnly = in_array($firstWord, $allowList, true);
6767

6868
// Additional validation for WITH … SELECT.
69-
if ($firstWord === 'WITH' && ! preg_match('/with\s+.*select\b/i', $query)) {
70-
$isReadOnly = false;
69+
if ($firstWord === 'WITH') {
70+
if (! preg_match('/\)\s*SELECT\b/i', $query)) {
71+
$isReadOnly = false;
72+
}
73+
74+
if (preg_match('/\)\s*(DELETE|UPDATE|INSERT|DROP|ALTER|TRUNCATE|REPLACE|RENAME|CREATE)\b/i', $query)) {
75+
$isReadOnly = false;
76+
}
7177
}
7278

7379
if (! $isReadOnly) {

tests/Feature/BoostServiceProviderTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@
3535
expect(app()->bound(Laravel\Roster\Roster::class))->toBeTrue()
3636
->and(config('logging.channels.browser'))->not->toBeNull();
3737
});
38+
39+
it('does not override an existing browser log channel', function (): void {
40+
Config::set('boost.enabled', true);
41+
Config::set('logging.channels.browser', [
42+
'driver' => 'daily',
43+
'path' => storage_path('logs/custom-browser.log'),
44+
]);
45+
app()->detectEnvironment(fn (): string => 'local');
46+
47+
$provider = new BoostServiceProvider(app());
48+
$provider->register();
49+
$provider->boot(app('router'));
50+
51+
expect(config('logging.channels.browser.driver'))->toBe('daily')
52+
->and(config('logging.channels.browser.path'))->toBe(storage_path('logs/custom-browser.log'));
53+
});
3854
});
3955

4056
describe('environment restrictions', function (): void {

tests/Unit/Install/Agents/CodexTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@
101101
expect($codex->skillsPath())->toBe('.agents/skills');
102102
});
103103

104-
test('httpMcpServerConfig returns url-only config', function (): void {
104+
test('httpMcpServerConfig returns npx mcp-remote config', function (): void {
105105
$codex = new Codex($this->strategyFactory);
106106

107107
expect($codex->httpMcpServerConfig('https://nightwatch.laravel.com/mcp'))->toBe([
108-
'url' => 'https://nightwatch.laravel.com/mcp',
108+
'command' => 'npx',
109+
'args' => ['-y', 'mcp-remote', 'https://nightwatch.laravel.com/mcp'],
109110
]);
110111
});
111112

0 commit comments

Comments
 (0)