4

I'm trying update a laravel from 5.4 version to 5.5. I have done everything with instruction from laravel guide: https://laravel.com/docs/master/upgrade

When I'm trying use command:

composer update

the result is:

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
    - The requested package laravel/framework 5.5.* is satisfiable by laravel/framework[5.5.x-dev] but these conflict with your requirements or minimum-stability.

Below I show composer.json file:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "doctrine/dbal": "^2.5",
        "intervention/image": "^2.3",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "laravelcollective/html": "^5.4.0",
        "unisharp/laravel-filemanager": "^1.7"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "artSite\\": "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
    }
}

I would be greateful for help. Best regards

Krzysztof Michalski
  • 791
  • 1
  • 9
  • 25

2 Answers2

11

as stated in the error message Laravel 5.5 is still in dev, meaning there's no stable release and by default Composer limits you to downloading only stable numbered releases to avoid you downloading any packages that are in active development and may contain breaking changes.

You can circumvent this by adding the following two lines to your composer.json file

"minimum-stability": "dev",
"prefer-stable": true,

This way it prefers stable releases wherever it can find them but it will allow you to download dev packages if nothing else is available.

JonnySerra
  • 1,044
  • 3
  • 13
  • 27
  • Thank you for the (temporary) solution. It seems that currently it will pull `master` branch with this config? I've checked and there seem to be commits to the `master` branch daily, so I guess won't risk it myself at the moment. Thanks nonetheless @JonnySerra ! – kiradotee Aug 25 '17 at 13:28
0

I think you should update the PHP version as well. If you check the official doc, it says the minimum PHP requirement 7.0.0.

LakiGeri
  • 2,046
  • 6
  • 30
  • 56