Skip to content

Commit 2053b41

Browse files
authored
Migrate to Filament v5 (#260)
* Update dependencies for Filament v5 * Update dependencies for Filament v5 * Migrate to Filament V5
1 parent b919044 commit 2053b41

File tree

5 files changed

+57
-30
lines changed

5 files changed

+57
-30
lines changed

.devcontainer/devcontainer.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/php:8.2",
3-
"forwardPorts": [
4-
8000,
5-
5173,
6-
9000,
7-
9003
8-
],
9-
"remoteEnv": {
10-
"COMPOSER_MEMORY_LIMIT": "-1",
11-
"COMPOSER_PROCESS_TIMEOUT": "0"
12-
},
13-
"features": {
14-
"ghcr.io/devcontainers/features/node:1": {}
15-
}
2+
"image": "mcr.microsoft.com/devcontainers/php:8.3",
3+
"forwardPorts": [
4+
8000,
5+
5173,
6+
9000,
7+
9003
8+
],
9+
"remoteEnv": {
10+
"COMPOSER_MEMORY_LIMIT": "-1",
11+
"COMPOSER_PROCESS_TIMEOUT": "0",
12+
"PHPUNIT_TELEMETRY": "off"
13+
},
14+
"features": {
15+
"ghcr.io/devcontainers/features/node:1": {}
16+
}
1617
}

README.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
<img alt="fabricator banner" src="https://raw.githubusercontent.com/z3d0x/filament-fabricator/2.x/art/banner.jpg" />
88
</p>
99

10-
***What is Filament Fabricator?*** Filament Fabricator is simply said a block-based page builder skeleton. Filament Fabricator takes care of the PageResource & frontend routing, so you can focus on what really matters: your [Layouts](https://filamentphp.com/plugins/z3d0x-fabricator#layouts) & [Page Blocks](https://filamentphp.com/plugins/z3d0x-fabricator#page-blocks).
10+
**_What is Filament Fabricator?_** Filament Fabricator is simply said a block-based page builder skeleton. Filament Fabricator takes care of the PageResource & frontend routing, so you can focus on what really matters: your [Layouts](https://filamentphp.com/plugins/z3d0x-fabricator#layouts) & [Page Blocks](https://filamentphp.com/plugins/z3d0x-fabricator#page-blocks).
1111

1212
## Compatibility
13-
| Fabricator | Filament | PHP |
14-
|------|----------|--------|
15-
| [1.x](https://github.com/z3d0x/filament-fabricator/tree/1.x) | ^2.0 | ^8.0 |
16-
| [2.x](https://github.com/z3d0x/filament-fabricator/tree/2.x) | ^3.0 | ^8.1 |
17-
| [3.x](https://github.com/z3d0x/filament-fabricator/tree/3.x) | ^4.0 | ^8.2 |
13+
14+
| Fabricator | Filament | PHP |
15+
| ------------------------------------------------------------ | -------- | ---- |
16+
| [1.x](https://github.com/z3d0x/filament-fabricator/tree/1.x) | ^2.0 | ^8.0 |
17+
| [2.x](https://github.com/z3d0x/filament-fabricator/tree/2.x) | ^3.0 | ^8.1 |
18+
| [3.x](https://github.com/z3d0x/filament-fabricator/tree/3.x) | ^4.0 | ^8.2 |
19+
| [4.x](https://github.com/z3d0x/filament-fabricator/tree/4.x) | ^5.0 | ^8.3 |
1820

1921
## Installation
2022

@@ -24,8 +26,8 @@ You can install the package via composer:
2426
composer require z3d0x/filament-fabricator
2527
```
2628

27-
2829
After that run the install command:
30+
2931
```bash
3032
php artisan filament-fabricator:install
3133
```
@@ -65,20 +67,42 @@ Documentation can be viewed at: https://filamentphp.com/plugins/z3d0x-fabricator
6567

6668
## Migrate
6769

70+
### From 3.x to 4.x
71+
72+
- Relies on PHP 8.3 as the minimum version
73+
6874
### From 2.x to 3.x
6975

7076
- There is no longer a default value for the `pages.layout` database column
7177
- `FilamentFabricatorManager#getPageUrlFromId` no longer has a `prefixSlash` parameter
78+
- Relies on PHP 8.2 as the minimum version
79+
80+
### From Filament v4 to Filament v5
81+
82+
Following [the upgrade guide from Filament](https://filamentphp.com/docs/5.x/upgrade-guide) should be enough.
83+
84+
In case it isn't, you can run the following commands:
85+
86+
```bash
87+
composer require filament/upgrade:"^5.0" -W --dev
88+
89+
./vendor/bin/filament-v5
90+
91+
# Run the commands output by the upgrade script, they are unique to your app
92+
composer require filament/filament:"^5.0" z3d0x/filament-fabricator:"^5.0" -W --no-update
93+
composer update
94+
```
7295

7396
### From Filament v3 to Filament v4
7497

7598
Following [the upgrade guide from Filament](https://filamentphp.com/docs/4.x/upgrade-guide) should be enough.
7699

77100
In case it isn't, you can run the following commands:
101+
78102
```bash
79103
composer require filament/upgrade:"^4.0" -W --dev
80104

81-
vendor/bin/filament-v4
105+
./vendor/bin/filament-v4
82106

83107
# Run the commands output by the upgrade script, they are unique to your app
84108
composer require filament/filament:"^4.0" z3d0x/filament-fabricator:"^4.0" -W --no-update

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.2",
20-
"filament/filament": "^4.0",
19+
"php": "^8.3",
20+
"filament/filament": "^5.0",
2121
"illuminate/contracts": "^11.0 | ^12.0",
22-
"pboivin/filament-peek": "^3.0",
22+
"livewire/livewire": "^4.0",
23+
"pboivin/filament-peek": "^4.0",
2324
"spatie/laravel-package-tools": "^1.13.5"
2425
},
2526
"require-dev": {
2627
"driftingly/rector-laravel": "^2.0",
27-
"filament/upgrade": "^4.0",
28+
"filament/upgrade": "^5.0",
2829
"larastan/larastan": "^2.9 | ^3.7",
2930
"laravel/pint": "^1.24",
3031
"nunomaduro/collision": "^8.0",
3132
"orchestra/testbench": "^10.0",
32-
"pestphp/pest": "^3.0",
33-
"pestphp/pest-plugin-laravel": "^3.1",
34-
"pestphp/pest-plugin-livewire": "^3.0",
33+
"pestphp/pest": "^4.0",
34+
"pestphp/pest-plugin-laravel": "^4.0",
35+
"pestphp/pest-plugin-livewire": "^4.0",
3536
"phpstan/phpstan-deprecation-rules": "^2.0",
3637
"phpstan/phpstan-phpunit": "^2.0",
3738
"rector/rector": "^2.1",

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
>
2222
<php>
2323
<env name="APP_KEY" value="base64:+1JX1LrX2QMk/Gaxv5r89uiy9JWOMKSKhUlwVrJL1A8="/>
24+
<env name="PHPUNIT_TELEMETRY" value="off"/>
2425
</php>
2526
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
2627
<include>

tests/Commands/ClearRoutesCacheCommand.test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
describe(ClearRoutesCacheCommand::class, function () {
1212
beforeEach(function () {
13-
Config::set('filament-fabricator.routing.prefix', null);
13+
Config::set('filament-fabricator.routing.prefix');
1414
});
1515

1616
it('can be resolved through the container', function () {

0 commit comments

Comments
 (0)