It has been some time since I did work for my Laravel website, which is running the classic Spark plugin (https://spark-classic.laravel.com/). I am trying to set things up in my Windows WSL2 environment but running into some issues when running composer update.
First of all, the original composer.json contains: "laravel/spark-aurelius": "*@dev",
$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/spark-aurelius[dev-master, 10.x-dev] require php ^7.2 -> your php version (8.1.2) does not satisfy that requirement.
- laravel/spark-aurelius 10.x-dev is an alias of laravel/spark-aurelius dev-master and thus requires it to be installed too.
- Root composer.json requires laravel/spark-aurelius *@dev -> satisfiable by laravel/spark-aurelius[dev-master, 10.x-dev (alias of dev-master)].
After inspecting the Spark installation website (https://spark-classic.laravel.com/docs/12.0/installation) I noticed the latest Spark package required this
"laravel/spark-aurelius": "~11.0",
So I changed that in the composer.json file. However, after running composer update
$ composer update
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 laravel/spark-aurelius ~11.0, found laravel/spark-aurelius[dev-master, 10.x-dev (alias of dev-master)] but these do not match your constraint and are therefore not installable. Make sure you either fix the constraint or avoid updating this package to keep the one present in the lock file (laravel/spark-aurelius[v11.0.4]).
So I am not sure what to make of it. The problem indicates that although version ~11.0 is specified in the composer.json, a lower version 10.x-dev was found.
This is the complete composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"aws/aws-sdk-php-laravel": "^3.6",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"graham-campbell/flysystem": "^7.1",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/spark-aurelius": "~11.0",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.0",
"laravelcollective/html": "^6.2",
"league/flysystem-aws-s3-v3": "^1.0",
"mpociot/vat-calculator": "^2.4",
"shiftonelabs/laravel-sqs-fifo-queue": "^2.0",
"uxweb/sweet-alert": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"repositories": [
{
"type": "path",
"url": "./spark"
}
]
}
Why isn't this lower version updated?