0
votes

I'm trying to update composer but getting errors

here is the link for error log: https://pastebin.com/JNT7Wi15

Laravel Version: 5.4 Php version: PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr 5 2018 08:53:57) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.4-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Here is my composer.json file

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "guzzlehttp/guzzle": "~6.0",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0",
    "barryvdh/laravel-cors": "0.8.1",
    "webpatser/laravel-uuid": "2.*",
    "intervention/image": "~2.1"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "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,
    "optimize-autoloader": true
}
}
1
Are you trying to upgrade the composer command itself, or upgrade the dependencies of the current project?Quezler
try to remove the vendor folder then do composer updateAdnan Mumtaz
@AdnanMumtaz still same errorhamza
@Quezler im trying to follow this link :- stackoverflow.com/questions/29314189/… in order to create different sizes of imagehamza
Seems like one of the packages required laravel 5.2 i guess but your installation used 5.4.*. To be exact this package "barryvdh/laravel-cors"Norlihazmey Ghazali

1 Answers

0
votes
"require": {
    "php": ">=5.6.4",
    "guzzlehttp/guzzle": "~6.0",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0",
    "barryvdh/laravel-cors": "0.8.1",
    "webpatser/laravel-uuid": "2.*",
    "intervention/image": "~2.1"
},

I found a solution for this issue. I just removed "barryvdh/laravel-cors":"0.8.0" from composer.json, because Laravel 5.4 doesn't support barryvdh/laravel-cors. So after removing that line I run composer update and it works.