Home > database >  Laravel Spatie/laravel-backup can't install
Laravel Spatie/laravel-backup can't install

Time:06-12

I'm trying to implement automated backup in Laravel 8. I decided to go with the Laravel-backup package "spatie/laravel-backup".

The problem occurs when I try to install the package with "composer require spatie/laravel-backup".

I get this problem :

Problem 1 - spatie/laravel-backup[8.1.0, ..., v8.x-dev] require illuminate/console ^9.0 -> found illuminate/console[v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require. - Root composer.json requires spatie/laravel-backup ^8.1 -> satisfiable by spatie/laravel-backup[8.1.0, 8.1.1, 8.1.2, v8.x-dev].

I tried running those commands from similar questions answers nothing changed:

-composer require spatie/laravel-backup "^8.1" --ignore-platform-reqs

-composer require spatie/laravel-medialibrary

Also I tried deleting vendor and composer.lock and then running composer install and the problem still persists.

I guess there is a problem in my composer.json file :

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "ext-gd": "*",
        "ext-json": "*",
        "aws/aws-sdk-php": "~3.0",
        "darkaonline/l5-swagger": "^8.1",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.75",
        "laravel/sanctum": "^2.11",
        "laravel/tinker": "^2.5",
        "league/flysystem-aws-s3-v3": "^1.0",
        "maatwebsite/excel": "^3.1",
        "tymon/jwt-auth": "^1.0",
      "ext-pdo": "*"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^5.10",
        "phpunit/phpunit": "^9.5.10"
    },
    "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
}

Thanks to everyone who takes the time to look at my problem. :))

CodePudding user response:

Based on comments, install the correct version of Laravel Backup. Solved this problem.

composer require spatie/laravel-backup:7.0
  • Related