Skip to content

Commit c893fc7

Browse files
authored
Release v1.7.4 (alexjustesen#2408)
Co-authored-by: Alex Justesen <[email protected]>
1 parent c3aaaf5 commit c893fc7

File tree

6 files changed

+347
-508
lines changed

6 files changed

+347
-508
lines changed

.github/copilot-instructions.md

Lines changed: 15 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -113,110 +113,6 @@ protected function isAccessible(User $user, ?string $path = null): bool
113113
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
114114

115115

116-
=== filament/core rules ===
117-
118-
## Filament
119-
- Filament is used by this application, check how and where to follow existing application conventions.
120-
- Filament is a Server-Driven UI (SDUI) framework for Laravel. It allows developers to define user interfaces in PHP using structured configuration objects. It is built on top of Livewire, Alpine.js, and Tailwind CSS.
121-
- You can use the `search-docs` tool to get information from the official Filament documentation when needed. This is very useful for Artisan command arguments, specific code examples, testing functionality, relationship management, and ensuring you're following idiomatic practices.
122-
- Utilize static `make()` methods for consistent component initialization.
123-
124-
### Artisan
125-
- You must use the Filament specific Artisan commands to create new files or components for Filament. You can find these with the `list-artisan-commands` tool, or with `php artisan` and the `--help` option.
126-
- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable.
127-
128-
### Filament's Core Features
129-
- Actions: Handle doing something within the application, often with a button or link. Actions encapsulate the UI, the interactive modal window, and the logic that should be executed when the modal window is submitted. They can be used anywhere in the UI and are commonly used to perform one-time actions like deleting a record, sending an email, or updating data in the database based on modal form input.
130-
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
131-
- Infolists: Read-only lists of data.
132-
- Notifications: Flash notifications displayed to users within the application.
133-
- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets.
134-
- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`.
135-
- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists.
136-
- Tables: Interactive tables with filtering, sorting, pagination, and more.
137-
- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat.
138-
139-
### Relationships
140-
- Determine if you can use the `relationship()` method on form components when you need `options` for a select, checkbox, repeater, or when building a `Fieldset`:
141-
142-
<code-snippet name="Relationship example for Form Select" lang="php">
143-
Forms\Components\Select::make('user_id')
144-
->label('Author')
145-
->relationship('author')
146-
->required(),
147-
</code-snippet>
148-
149-
150-
## Testing
151-
- It's important to test Filament functionality for user satisfaction.
152-
- Ensure that you are authenticated to access the application within the test.
153-
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
154-
155-
### Example Tests
156-
157-
<code-snippet name="Filament Table Test" lang="php">
158-
livewire(ListUsers::class)
159-
->assertCanSeeTableRecords($users)
160-
->searchTable($users->first()->name)
161-
->assertCanSeeTableRecords($users->take(1))
162-
->assertCanNotSeeTableRecords($users->skip(1))
163-
->searchTable($users->last()->email)
164-
->assertCanSeeTableRecords($users->take(-1))
165-
->assertCanNotSeeTableRecords($users->take($users->count() - 1));
166-
</code-snippet>
167-
168-
<code-snippet name="Filament Create Resource Test" lang="php">
169-
livewire(CreateUser::class)
170-
->fillForm([
171-
'name' => 'Howdy',
172-
'email' => '[email protected]',
173-
])
174-
->call('create')
175-
->assertNotified()
176-
->assertRedirect();
177-
178-
assertDatabaseHas(User::class, [
179-
'name' => 'Howdy',
180-
'email' => '[email protected]',
181-
]);
182-
</code-snippet>
183-
184-
<code-snippet name="Testing Multiple Panels (setup())" lang="php">
185-
use Filament\Facades\Filament;
186-
187-
Filament::setCurrentPanel('app');
188-
</code-snippet>
189-
190-
<code-snippet name="Calling an Action in a Test" lang="php">
191-
livewire(EditInvoice::class, [
192-
'invoice' => $invoice,
193-
])->callAction('send');
194-
195-
expect($invoice->refresh())->isSent()->toBeTrue();
196-
</code-snippet>
197-
198-
199-
=== filament/v4 rules ===
200-
201-
## Filament 4
202-
203-
### Important Version 4 Changes
204-
- File visibility is now `private` by default.
205-
- The `deferFilters` method from Filament v3 is now the default behavior in Filament v4, so users must click a button before the filters are applied to the table. To disable this behavior, you can use the `deferFilters(false)` method.
206-
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
207-
- The `all` pagination page method is not available for tables by default.
208-
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
209-
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
210-
- A new `Repeater` component for Forms has been added.
211-
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.
212-
213-
### Organize Component Classes Structure
214-
- Schema components: `Schemas/Components/`
215-
- Table columns: `Tables/Columns/`
216-
- Table filters: `Tables/Filters/`
217-
- Actions: `Actions/`
218-
219-
220116
=== laravel/core rules ===
221117

222118
## Do Things the Laravel Way
@@ -461,6 +357,13 @@ it('has emails', function (string $email) {
461357
462358
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463359
- `corePlugins` is not supported in Tailwind v4.
360+
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
361+
<code-snippet name="Extending Theme in CSS" lang="css">
362+
@theme {
363+
--color-brand: oklch(0.72 0.11 178);
364+
}
365+
</code-snippet>
366+
464367
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
465368
466369
<code-snippet name="Tailwind v4 Import Tailwind Diff" lang="diff">
@@ -496,4 +399,12 @@ it('has emails', function (string $email) {
496399
497400
- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass.
498401
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.
402+
403+
404+
=== tightenco/duster rules ===
405+
406+
## Duster Code Formatter
407+
408+
- You must run `vendor/bin/duster fix --dirty` before finalizing changes to ensure your code matches the project's expected style.
409+
- Duster wraps Laravel Pint and other formatters, so never run Pint directly. Always prefer Duster for formatting tasks.
499410
</laravel-boost-guidelines>

CLAUDE.md

Lines changed: 15 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -113,110 +113,6 @@ protected function isAccessible(User $user, ?string $path = null): bool
113113
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
114114

115115

116-
=== filament/core rules ===
117-
118-
## Filament
119-
- Filament is used by this application, check how and where to follow existing application conventions.
120-
- Filament is a Server-Driven UI (SDUI) framework for Laravel. It allows developers to define user interfaces in PHP using structured configuration objects. It is built on top of Livewire, Alpine.js, and Tailwind CSS.
121-
- You can use the `search-docs` tool to get information from the official Filament documentation when needed. This is very useful for Artisan command arguments, specific code examples, testing functionality, relationship management, and ensuring you're following idiomatic practices.
122-
- Utilize static `make()` methods for consistent component initialization.
123-
124-
### Artisan
125-
- You must use the Filament specific Artisan commands to create new files or components for Filament. You can find these with the `list-artisan-commands` tool, or with `php artisan` and the `--help` option.
126-
- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable.
127-
128-
### Filament's Core Features
129-
- Actions: Handle doing something within the application, often with a button or link. Actions encapsulate the UI, the interactive modal window, and the logic that should be executed when the modal window is submitted. They can be used anywhere in the UI and are commonly used to perform one-time actions like deleting a record, sending an email, or updating data in the database based on modal form input.
130-
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
131-
- Infolists: Read-only lists of data.
132-
- Notifications: Flash notifications displayed to users within the application.
133-
- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets.
134-
- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`.
135-
- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists.
136-
- Tables: Interactive tables with filtering, sorting, pagination, and more.
137-
- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat.
138-
139-
### Relationships
140-
- Determine if you can use the `relationship()` method on form components when you need `options` for a select, checkbox, repeater, or when building a `Fieldset`:
141-
142-
<code-snippet name="Relationship example for Form Select" lang="php">
143-
Forms\Components\Select::make('user_id')
144-
->label('Author')
145-
->relationship('author')
146-
->required(),
147-
</code-snippet>
148-
149-
150-
## Testing
151-
- It's important to test Filament functionality for user satisfaction.
152-
- Ensure that you are authenticated to access the application within the test.
153-
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
154-
155-
### Example Tests
156-
157-
<code-snippet name="Filament Table Test" lang="php">
158-
livewire(ListUsers::class)
159-
->assertCanSeeTableRecords($users)
160-
->searchTable($users->first()->name)
161-
->assertCanSeeTableRecords($users->take(1))
162-
->assertCanNotSeeTableRecords($users->skip(1))
163-
->searchTable($users->last()->email)
164-
->assertCanSeeTableRecords($users->take(-1))
165-
->assertCanNotSeeTableRecords($users->take($users->count() - 1));
166-
</code-snippet>
167-
168-
<code-snippet name="Filament Create Resource Test" lang="php">
169-
livewire(CreateUser::class)
170-
->fillForm([
171-
'name' => 'Howdy',
172-
'email' => '[email protected]',
173-
])
174-
->call('create')
175-
->assertNotified()
176-
->assertRedirect();
177-
178-
assertDatabaseHas(User::class, [
179-
'name' => 'Howdy',
180-
'email' => '[email protected]',
181-
]);
182-
</code-snippet>
183-
184-
<code-snippet name="Testing Multiple Panels (setup())" lang="php">
185-
use Filament\Facades\Filament;
186-
187-
Filament::setCurrentPanel('app');
188-
</code-snippet>
189-
190-
<code-snippet name="Calling an Action in a Test" lang="php">
191-
livewire(EditInvoice::class, [
192-
'invoice' => $invoice,
193-
])->callAction('send');
194-
195-
expect($invoice->refresh())->isSent()->toBeTrue();
196-
</code-snippet>
197-
198-
199-
=== filament/v4 rules ===
200-
201-
## Filament 4
202-
203-
### Important Version 4 Changes
204-
- File visibility is now `private` by default.
205-
- The `deferFilters` method from Filament v3 is now the default behavior in Filament v4, so users must click a button before the filters are applied to the table. To disable this behavior, you can use the `deferFilters(false)` method.
206-
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
207-
- The `all` pagination page method is not available for tables by default.
208-
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
209-
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
210-
- A new `Repeater` component for Forms has been added.
211-
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.
212-
213-
### Organize Component Classes Structure
214-
- Schema components: `Schemas/Components/`
215-
- Table columns: `Tables/Columns/`
216-
- Table filters: `Tables/Filters/`
217-
- Actions: `Actions/`
218-
219-
220116
=== laravel/core rules ===
221117

222118
## Do Things the Laravel Way
@@ -461,6 +357,13 @@ it('has emails', function (string $email) {
461357
462358
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463359
- `corePlugins` is not supported in Tailwind v4.
360+
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
361+
<code-snippet name="Extending Theme in CSS" lang="css">
362+
@theme {
363+
--color-brand: oklch(0.72 0.11 178);
364+
}
365+
</code-snippet>
366+
464367
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
465368
466369
<code-snippet name="Tailwind v4 Import Tailwind Diff" lang="diff">
@@ -496,4 +399,12 @@ it('has emails', function (string $email) {
496399
497400
- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass.
498401
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.
402+
403+
404+
=== tightenco/duster rules ===
405+
406+
## Duster Code Formatter
407+
408+
- You must run `vendor/bin/duster fix --dirty` before finalizing changes to ensure your code matches the project's expected style.
409+
- Duster wraps Laravel Pint and other formatters, so never run Pint directly. Always prefer Duster for formatting tasks.
499410
</laravel-boost-guidelines>

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"geerlingguy/ping": "^1.2.1",
2323
"influxdata/influxdb-client-php": "^3.8",
2424
"laravel-notification-channels/telegram": "^6.0",
25-
"laravel/framework": "^12.37.0",
25+
"laravel/framework": "^12.38.1",
2626
"laravel/prompts": "^0.3.7",
2727
"laravel/sanctum": "^4.2.0",
2828
"livewire/livewire": "^3.6.4",
@@ -33,22 +33,22 @@
3333
"spatie/laravel-query-builder": "^6.3.6",
3434
"spatie/laravel-settings": "^3.5.0",
3535
"spatie/laravel-webhook-server": "^3.8.3",
36-
"zircote/swagger-php": "^5.5.2"
36+
"zircote/swagger-php": "^5.7.0"
3737
},
3838
"require-dev": {
3939
"fakerphp/faker": "^1.24.1",
40-
"laravel/boost": "^1.7",
40+
"laravel/boost": "^1.8",
4141
"laravel/pail": "^1.2.3",
4242
"laravel/pint": "^1.25.1",
43-
"laravel/sail": "^1.47.0",
43+
"laravel/sail": "^1.48.0",
4444
"laravel/telescope": "^5.15.0",
4545
"laravel/tinker": "^2.10.1",
4646
"mockery/mockery": "^1.6.12",
4747
"nunomaduro/collision": "^8.8.2",
4848
"pestphp/pest": "^3.8.4",
4949
"pestphp/pest-plugin-laravel": "^3.2",
5050
"spatie/laravel-ignition": "^2.9.1",
51-
"tightenco/duster": "^3.2.0"
51+
"tightenco/duster": "^3.3.0"
5252
},
5353
"autoload": {
5454
"files": [

0 commit comments

Comments
 (0)