v3 Upgrade. MaxWidth not found
Hi everyone! I am updating my app. I have solved a lot of things so far, but I could not find a solution for the error "Class "App\Providers\Filament\MaxWidth" not found" when I want to use "->maxContentWidth(MaxWidth::Full)" on my AdminPanelProvider.php .
I attach my app information:
Environment
Application Name . Green Ambiental
Laravel Version . 10.0.0 PHP Version . 8.1.0 Composer Version . 2.6.6 Environment . local Debug Mode . ENABLED URL . 127.0.0.1:8000 Maintenance Mode . OFF Cache Config . NOT CACHED Events . NOT CACHED
Routes . NOT CACHED Views . NOT CACHED Drivers Broadcasting . log Cache . file Database . pgsql Logs . stack / single Mail . smtp Queue . sync Session . file Filament Packages . filament, forms, notifications, support, tables Version . v3.0.0
Views . NOT PUBLISHED Livewire Livewire . v3.0.0 Thanks in advance!
Laravel Version . 10.0.0 PHP Version . 8.1.0 Composer Version . 2.6.6 Environment . local Debug Mode . ENABLED URL . 127.0.0.1:8000 Maintenance Mode . OFF Cache Config . NOT CACHED Events . NOT CACHED
Routes . NOT CACHED Views . NOT CACHED Drivers Broadcasting . log Cache . file Database . pgsql Logs . stack / single Mail . smtp Queue . sync Session . file Filament Packages . filament, forms, notifications, support, tables Version . v3.0.0
Views . NOT PUBLISHED Livewire Livewire . v3.0.0 Thanks in advance!
25 Replies
Add
^3.0
in the composer.json
Filament and livewire
Laravel should also be ^10
minimum-stability: "stable"Also, you’re not importing the MaxWidth class.
I did your suggestions and still not working.
I could not import the class because is not present on vendor\filament\support\src\Enums
Environment
Application Name .. Green Ambiental
Laravel Version .. 10.37.3
PHP Version .. 8.1.0
Composer Version .. 2.6.6
Environment .. local
Debug Mode .. ENABLED
URL .. 127.0.0.1:8000
Maintenance Mode .. OFF
Cache Config .. NOT CACHED
Events .. NOT CACHED
Routes .. NOT CACHED
Views ... NOT CACHED
Drivers Broadcasting ... log Cache ... file Database ... pgsql Logs .. stack / single Mail ... smtp Queue ... sync Session ... file Filament Packages .. filament, forms, notifications, support, tables Version ... v3.0.0 Views .. NOT PUBLISHED Livewire Livewire ... v3.3.0
Laravel Version .. 10.37.3
PHP Version .. 8.1.0
Composer Version .. 2.6.6
Environment .. local
Debug Mode .. ENABLED
URL .. 127.0.0.1:8000
Maintenance Mode .. OFF
Cache Config .. NOT CACHED
Events .. NOT CACHED
Routes .. NOT CACHED
Views ... NOT CACHED
Drivers Broadcasting ... log Cache ... file Database ... pgsql Logs .. stack / single Mail ... smtp Queue ... sync Session ... file Filament Packages .. filament, forms, notifications, support, tables Version ... v3.0.0 Views .. NOT PUBLISHED Livewire Livewire ... v3.3.0
1) You need php 8.1+. So make sure you do that first
2) Change filament/filament to "3.0-stable"
Change the following dependencies
Try
composer update
I am running php 8.1 . I did your suggestion and could not import the needed class.
Your filament version of 3.0.0 is not correct. Please share your composer.json.
"filament/filament": "3.1-stable"
Should be “^3.0” or “^3.1”
I just changed to "filament/filament": "^3.0", then run "composer update" and the issue persists
No, I get the error "Class "Filament\Support\Enums\MaxWidth" not found"
Delete the vendor directory and try a clean composer install.
I have already tested it. It doesn't work either
php artisan about
what is the output?Environment
Application Name . Green Ambiental
Laravel Version . 10.37.3
PHP Version . 8.1.0
Composer Version . 2.6.6
Environment . local
Debug Mode . ENABLED
URL . 127.0.0.1:8000
Maintenance Mode . OFF
Cache
Config . NOT CACHED
Events . NOT CACHED
Routes . NOT CACHED
Views . NOT CACHED
Drivers Broadcasting . log Cache . file Database . pgsql Logs . stack / single Mail . smtp Queue . sync Session . file
Filament Packages . filament, forms, notifications, support, tables Version . v3.0.0 Views . NOT PUBLISHED Livewire Livewire . v3.3.0
Laravel Version . 10.37.3
PHP Version . 8.1.0
Composer Version . 2.6.6
Environment . local
Debug Mode . ENABLED
URL . 127.0.0.1:8000
Maintenance Mode . OFF
Cache
Config . NOT CACHED
Events . NOT CACHED
Routes . NOT CACHED
Views . NOT CACHED
Drivers Broadcasting . log Cache . file Database . pgsql Logs . stack / single Mail . smtp Queue . sync Session . file
Filament Packages . filament, forms, notifications, support, tables Version . v3.0.0 Views . NOT PUBLISHED Livewire Livewire . v3.3.0
delete the composer.lock, the vendor folder and run again
composer install
😦 The same. I still getting the error
please share your full composer.json in a gist. you're locked to v3.0.0 for some reason.
Solution
remove "filament/forms": "3.0",
it's included with filament/filament.
Yes sir!
It is working now!
Thank you so much for your support! @awcodes and @Leandro Ferreira