最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

composer php - Unable to Install Auth0 Laravel SDK in my Laravel 11 Project - Stack Overflow

programmeradmin7浏览0评论

I recently started learning to use Laravel. I created a new project in Laravel 11 (which was the latest at the time I started) using the composer commands provided on the laravel website. Everything works as expected.

I wanted to include Auth0. I go to a their github site which instructs me to do this (as I already have a project):

composer require auth0/login:^7.8 --update-with-all-dependencies

When I execute that I get this error:

The "7.8" constraint for "auth0/login" appears too strict and will likely not match what you want. See 
./composer.json has been updated
Running composer update auth0/login --with-all-dependencies
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 auth0/login 7.8 -> satisfiable by auth0/login[7.8.0].
    - Root composer.json requires laravel/framework ^11.31 -> satisfiable by laravel/framework[v11.31.0, ..., v11.44.2].
    - nunomaduro/collision is locked to version v8.6.1 and an update of this package was not requested.
    - auth0/login 7.8.0 requires illuminate/support ^9 || ^10 -> satisfiable by illuminate/support[v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28].
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.39.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.38.2.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.38.1.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.38.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.37.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.36.1.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.36.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.35.1.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.35.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.34.2.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.34.1.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.34.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.33.2.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.33.1.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.33.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.32.0.
    - nunomaduro/collision v8.6.1 conflicts with laravel/framework v11.31.0.
    - Only one of these can be installed: illuminate/support[v10.17.0, ..., v10.48.28, v11.0.0, ..., v11.44.2], laravel/framework[v11.31.0, ..., v11.44.2]. laravel/framework replaces illuminate/support and thus cannot coexist with it.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

My composer file looks like this:

{
    "$schema": ".json",
    "name": "laravel/laravel",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": ["laravel", "framework"],
    "license": "MIT",
    "require": {
        "php": "^8.2",
        "laravel/framework": "^11.31",
        "laravel/tinker": "^2.9"
    },
    "require-dev": {
        "fakerphp/faker": "^1.23",
        "laravel/pail": "^1.1",
        "laravel/pint": "^1.13",
        "laravel/sail": "^1.26",
        "mockery/mockery": "^1.6",
        "nunomaduro/collision": "^8.1",
        "phpunit/phpunit": "^11.0.1"
    },
    "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",
            "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
            "@php artisan migrate --graceful --ansi"
        ],
        "dev": [
            "Composer\\Config::disableProcessTimeout",
            "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
        ]
    },
    "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
}

I'm not that well versed in composer conflicts. Is there something obvious that I'm missing? How do I get the Auth0 Laravel SDK working? I can't be only one who has a Laravel 11 project who now can't use Auth0... I did a composer update out of desperation but that didn't make a difference.

发布评论

评论列表(0)

  1. 暂无评论