Omi
Omi

Reputation: 4007

Error after running command "composer update"

My composer.json file

{
        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "type": "project",
        "require": {
            "php": ">=5.5.9",
            "laravel/framework": "5.1.*",
            "illuminate/html": "^5.0",
            "laravelcollective/html": "~5.0",
            "slim/slim": "2.*",
            "slim/views": "0.1.*",
            "illuminate/database": "5.0.*",
            "illuminate/events": "5.0.*"
        },
        "require-dev": {
            "fzaninotto/faker": "~1.4",
            "mockery/mockery": "0.9.*",
            "phpunit/phpunit": "~4.0",
            "phpspec/phpspec": "~2.1"

        },
        "autoload": {
            "classmap": [
                "database"
            ],
            "psr-4": {
                "App\\": "app/"
            }
        },
        "autoload-dev": {
            "classmap": [
                "tests/TestCase.php"
            ]
        },
        "scripts": {
            "post-install-cmd": [
                "php artisan clear-compiled",
                "php artisan optimize"
            ],
            "pre-update-cmd": [
                "php artisan clear-compiled"
            ],
            "post-update-cmd": [
                "php artisan optimize"
            ],
            "post-root-package-install": [
                "php -r \"copy('.env.example', '.env');\""
            ],
            "post-create-project-cmd": [
                "php artisan key:generate"
            ]
        },
        "config": {
            "preferred-install": "dist"
        }
    }

Error after composer update:

php artisan clear-compiled Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

 Problem 1
    - Conclusion: don't install laravel/framework v5.1.20
    - Conclusion: don't install laravel/framework v5.1.19
    - Conclusion: don't install laravel/framework v5.1.18
    - Conclusion: don't install laravel/framework v5.1.17
    - Conclusion: don't install laravel/framework v5.1.16
    - Conclusion: don't install laravel/framework v5.1.15
    - Conclusion: don't install laravel/framework v5.1.14
    - Conclusion: don't install laravel/framework v5.1.13
    - Conclusion: don't install laravel/framework v5.1.12
    - Conclusion: don't install laravel/framework v5.1.11
    - Conclusion: remove laravel/framework v5.1.10
    - Conclusion: don't install laravel/framework v5.1.10
    - Conclusion: don't install laravel/framework v5.1.9
    - Conclusion: don't install laravel/framework v5.1.8
    - Conclusion: don't install laravel/framework v5.1.7
    - Conclusion: don't install laravel/framework v5.1.6
    - Conclusion: don't install laravel/framework v5.1.5
    - Conclusion: don't install laravel/framework v5.1.4
    - Conclusion: don't install laravel/framework v5.1.3
    - Conclusion: don't install laravel/framework v5.1.2
    - Conclusion: don't install laravel/framework v5.1.1
    - illuminate/events v5.0.0 requires illuminate/container 5.0.* -> satisfiabl
e by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v
5.0.4].
    - illuminate/events v5.0.22 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
    - illuminate/events v5.0.25 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
    - illuminate/events v5.0.26 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
    - illuminate/events v5.0.28 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
    - illuminate/events v5.0.33 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
    - illuminate/events v5.0.4 requires illuminate/container 5.0.* -> satisfiabl
e by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v
5.0.4].
    - don't install illuminate/container v5.0.0|don't install laravel/framework
v5.1.0
    - don't install illuminate/container v5.0.22|don't install laravel/framework
 v5.1.0
    - don't install illuminate/container v5.0.25|don't install laravel/framework
 v5.1.0
    - don't install illuminate/container v5.0.26|don't install laravel/framework
 v5.1.0
    - don't install illuminate/container v5.0.28|don't install laravel/framework
 v5.1.0
    - don't install illuminate/container v5.0.33|don't install laravel/framework
 v5.1.0
    - don't install illuminate/container v5.0.4|don't install laravel/framework
v5.1.0
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel
/framework[v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15,
 v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.3, v5.1.4, v5.1.5, v5
.1.6, v5.1.7, v5.1.8, v5.1.9].
    - Installation request for illuminate/events 5.0.* -> satisfiable by illumin
ate/events[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4].

Upvotes: 1

Views: 479

Answers (1)

Amo
Amo

Reputation: 2944

Your composer.json file is referencing the following dependencies:

"illuminate/database": "5.0.*"
"illuminate/events": "5.0.*"

However, the Laravel Framework version you're requiring is 5.1.*.

Simply change the illuminate version dependencies as follows:

"illuminate/database": "5.1.*"
"illuminate/events": "5.1.*"

These are actually part of the core Laravel framework though, so you shouldn't need to explicitly declare them as dependencies.

I've tested this and it works.

One separate issue is that you've defined a classmap referencing "database" which doesn't actually resolve to anything. But that's a separate issue.

Upvotes: 2

Related Questions