Skip to content

Commit 1362a57

Browse files
committed
Merge remote-tracking branch 'origin/main' into php8.5_support
2 parents c5c087e + 5efd97a commit 1362a57

File tree

5 files changed

+271
-89
lines changed

5 files changed

+271
-89
lines changed

.ai/fluxui-free/core.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
This is correct as of Boost installation, but there may be additional components within the codebase.
1717

1818
<available-flux-components>
19-
avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, profile, radio, select, separator, switch, text, textarea, tooltip
19+
avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, otp-input, profile, radio, select, separator, skeleton, switch, text, textarea, tooltip
2020
</available-flux-components>

.ai/fluxui-pro/core.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
This is correct as of Boost installation, but there may be additional components within the codebase.
1717

1818
<available-flux-components>
19-
accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, context, date-picker, dropdown, editor, field, heading, file upload, icon, input, modal, navbar, pagination, pillbox, popover, profile, radio, select, separator, switch, table, tabs, text, textarea, toast, tooltip
19+
accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, composer, context, date-picker, dropdown, editor, field, file-upload, heading, icon, input, kanban, modal, navbar, otp-input, pagination, pillbox, popover, profile, radio, select, separator, skeleton, slider, switch, table, tabs, text, textarea, time-picker, toast, tooltip
2020
</available-flux-components>

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/laravel/boost/compare/v1.8.1...main)
3+
## [Unreleased](https://github.com/laravel/boost/compare/v1.8.3...main)
4+
5+
## [v1.8.3](https://github.com/laravel/boost/compare/v1.8.2...v1.8.3) - 2025-11-26
6+
7+
### What's Changed
8+
9+
* Update FluxUI component list by [@rzv-me](https://github.com/rzv-me) in https://github.com/laravel/boost/pull/369
10+
11+
### New Contributors
12+
13+
* [@rzv-me](https://github.com/rzv-me) made their first contribution in https://github.com/laravel/boost/pull/369
14+
15+
**Full Changelog**: https://github.com/laravel/boost/compare/v1.8.2...v1.8.3
16+
17+
## [v1.8.2](https://github.com/laravel/boost/compare/v1.8.1...v1.8.2) - 2025-11-20
18+
19+
### What's Changed
20+
21+
* tests: adds missing opencode in tests by [@MrPunyapal](https://github.com/MrPunyapal) in https://github.com/laravel/boost/pull/361
22+
* Add Gemini by [@iruoy](https://github.com/iruoy) in https://github.com/laravel/boost/pull/360
23+
* Extend Codex functionality with MCP config by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/boost/pull/364
24+
* Update README.md by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/boost/pull/365
25+
* Downgrade guzzle version to ^7.9 by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/boost/pull/356
26+
* Put user-defined guidelines at the top by [@phpfour](https://github.com/phpfour) in https://github.com/laravel/boost/pull/332
27+
28+
### New Contributors
29+
30+
* [@iruoy](https://github.com/iruoy) made their first contribution in https://github.com/laravel/boost/pull/360
31+
32+
**Full Changelog**: https://github.com/laravel/boost/compare/v1.8.1...v1.8.2
433

534
## [v1.8.1](https://github.com/laravel/boost/compare/v1.8.0...v1.8.1) - 2025-11-18
635

src/Install/GuidelineComposer.php

Lines changed: 107 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Laravel\Boost\Support\Composer;
1111
use Laravel\Roster\Enums\Packages;
1212
use Laravel\Roster\Package;
13+
use Laravel\Roster\PackageCollection;
1314
use Laravel\Roster\Roster;
1415
use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
1516
use Symfony\Component\Finder\Finder;
@@ -113,106 +114,122 @@ public function guidelines(): Collection
113114
return $this->guidelines;
114115
}
115116

116-
return $this->guidelines = $this->find();
117+
$base = collect()
118+
->merge($this->getCoreGuidelines())
119+
->merge($this->getConditionalGuidelines())
120+
->merge($this->getPackageGuidelines())
121+
->merge($this->getThirdPartyGuidelines());
122+
123+
$basePaths = $base->pluck('path')->filter()->values();
124+
125+
$customGuidelines = $this->getUserGuidelines()
126+
->reject(fn ($guideline): bool => $basePaths->contains($guideline['path']));
127+
128+
return $this->guidelines = $customGuidelines
129+
->merge($base)
130+
->filter(fn ($guideline): bool => filled($guideline['content']));
117131
}
118132

119133
/**
120-
* Key is the 'guideline key' and value is the rendered blade.
121-
*
122-
* @return \Illuminate\Support\Collection<string, array>
134+
* @return Collection<string, array>
123135
*/
124-
protected function find(): Collection
136+
protected function getUserGuidelines(): Collection
125137
{
126-
$guidelines = collect();
127-
$guidelines->put('foundation', $this->guideline('foundation'));
128-
$guidelines->put('boost', $this->guideline('boost/core'));
129-
$guidelines->put('php', $this->guideline('php/core'));
130-
131-
// TODO: AI-48: Use composer target version, not PHP version. Production could be 8.1, but local is 8.4
132-
// $phpMajorMinor = PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;
133-
// $guidelines->put('php/v'.$phpMajorMinor, $this->guidelinesDir('php/'.$phpMajorMinor));
134-
135-
if (str_contains((string) config('app.url'), '.test') && $this->herd->isInstalled() && ! $this->config->usesSail) {
136-
$guidelines->put('herd', $this->guideline('herd/core'));
137-
}
138-
139-
if ($this->config->usesSail) {
140-
$guidelines->put('sail', $this->guideline('sail/core'));
141-
}
142-
143-
if ($this->config->laravelStyle) {
144-
$guidelines->put('laravel/style', $this->guideline('laravel/style'));
145-
}
146-
147-
if ($this->config->hasAnApi) {
148-
$guidelines->put('laravel/api', $this->guideline('laravel/api'));
149-
}
138+
return collect($this->guidelinesDir($this->customGuidelinePath()))
139+
->mapWithKeys(fn ($guideline): array => ['.ai/'.$guideline['name'] => $guideline]);
140+
}
150141

151-
if ($this->config->caresAboutLocalization) {
152-
$guidelines->put('laravel/localization', $this->guideline('laravel/localization'));
153-
// In future, if using NextJS localization/etc.. then have a diff. rule here
154-
}
142+
/**
143+
* @return Collection<string, array>
144+
*/
145+
protected function getCoreGuidelines(): Collection
146+
{
147+
return collect([
148+
'foundation' => $this->guideline('foundation'),
149+
'boost' => $this->guideline('boost/core'),
150+
'php' => $this->guideline('php/core'),
151+
]);
152+
}
155153

156-
// Add all core and version specific docs for Roster supported packages
157-
// We don't add guidelines for packages unsupported by Roster right now
158-
foreach ($this->roster->packages() as $package) {
159-
// Skip packages that should be excluded due to priority rules
160-
if ($this->shouldExcludePackage($package)) {
161-
continue;
162-
}
154+
/**
155+
* @return Collection<string, array>
156+
*/
157+
protected function getConditionalGuidelines(): Collection
158+
{
159+
return collect([
160+
'herd' => [
161+
'condition' => str_contains((string) config('app.url'), '.test') && $this->herd->isInstalled() && ! $this->config->usesSail,
162+
'path' => 'herd/core',
163+
],
164+
'sail' => [
165+
'condition' => $this->config->usesSail,
166+
'path' => 'sail/core',
167+
],
168+
'laravel/style' => [
169+
'condition' => $this->config->laravelStyle,
170+
'path' => 'laravel/style',
171+
],
172+
'laravel/api' => [
173+
'condition' => $this->config->hasAnApi,
174+
'path' => 'laravel/api',
175+
],
176+
'laravel/localization' => [
177+
'condition' => $this->config->caresAboutLocalization,
178+
'path' => 'laravel/localization',
179+
],
180+
'tests' => [
181+
'condition' => $this->config->enforceTests,
182+
'path' => 'enforce-tests',
183+
],
184+
])
185+
->filter(fn ($config): bool => $config['condition'])
186+
->mapWithKeys(fn ($config, $key): array => [$key => $this->guideline($config['path'])]);
187+
}
163188

164-
$guidelineDir = str_replace('_', '-', strtolower($package->name()));
165-
166-
$guidelines->put(
167-
$guidelineDir.'/core',
168-
$this->guideline($guidelineDir.'/core')
169-
); // Always add package core
170-
$packageGuidelines = $this->guidelinesDir($guidelineDir.'/'.$package->majorVersion());
171-
foreach ($packageGuidelines as $guideline) {
172-
$suffix = $guideline['name'] === 'core' ? '' : '/'.$guideline['name'];
173-
$guidelines->put(
174-
$guidelineDir.'/v'.$package->majorVersion().$suffix,
175-
$guideline
176-
);
177-
}
178-
}
189+
protected function getPackageGuidelines(): PackageCollection
190+
{
191+
return $this->roster->packages()
192+
->reject(fn (Package $package): bool => $this->shouldExcludePackage($package))
193+
->flatMap(function ($package): Collection {
194+
$guidelineDir = str_replace('_', '-', strtolower($package->name()));
195+
$guidelines = collect([$guidelineDir.'/core' => $this->guideline($guidelineDir.'/core')]);
196+
$packageGuidelines = $this->guidelinesDir($guidelineDir.'/'.$package->majorVersion());
179197

180-
if ($this->config->enforceTests) {
181-
$guidelines->put('tests', $this->guideline('enforce-tests'));
182-
}
198+
foreach ($packageGuidelines as $guideline) {
199+
$suffix = $guideline['name'] === 'core' ? '' : '/'.$guideline['name'];
183200

184-
$userGuidelines = $this->guidelinesDir($this->customGuidelinePath());
185-
$pathsUsed = $guidelines->pluck('path');
201+
$guidelines->put(
202+
$guidelineDir.'/v'.$package->majorVersion().$suffix,
203+
$guideline
204+
);
205+
}
186206

187-
foreach ($userGuidelines as $guideline) {
188-
if ($pathsUsed->contains($guideline['path'])) {
189-
continue; // Don't include this twice if it's an override
190-
}
207+
return $guidelines;
208+
});
209+
}
191210

192-
$guidelines->put('.ai/'.$guideline['name'], $guideline);
193-
}
211+
/**
212+
* @return Collection<string, array>
213+
*/
214+
protected function getThirdPartyGuidelines(): Collection
215+
{
216+
$guidelines = collect();
194217

195218
collect(Composer::packagesDirectoriesWithBoostGuidelines())
196219
->each(function (string $path, string $package) use ($guidelines): void {
197220
$packageGuidelines = $this->guidelinesDir($path, true);
198-
$pathsUsed = $guidelines->pluck('path');
199221

200222
foreach ($packageGuidelines as $guideline) {
201-
if ($pathsUsed->contains($guideline['path'])) {
202-
continue; // Don't include this twice if it's an override
203-
}
204-
205223
$guidelines->put($package, $guideline);
206224
}
207-
})->when(
208-
isset($this->config->aiGuidelines),
209-
fn (Collection $collection): Collection => $collection->filter(
210-
fn (string $name): bool => in_array($name, $this->config->aiGuidelines, true),
211-
)
212-
);
213-
214-
return $guidelines
215-
->where(fn (array $guideline): bool => ! empty(trim((string) $guideline['content'])));
225+
});
226+
227+
return $guidelines->when(
228+
isset($this->config->aiGuidelines),
229+
fn (Collection $collection): Collection => $collection->filter(
230+
fn (mixed $guideline, string $name): bool => in_array($name, $this->config->aiGuidelines, true),
231+
)
232+
);
216233
}
217234

218235
/**
@@ -236,7 +253,7 @@ protected function shouldExcludePackage(Package $package): bool
236253
}
237254

238255
/**
239-
* @return array<array{content: string, name: string, path: ?string, custom: bool}>
256+
* @return array<array{content: string, name: string, description: string, path: ?string, custom: bool, third_party: bool}>
240257
*/
241258
protected function guidelinesDir(string $dirPath, bool $thirdParty = false): array
242259
{
@@ -254,7 +271,9 @@ protected function guidelinesDir(string $dirPath, bool $thirdParty = false): arr
254271
return [];
255272
}
256273

257-
return array_map(fn (SplFileInfo $file): array => $this->guideline($file->getRealPath(), $thirdParty), iterator_to_array($finder));
274+
return collect($finder)
275+
->map(fn (SplFileInfo $file): array => $this->guideline($file->getRealPath(), $thirdParty))
276+
->all();
258277
}
259278

260279
protected function renderContent(string $content, string $path): string
@@ -312,7 +331,7 @@ protected function guideline(string $path, bool $thirdParty = false): array
312331
->after('# ')
313332
->before("\n")
314333
->trim()
315-
->limit(50, '...')
334+
->limit(50)
316335
->whenEmpty(fn () => Str::of('No description provided'))
317336
->value();
318337

@@ -387,7 +406,11 @@ protected function guidelinePath(string $path): ?string
387406

388407
// The path is not a custom guideline, check if the user has an override for this
389408
$basePath = realpath(__DIR__.'/../../');
390-
$relativePath = ltrim(str_replace([$basePath, '.ai'.DIRECTORY_SEPARATOR, '.ai/'], '', $path), '/\\');
409+
$relativePath = Str::of($path)
410+
->replace([$basePath, '.ai'.DIRECTORY_SEPARATOR, '.ai/'], '')
411+
->ltrim('/\\')
412+
->toString();
413+
391414
$customPath = $this->prependUserGuidelinePath($relativePath);
392415

393416
return file_exists($customPath) ? $customPath : $path;

0 commit comments

Comments
 (0)