Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
175 views
in Technique[技术] by (71.8m points)

php - Composer Update error in Laravel 4 after renaming a controller file

hi I got error in my composer update. This happened because I got same class in a two controller file.

  • TravelerControler.php

  • TravelerControler-backup.php <- just for backup but it calls the
    method not the TravelerControler.php

Some cases my new method that I applied in TravelerControler.php didn't call so I remove the TravelerControler-backup.php file and got 500 error. so I do composer update and this is the result.

First I do composer self-update then do the composer update and got this error:

# composer update
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
    - illuminate/filesystem v5.2.25 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[5.3.x-dev] but these conflict with your requirements or minimum-stability
    - Conclusion: don't install laravel/framework v4.2.19
    - Conclusion: don't install laravel/framework v4.2.18
    - Conclusion: remove laravel/framework v4.2.17
    - Conclusion: don't install laravel/framework v4.2.17
    - Conclusion: don't install laravel/framework v4.2.16
    - Conclusion: don't install laravel/framework v4.2.15
    - Conclusion: don't install laravel/framework v4.2.14
    - Conclusion: don't install laravel/framework v4.2.13
    - Conclusion: don't install laravel/framework v4.2.12
    - Conclusion: don't install laravel/framework v4.2.11
    - Conclusion: don't install laravel/framework v4.2.10
    - Conclusion: don't install laravel/framework v4.2.9
    - Conclusion: don't install laravel/framework v4.2.8
    - Conclusion: don't install laravel/framework v4.2.7
    - Conclusion: don't install laravel/framework v4.2.6
    - Conclusion: don't install laravel/framework v4.2.5
    - Conclusion: don't install laravel/framework v4.2.4
    - Conclusion: don't install laravel/framework v4.2.3
    - Conclusion: don't install laravel/framework v4.2.2
    - Conclusion: don't install laravel/framework v4.2.1
    - mews/purifier dev-master requires illuminate/filesystem ~5.1 -> satisfiable by illuminate/filesystem[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.6, v5.2.7].
    - mews/purifier dev-master requires illuminate/filesystem ~5.1 -> satisfiable by illuminate/filesystem[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.6, v5.2.7].
    - don't install illuminate/filesystem v5.1.1|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.13|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.16|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.2|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.20|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.22|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.25|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.28|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.30|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.31|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.6|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.1.8|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.0|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.19|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.21|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.24|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.26|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.27|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.6|don't install laravel/framework v4.2.0
    - don't install illuminate/filesystem v5.2.7|don't install laravel/framework v4.2.0
    - Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.13, v4.2.14, v4.2.15, v4.2.16, v4.2.17, v4.2.18, v4.2.19, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
    - Installation request for mews/purifier dev-master -> satisfiable by mews/purifier[dev-master].

My composer.json value is this:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "laravel/framework": "4.2.*",
        "vtalbot/markdown": "1.*",
        "mews/purifier": "dev-master",
        "hybridauth/hybridauth": "dev-master#6d89473",
        "symfony/yaml": "dev-master",
        "greggilbert/recaptcha": "1.*",
        "php": ">=5.3.0",
        "ext-curl": "*",
        "ext-json": "*",
        "gloudemans/shoppingcart": "~1.2",
        "stripe/stripe-php":"dev-master"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ],
        "files" : [
            "vendor/stripe/stripe-php/lib/Stripe.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}

any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to the package page on Packagist.org, the latest version compatible with laravel 4 is 1.0.2. However according to the readme for mews/purifier, you can get the latest version by adding "mews/purifier": "dev-master-l4" to your composer.json. You would also have to change the minimum stabability to dev.

So your composer.json would look something like this:

{
    "require": {
        "laravel/framework": "4.2.*",
        ....
        "mews/purifier": "dev-master-l4"
        ....
    },
    ....
    "minimum-stability": "dev"
}

Then composer update should work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...