Skip to content
Advertisement

Unable to upgrade laravel framework from 5.5 to 5.6 or 5.7 on an existing project

I am trying to upgrade my laravel project framework to 5.7 from 5.5 but unable to do it ..

when i change composerjson requres as laravel upgrading documentation and hit composer update on project terminal its output me these:

composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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.6.39
    - Conclusion: don't install laravel/framework v5.6.38
    - Conclusion: don't install laravel/framework v5.6.37
    - Conclusion: don't install laravel/framework v5.6.36
    - Conclusion: don't install laravel/framework v5.6.35
    - Conclusion: don't install laravel/framework v5.6.34
    - Conclusion: don't install laravel/framework v5.6.33
    - Conclusion: don't install laravel/framework v5.6.32
    - Conclusion: don't install laravel/framework v5.6.31
    - Conclusion: don't install laravel/framework v5.6.30
    - Conclusion: don't install laravel/framework v5.6.29
    - Conclusion: don't install laravel/framework v5.6.28
    - Conclusion: don't install laravel/framework v5.6.27
    - Conclusion: don't install laravel/framework v5.6.26
    - Conclusion: don't install laravel/framework v5.6.25
    - Conclusion: don't install laravel/framework v5.6.24
    - Conclusion: don't install laravel/framework v5.6.23
    - Conclusion: don't install laravel/framework v5.6.22
    - Conclusion: don't install laravel/framework v5.6.21
    - Conclusion: don't install laravel/framework v5.6.20
    - Conclusion: don't install laravel/framework v5.6.19
    - Conclusion: don't install laravel/framework v5.6.18
    - Conclusion: don't install laravel/framework v5.6.17
    - Conclusion: don't install laravel/framework v5.6.16
    - Conclusion: don't install laravel/framework v5.6.15
    - Conclusion: don't install laravel/framework v5.6.14
    - Conclusion: don't install laravel/framework v5.6.13
    - Conclusion: don't install laravel/framework v5.6.12
    - Conclusion: don't install laravel/framework v5.6.11
    - Conclusion: don't install laravel/framework v5.6.10
    - Conclusion: don't install laravel/framework v5.6.9
    - Conclusion: don't install laravel/framework v5.6.8
    - Conclusion: don't install laravel/framework v5.6.7
    - Conclusion: don't install laravel/framework v5.6.6
    - Conclusion: don't install laravel/framework v5.6.5
    - Conclusion: don't install laravel/framework v5.6.4
    - Conclusion: don't install laravel/framework v5.6.3
    - Conclusion: don't install laravel/framework v5.6.2
    - Conclusion: don't install laravel/framework v5.6.1
    - cartalyst/stripe-laravel v7.0.0 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[v5.5.45], illuminate/support[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44].
    - cartalyst/stripe-laravel v7.0.0 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[v5.5.45], illuminate/support[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44].
    - Can only install one of: laravel/framework[v5.6.0, v5.5.45].
    - don't install illuminate/support v5.5.0|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.16|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.17|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.2|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.28|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.33|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.34|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.35|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.36|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.37|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.39|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.40|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.41|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.43|don't install laravel/framework v5.6.0
    - don't install illuminate/support v5.5.44|don't install laravel/framework v5.6.0
    - Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.18, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].
    - Installation request for cartalyst/stripe-laravel 7.0.* -> satisfiable by cartalyst/stripe-laravel[v7.0.0].

and this is my composer.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "laravel/framework": "5.6.*",
        "cartalyst/stripe-laravel": "7.0.*",
        "spatie/laravel-activitylog": "^2.1.1",
        "yajra/laravel-datatables-oracle": "~8.0",
        "arcanedev/no-captcha": "^5.0"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~7.0",
        "barryvdh/laravel-debugbar": "^3.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\": "app/",
            "App\Helpers\": "app/Helpers/"
        },
        "files": ["app/Helpers/functions.php"]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "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"
    }
}

tried many ways available on internet but still hanging on the problem

just want to upgrade the project laravel for new features ..

Anybody got any idea ? how can i solved this and go ahead with new laravel ?

thanks in advance.

Advertisement

Answer

Best way to upgrade laravel framework for your projects in following steps

  1. Take backup of your composer.json file
  2. remove all third party packages from composer.json file or take latest composer.json from laravel git repository https://github.com/laravel/laravel
  3. comment all third party packages service providers from app.php file (for version below Laravel 5.5)
  4. Now run composer update command in terminal
  5. Once Laravel update done. Now install all your third party packages again and enable third party service provider on app.php file.

update: if you are trying to upgrade laravel version 5.5 and up skip step 3. also for laravel 5.5 and up no need to enable third party package service providers in step 5.

Happy updating laravel for your projects.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement