Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating laravel to laravel 5.5 from laravel 5.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

like image 594
Krzysztof Michalski Avatar asked Dec 18 '22 05:12

Krzysztof Michalski


1 Answers

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.

like image 134
JonnySerra Avatar answered Jan 14 '23 11:01

JonnySerra