Composer 挂在 Moodle 和用作本地插件的 Laravel 之间的 "Resolving dependencies on SAT"

Composer hangs on "Resolving dependencies on SAT" between Moodle and Laravel used as a local plugin

我正在使用 Laravel 项目作为 Moodle 的本地插件,使用 composer/installer 包。项目布局为:

// Moodle Application
 - composer.json
 - local/
   - laravel-plugin/ <- here is the Laravel local plugin
     - composer.json <- composer.json of Laravel plugin

Moodle应用composer.json

{
    "name": "moodle/moodle",
    "license": "GPL-3.0",
    "description": "Moodle - the world's open source learning platform",
    "type": "project",
    "homepage": "https://moodle.org",
    "require": {
        "composer/installers": "~1.0",
        "Pursuittech/sam": "dev-master" <- here is the Laravel local plugin
    },
    "require-dev": {
        "phpunit/phpunit": "5.5.*",
        "phpunit/dbUnit": "1.4.*",
        "moodlehq/behat-extension": "3.33.1",
        "mikey179/vfsStream": "^1.6"
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:Pursuittech/sam.git"
        }
    ]
}

composer.json Laravel 本地插件

{
    "name": "Pursuittech/sam",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "moodle-local",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0",
        "composer/installers": "~1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "Api\": "api/",
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\Foundation\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\Foundation\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

当我尝试使用 php composer.phar -vvv update 安装 Laravel 插件时,我挂在了 "Resolving dependencies through SAT".

我发现了一个 similar question,它在单独处理 Laravel 4.2 时有问题。我还没有完成列表中的所有内容,完成后会更新。

我的问题是,"Resolving dependencies through SAT" 在结合 Laravel 和 Moodle 等大型作曲家项目时挂起是否正常?我可以立即采取哪些措施来降低问题的复杂性?

尝试这些步骤也许你会得到更合理的输出,它可能是包版本冲突(例如,锁定版本的包之一不满足其他包)

首先尝试 no-dev 选项

composer update --no-dev -vvv

尝试逐个更新包

composer update some/package --no-dev -vvv

尝试删除供应商文件夹和composer.lock

最后检查每个包的 composer.json 并比较要求搜索排除它们一起工作的版本