Error in upgrading to version 4.2

I am getting this issue while upgrading to version 4.2 Problem 1 - Root composer.json requires filament/filament 4.2 -> satisfiable by filament/filament[v4.2.0]. - filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint. Problem 2 - Root composer.json requires bezhansalleh/filament-shield ^4.0 -> satisfiable by bezhansalleh/filament-shield[4.0.0, 4.0.1, 4.0.2]. - bezhansalleh/filament-shield[4.0.0, ..., 4.0.2] require filament/filament ^4.0 -> satisfiable by filament/filament[v4.2.0]. - filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Solution:
Problem Solved. It was composer problem. If you still facing this problem use composer self-update for composer update to version 2.9.1 (stable channel) .
Jump to solution
69 Replies
Joginder Sharma
Joginder SharmaOPβ€’3w ago
What AI says: The issue is that you've specified "filament/filament": "^4.2" in your composer.json, but Filament 4.2 requires filament/schemas v4.2.0 which isn't available yet. The solution is to use a more flexible version constraint.
toeknee
toekneeβ€’3w ago
I suspect you have configured a strict constraight if it's only finding schemas alpha/dev. run with -W and it should update it accordinly.
Dennis Koch
Dennis Kochβ€’3w ago
Please share your composer.json
Joginder Sharma
Joginder SharmaOPβ€’3w ago
"require": { "php": "^8.4", "bezhansalleh/filament-shield": "^4.0", "filament/filament": "^4.2", "guzzlehttp/guzzle": "^7.10", "laravel/framework": "^12", "laravel/sanctum": "^4", "laravel/tinker": "^2" }, "require-dev": { "fakerphp/faker": "^1.23", "laravel/boost": "^1.3", "laravel/pail": "^1.1", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.1", "phpunit/phpunit": "^12.0" } wher I used "filament/filament": "^4.0", it does not upgrade to v4.2, it only upgrade to 4.1 Same issue when I run composer update -W
Dennis Koch
Dennis Kochβ€’3w ago
Is it still the same error message? Because that one says, you are using filament/filament 4.2 not ^4.2 Can you send the rest of the file, too, please?
Joginder Sharma
Joginder SharmaOPβ€’3w ago
Ohh, I tried it with multiple combination Now it gives Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires filament/filament ^4.2 -> satisfiable by filament/filament[v4.2.0]. - filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint. Problem 2 - Root composer.json requires bezhansalleh/filament-shield ^4.0 -> satisfiable by bezhansalleh/filament-shield[4.0.0, 4.0.1, 4.0.2]. - bezhansalleh/filament-shield[4.0.0, ..., 4.0.2] require filament/filament ^4.0 -> satisfiable by filament/filament[v4.2.0]. - filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Joginder Sharma
Joginder SharmaOPβ€’3w ago
Here is full json file
Dennis Koch
Dennis Kochβ€’3w ago
That's really odd. This sounds like v4.2.0 for "schema" package does not exist, but I just checked on Packagist: https://packagist.org/packages/filament/schemas#v4.2.0
filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint
filament/filament v4.2.0 requires filament/schemas v4.2.0 -> found filament/schemas[v4.0.0-alpha1, ..., 4.x-dev, v5.0.0-beta1, 5.x-dev] but it does not match the constraint
filament/schemas - Packagist
Easily add beautiful UI to any Livewire component.
Joginder Sharma
Joginder SharmaOPβ€’3w ago
Yes, I also do not understand it
hallaz
hallazβ€’3w ago
me too, composer said filament/filament v4.2.0 does not exist. But weeh i check in packagist repo it exist.
Joginder Sharma
Joginder SharmaOPβ€’3w ago
in my case it says filament/schemas v4.2.0 not found
toeknee
toekneeβ€’3w ago
That's so strange its' there clear as day... are you running it from your local computer?
Joginder Sharma
Joginder SharmaOPβ€’3w ago
Yes, from local computer, I have not checked from server When I run composer update, it update other plugin to their lates version like spatie/laravel-permission (6.23.0) and laravel/boost (v1.7.0) but for Filament it only upgrade to V4.1 but not to V4.2, when I try to upgrade to V4.2 explicitly then it give error filament/schemas v4.2.0 not found
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
Is this issue fixed?
Joginder Sharma
Joginder SharmaOPβ€’2w ago
still not able to upgrade
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
I'm also facing the same issue
Joginder Sharma
Joginder SharmaOPβ€’2w ago
meanwhile use version 4.1 and wait for next version, may be it works for V4.2.1
Dennis Koch
Dennis Kochβ€’2w ago
I copied your exact composer.json and was able to install πŸ™ˆ
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
Yesterday i am installing filament for my new project it installing v4.1.10 not v4.2.0
Dennis Koch
Dennis Kochβ€’2w ago
Maybe try clearing you cache: composer clear-cache
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
I tried but not works still installing v4.1.10 and not able to update v4.2.0
Dennis Koch
Dennis Kochβ€’2w ago
Weird
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
I am using windows is there any issue with it? Composer outdated shows the new version available but can't update
Joginder Sharma
Joginder SharmaOPβ€’2w ago
I am also using Window 11, It looks like there is an issue with the OS or local environment. I am using window 11 with Laragon, I will check it with 4.2.1
Dennis Koch
Dennis Kochβ€’2w ago
Only when using ^ via CLI. But when the version is right in your composer.json it shouldn't Can you share your output?
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
But for windows powershell, filament installation docs suggest to use ~ instead of ^
Dennis Koch
Dennis Kochβ€’2w ago
Yes. That's why I said: CLI. Share your output and your composer.json
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
i did composer:clear-cache and create new laravel project and intall filament using composer require filament/filament:"~4.0" it install v4.1.10
No description
Dennis Koch
Dennis Kochβ€’2w ago
Can you directly edit your composer json and add: ^4.2.0 as Filament version and run composer install?
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
No description
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
No description
Dennis Koch
Dennis Kochβ€’2w ago
Can you run composer install -vvv to get more details?
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
composer install -vvv
No description
Dennis Koch
Dennis Kochβ€’2w ago
Can you run it again with --no-cache: composer install --no-cache -vvv
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
same error
No description
Dennis Koch
Dennis Kochβ€’2w ago
This is so weird: It's even in the file: https://repo.packagist.org/p2/filament/schemas.json Which composer version are you running?
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
composer version 2.8.11
Dennis Koch
Dennis Kochβ€’2w ago
I'm on the same version When you open that file, does it include 4.2.0 ? https://repo.packagist.org/p2/filament/schemas.json
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
yes it include 4.2.0
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
i try to install it in command prompt but still download v4.1.10
No description
Dennis Koch
Dennis Kochβ€’2w ago
Sorry. No Idea. At that point I'd open an issue on Composers GitHub, and add the output of composer install --no-cache -vvv and composer diagnose
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
ok thanks for help
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
@Dennis Koch have you noticed v5.0.0-beta2 also not in the list?
No description
Dennis Koch
Dennis Kochβ€’2w ago
Nope.
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
@Dennis Koch i upgraded the composer to new version 2.8.12. In the new composer version changelog they mentioned Fixed json schema issues with version validation (#12512) [https://github.com/composer/composer/pull/12512]. But still it install v4.1.10 and last onething the version v4.1.10 and v5.0.0-beta2 both were released on the same day, could you please resync the packages in pacakgist? Because i installed the packages separately, the filament/support package installed the latest version 4.2.0 but filament/schemas installed the v4.1.10. Could please verify that?
Luqman 4dmin
Luqman 4dminβ€’2w ago
I tried with fresh new laravel app but it still install the v4.1.10, also getting the same filament/schemas does not match constraint when tried to force update to v4.2.0
Dennis Koch
Dennis Kochβ€’2w ago
@Dan Harrin do you have any idea what could happen here?
Dan Harrin
Dan Harrinβ€’2w ago
no, I have apps that installed the versions correctly the lack of issue submitted with a reproduction is telling for me that this is an app-specific issue and not reproducible with a fresh repo
Dennis Koch
Dennis Kochβ€’2w ago
I don’t know. Seems machine specific to me.
Dan Harrin
Dan Harrinβ€’2w ago
yup anyone in this thread with the issue, try installing filament in a new laravel app, if you can reproduce it submit an issue but it doesnt seem productive to keep going round in circles debugging composer messages really
Vp
Vpβ€’2w ago
I use mac and ubuntu, new project or upgrading 4.0 to 4.2 I don't have any error/problem at all (if someone want proof πŸ˜† ).. just sayin
AkatsukiAri
AkatsukiAriβ€’2w ago
Does not include 4.2.0 anymore
Luqman 4dmin
Luqman 4dminβ€’2w ago
I tried this on my windows 11 macine.,,idk if this could be the cause
Dennis Koch
Dennis Kochβ€’2w ago
It does for me πŸ€”
AkatsukiAri
AkatsukiAriβ€’2w ago
This is what I get:
AkatsukiAri
AkatsukiAriβ€’2w ago
This link
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
for me versions 4.2.0 and 5.0.0-beta2 shown in the list but can't able to upgrade?
Dan Harrin
Dan Harrinβ€’2w ago
orange line is v4.2 installs, im not concerned about this tbh
No description
Dan Harrin
Dan Harrinβ€’2w ago
open an issue with a repository if you want help
Joginder Sharma
Joginder SharmaOPβ€’2w ago
After the release of v4.2.1, I am finally able to update to v4.2.0. It seems my system keeps me one version behind the latest release. I don't think it's specifically my project or a Filament issue; it seems more like a problem with my OS, environment, or Composer.
Parthiban Nagarajan
Parthiban Nagarajanβ€’2w ago
Same issue i installed in newly created laravel project it installing v4.2.0 i think it's composer issue
Luqman 4dmin
Luqman 4dminβ€’7d ago
Weirdly, it doesnt happen on v4.1.10
Parthiban Nagarajan
Parthiban Nagarajanβ€’7d ago
I think it's composer issue not a filament issue. Composer correctly goes to published filament package link but downloads the wrong cached file
toeknee
toekneeβ€’7d ago
What OS are you running composer update on?
Parthiban Nagarajan
Parthiban Nagarajanβ€’7d ago
Windows
toeknee
toekneeβ€’7d ago
I suspect that is your problem, most people in here are on Mac/Linux. Could be a scoping issue with micro versions as composer is quirky on windows anyway
Parthiban Nagarajan
Parthiban Nagarajanβ€’4d ago
It's not my problem. I think its composer issue now i upgrade the composer to latest version 2.9.1. Then i upgrade the existing filament project from v4.1.10 to v4.2.2 it works
Solution
Joginder Sharma
Joginder Sharmaβ€’2d ago
Problem Solved. It was composer problem. If you still facing this problem use composer self-update for composer update to version 2.9.1 (stable channel) .

Did you find this page helpful?