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:Jump to 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) .69 Replies
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.
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.
Please share your
composer.json "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 -WIs 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?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. Here is full json file
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/schemas - Packagist
Easily add beautiful UI to any Livewire component.
Yes, I also do not understand it
me too, composer said filament/filament v4.2.0 does not exist. But weeh i check in packagist repo it exist.
in my case it says filament/schemas v4.2.0 not found
That's so strange its' there clear as day... are you running it from your local computer?
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
Is this issue fixed?
still not able to upgrade
I'm also facing the same issue
meanwhile use version 4.1 and wait for next version, may be it works for V4.2.1
I copied your exact
composer.json and was able to install πYesterday i am installing filament for my new project it installing v4.1.10 not v4.2.0
Maybe try clearing you cache:
composer clear-cacheI tried but not works still installing v4.1.10 and not able to update v4.2.0
Weird
I am using windows is there any issue with it?
Composer outdated shows the new version available but can't update
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
Only when using
^ via CLI. But when the version is right in your composer.json it shouldn't
Can you share your output?But for windows powershell, filament installation docs suggest to use ~ instead of ^
Yes. That's why I said: CLI.
Share your output and your
composer.jsoni did composer:clear-cache and create new laravel project and intall filament using composer require filament/filament:"~4.0" it install v4.1.10

Can you directly edit your
composer json and add: ^4.2.0 as Filament version and run composer install?

Can you run
composer install -vvv to get more details?composer install -vvv

Can you run it again with
--no-cache: composer install --no-cache -vvvsame error

This is so weird: It's even in the file: https://repo.packagist.org/p2/filament/schemas.json
Which composer version are you running?
composer version 2.8.11
I'm on the same version
When you open that file, does it include
4.2.0 ? https://repo.packagist.org/p2/filament/schemas.jsonyes it include 4.2.0
i try to install it in command prompt but still download v4.1.10

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 diagnoseok thanks for help
@Dennis Koch have you noticed v5.0.0-beta2 also not in the list?

Nope.
@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?
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
@Dan Harrin do you have any idea what could happen here?
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
I donβt know. Seems machine specific to me.
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
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
Does not include 4.2.0 anymore
I tried this on my windows 11 macine.,,idk if this could be the cause
It does for me π€
This is what I get:
Are you check with this link https://repo.packagist.org/p2/filament/schemas.json?
This link
for me versions 4.2.0 and 5.0.0-beta2 shown in the list but can't able to upgrade?
orange line is v4.2 installs, im not concerned about this tbh

open an issue with a repository if you want help
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.
Same issue i installed in newly created laravel project it installing v4.2.0 i think it's composer issue
Weirdly, it doesnt happen on v4.1.10
I think it's composer issue not a filament issue. Composer correctly goes to published filament package link but downloads the wrong cached file
What OS are you running composer update on?
Windows
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
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
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) .