M
M
Maxim2019-09-11 22:07:29
Composer
Maxim, 2019-09-11 22:07:29

How to update laravel from 5.4 to 5.8?

Tell me how to update laravel from 5.4 to 5.8
in the composer set like this

"require": {
        "php": "^7.1.3",
        "anhskohbo/no-captcha": "^3.0",
        "buzz/laravel-google-captcha": "^2.1",
        "intervention/image": "^2.5",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "~1.0",
        "kylekatarnls/laravel-carbon-2": "^1.0.0",
        "nesbot/carbon": "2.9.1 as 1.26.3"
    },

but with composer update it gives
composer-php7.1 update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 1 update, 1 removal
  - Removing kylekatarnls/update-helper (1.2.0)
  - Updating nesbot/carbon (1.39.0 => 2.9.1): Downloading (100%)
  - Installing kylekatarnls/laravel-carbon-2 (1.0.0): Downloading (100%)        Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Script php artisan optimize handling the post-update-cmd event returned with error code 255

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Wells, 2019-09-12
@Alex_Wells

You go into composer.json and raise the larka version to 5.8. You write composer update. He shits on you with errors, saying "such and such packages are too old for this version." Google new versions under 5.8 and enter them. Another composer update. Again errors, again looking for new versions. So in a circle.
There is probably a more normal way to do this, but once every few months you can do it.
But that's 10% of the work. 90% is to skip the upgrade guide, everything, from beginning to end, and then look for the boots at the end (because they will be, even if you have followed all the upgrade guides perfectly. The guides DO NOT describe all the changes).

N
Nujabes37, 2019-09-11
@Nujabes37

Try,

composer dumpautoload
composer clearcache
composer update —lock

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question