Package Conflict Error #2628
-
i installed a fresh laravel application (Laravel Framework 10.24.0) using PHP 8.2.10, PS C:\Users\007\Desktop\new-api-todo> composer require mongodb/laravel-mongodb
./composer.json has been updated
Running composer update mongodb/laravel-mongodb
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mongodb/laravel-mongodb[v1.0.0, ..., v1.0.8] require illuminate/support 4.0.x -> found illuminate/support[v4.0.0, ..., v4.0.10] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v1.1.0, ..., v1.3.2] require illuminate/support 4.1.* -> found illuminate/support[v4.1.0, ..., v4.1.30] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v1.4.0, ..., v1.4.3, v2.0.0, ..., v2.0.5] require illuminate/support 4.2.* -> found illuminate/support[v4.2.1, ..., v4.2.17] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v2.1.0, ..., v2.1.5] require illuminate/support 5.0.* -> found illuminate/support[v5.0.0, ..., v5.0.33] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v2.1.6, ..., v2.1.9] require illuminate/support ^5.0 -> found illuminate/support[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v2.2.0, ..., v2.3.5, v3.0.0, ..., v3.2.3] require illuminate/support ^5.1 -> found illuminate/support[v5.1.1, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v2.2.7, ..., v2.2.10] require illuminate/support ~5.1.0 -> found illuminate/support[v5.1.1, ..., v5.1.41] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.3.0, ..., v3.3.2] require illuminate/support ^5.5 -> found illuminate/support[v5.5.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.4.0, ..., v3.5.0] require illuminate/support ^5.6 -> found illuminate/support[v5.6.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.5.1, ..., v3.5.3] require illuminate/support ^5.8 -> found illuminate/support[v5.8.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.6.0, ..., v3.6.8] require illuminate/support ^5.8|^6.0 -> found illuminate/support[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.7.0, ..., v3.7.3] require illuminate/support ^7.0 -> found illuminate/support[v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.8.0, ..., v3.8.5] require illuminate/support ^8.0 -> found illuminate/support[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- mongodb/laravel-mongodb[v3.9.0, ..., v3.9.5] require illuminate/support ^9.0 -> found illuminate/support[v9.0.0, ..., v9.52.15] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires mongodb/laravel-mongodb * -> satisfiable by mongodb/laravel-mongodb[v1.0.0, ..., v1.4.3, v2.0.0, ..., v2.3.5, v3.0.0, ..., v3.9.5].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require mongodb/laravel-mongodb:*" to figure out if any version is installable, or "composer require mongodb/laravel-mongodb:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content. i have tried to clear the cache and update composer and everything but still the same error : PS C:\Users\007\Desktop\new-api-todo> composer self-update
You are already using the latest available Composer version 2.6.3 (stable channel).
PS C:\Users\007\Desktop\new-api-todo> composer clear-cache
Clearing cache (cache-vcs-dir): C:\Users\007\AppData\Local\Composer\vcs
Clearing cache (cache-repo-dir): C:\Users\007\AppData\Local\Composer\repo
Clearing cache (cache-files-dir): C:\Users\007\AppData\Local\Composer\files
Clearing cache (cache-dir): C:\Users\007\AppData\Local\Composer
All caches cleared.
PS C:\Users\007\Desktop\new-api-todo> composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
INFO Discovering packages.
laravel/sail ...................................................................................................................... DONE
laravel/sanctum ................................................................................................................... DONE
laravel/tinker .................................................................................................................... DONE
nesbot/carbon ..................................................................................................................... DONE
nunomaduro/collision .............................................................................................................. DONE
nunomaduro/termwind ............................................................................................................... DONE
spatie/laravel-ignition ........................................................................................................... DONE
82 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force
INFO No publishable resources for tag [laravel-assets].
No security vulnerability advisories found.
PS C:\Users\007\Desktop\new-api-todo> composer require mongodb/laravel-mongodb:^3.9.5
./composer.json has been updated
Running composer update mongodb/laravel-mongodb
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 mongodb/laravel-mongodb 3.9.5 -> satisfiable by mongodb/laravel-mongodb[v3.9.5].
- mongodb/laravel-mongodb v3.9.5 requires illuminate/support ^9.0 -> found illuminate/support[v9.0.0, ..., v9.52.15] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
the weird thing is the package requires illuminate/support 9.0 and i have 9.0 to 9.52 and still can't be installed, and for the conflicts with other packages ... this is a fresh laravel application here is my compose.json: {
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The version compatible with Laravel 10 is not released yet. We have a release candidate 4.0.0-rc1.
|
Beta Was this translation helpful? Give feedback.
The version compatible with Laravel 10 is not released yet. We have a release candidate 4.0.0-rc1.