Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm using a Laravel project as a local plugin of Moodle, using the composer/installer package. The layout of the project is:

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

The composer.json of the Moodle application

{
    "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":  "[email protected]:Pursuittech/sam.git"
        }
    ]
}

composer.json of the Laravel local plugin

{
    "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
    }
}

When I try to install the Laravel plugin using php composer.phar -vvv update, I hang on "Resolving dependencies through SAT".

I found a similar question which has the problem when only dealing with Laravel 4.2 in isolation. I haven't been through everything in the list and will update when I have.

My question is, is it normal for "Resolving dependencies through SAT" to hang when combining large composer projects like Laravel and Moodle? Are there any immediate steps I can take to reduce the complexity of the problem?

like image 560
jsindos Avatar asked Aug 28 '17 07:08

jsindos


1 Answers

try those steps maybe you will get more reasonable output, its probably conflict of package version (eg. one of the packages locked on version which does not satisfy other package)

try no-dev option first

composer update --no-dev -vvv

try updating package by package

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

try to delete vendor folder and composer.lock

finally check composer.json of each package and compare requirements search for versions which exclude themselves from working together

like image 95
Zgr3doo Avatar answered Sep 28 '22 08:09

Zgr3doo