'Laravel Spark installation problem, need to update something I imagine
I get the following error when I try to install Laravel Spark:
Your requirements could not be resolved to an installable set of packages.
Problem 1. - laravel/spark-stripe[v1.0.0, ..., 1.x-dev] require laravel/cashier ^12.0 -> found laravel/cashier[v12.0.0, ..., 12.x-dev] but it conflicts with your root composer.json require (^13.8).
- Root composer.json requires laravel/spark-stripe ^1.0 -> satisfiable by laravel/spark-stripe[v1.0.0, ..., 1.x-dev].Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
This happens after adding this:
"repositories": [
{
"type": "composer",
"url": "https://spark.laravel.com"
}
],
and this to my composer.json file:
"laravel/spark-paddle": "^1.0"
Then running composer update.
Can anyone diagnose the error message? Here is my composer.json
file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"repositories": [
{
"type": "composer",
"url": "https://spark.laravel.com"
}
],
"license": "MIT",
"require": {
"php": "^8.0.2",
"blade-ui-kit/blade-heroicons": "^1.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/cashier": "^13.8",
"laravel/framework": "^9.2",
"laravel/sanctum": "^2.14.1",
"laravel/tinker": "^2.7",
"stripe/stripe-php": "^7.116",
"laravel/spark-stripe": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"kamona/kui-laravel-breeze": "^0.1.9",
"laravel/breeze": "^1.8",
"laravel/sail": "^1.0.1",
"laravel/ui": "^3.4",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.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
},
"minimum-stability": "dev",
"prefer-stable": true
}
Solution 1:[1]
Spark version 1.x doesn't support Cashier 13. You can change the required Cashier version to 12 or you can delete Cashier from your composer.json file because Spark will automatically add it as a dependency.
Also, if you decide to use Paddle instead of Stripe, remove "laravel/spark-stripe": "^1.0"
from your composer.json file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kevin Marsden |