Skip to content

Commit 0c12ab8

Browse files
authored
Upgrade to Filament v4 (#6)
* Upgrade to Filament v4 * Fix styling * wip * Drop laravel 10 --------- Co-authored-by: Baspa <10845460+Baspa@users.noreply.github.com>
1 parent 007ebb9 commit 0c12ab8

3 files changed

Lines changed: 20 additions & 22 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest, windows-latest]
2020
php: [8.3, 8.2]
21-
laravel: [11.*, 10.*]
21+
laravel: [11.*]
2222
stability: [prefer-lowest, prefer-stable]
2323
include:
2424
- laravel: 11.*
2525
testbench: 9.*
2626
carbon: ^2.63
27-
- laravel: 10.*
28-
testbench: 8.*
29-
carbon: ^2.63
3027

3128
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3229

composer.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@
2323
"backstage/fields": "^0.5.0"
2424
},
2525
"require-dev": {
26+
"larastan/larastan": "^3.0",
2627
"laravel/pint": "^1.14",
27-
"nunomaduro/collision": "^8.1.1||^7.10.0",
28-
"larastan/larastan": "^2.9",
29-
"orchestra/testbench": "^9.0.0||^8.22.0",
30-
"pestphp/pest": "^2.34",
31-
"pestphp/pest-plugin-arch": "^2.7",
32-
"pestphp/pest-plugin-laravel": "^2.3",
33-
"phpstan/extension-installer": "^1.3",
34-
"phpstan/phpstan-deprecation-rules": "^1.1",
35-
"phpstan/phpstan-phpunit": "^1.3"
28+
"nunomaduro/collision": "^8.8.0",
29+
"orchestra/testbench": "^9.0|^10.0",
30+
"pestphp/pest": "^3.7",
31+
"pestphp/pest-plugin-arch": "^3.1.0",
32+
"pestphp/pest-plugin-laravel": "^3.0"
3633
},
3734
"autoload": {
3835
"psr-4": {
@@ -81,7 +78,7 @@
8178
}
8279
}
8380
},
84-
"minimum-stability": "dev",
81+
"minimum-stability": "beta",
8582
"prefer-stable": true,
8683
"repositories": {
8784
"fields": {

src/Uploadcare.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
use Backstage\Uploadcare\Enums\Style;
99
use Backstage\Uploadcare\Forms\Components\Uploadcare as Input;
1010
use Filament\Facades\Filament;
11-
use Filament\Forms;
11+
use Filament\Forms\Components\Select;
12+
use Filament\Forms\Components\Toggle;
13+
use Filament\Schemas\Components\Grid;
14+
use Filament\Schemas\Components\Tabs;
15+
use Filament\Schemas\Components\Tabs\Tab;
1216
use Illuminate\Database\Eloquent\Model;
1317
use Illuminate\Support\Facades\Auth;
1418

@@ -45,24 +49,24 @@ public static function make(string $name, Field $field): Input
4549
public function getForm(): array
4650
{
4751
return [
48-
Forms\Components\Tabs::make()
52+
Tabs::make()
4953
->schema([
50-
Forms\Components\Tabs\Tab::make('General')
54+
Tab::make('General')
5155
->label(__('General'))
5256
->schema([
5357
...parent::getForm(),
5458
]),
55-
Forms\Components\Tabs\Tab::make('Field specific')
59+
Tab::make('Field specific')
5660
->label(__('Field specific'))
5761
->schema([
58-
Forms\Components\Grid::make(2)->schema([
59-
Forms\Components\Toggle::make('config.multiple')
62+
Grid::make(2)->schema([
63+
Toggle::make('config.multiple')
6064
->label(__('Multiple'))
6165
->inline(false),
62-
Forms\Components\Toggle::make('config.imagesOnly')
66+
Toggle::make('config.imagesOnly')
6367
->label(__('Images only'))
6468
->inline(false),
65-
Forms\Components\Select::make('config.uploaderStyle')
69+
Select::make('config.uploaderStyle')
6670
->label(__('Uploader style'))
6771
->options([
6872
Style::INLINE->value => __('Inline'),

0 commit comments

Comments
 (0)