0

I'm struggling to update an 2015 application from laravel 5.1.46(LTS) to 5.2, I've done composer require "laravelcollective/html:5.8.0" --with-all-dependencies and it fails.

I'm doing this because I see the error Call to undefined method Illuminate\Foundation\Application::bindShared() in some step when following https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0 and cant continue unless I do a git reset --hard, I'm clueless.

here is my composer.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "illuminate/html": "^5.0",
        "jenssegers/date": "^3.0",
        "intervention/imagecache": "^2.3",
        "guzzlehttp/guzzle": "~5.3|~6.0",
        "vinkla/hashids": "^2.3",
        "milon/barcode": "^5.2"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/fpdf/fpdf.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}
daaan
  • 47
  • 5
  • why `require "laravelcollective/html:5.8.0"` and not `require "laravelcollective/html:5.2.0"` since you're aiming for 5.2 – N69S Jul 07 '21 at 13:52
  • 5.2 also fails with message: ```intervention/imagecache is locked to version 2.4.2 and an update of this package was not requested.``` – daaan Jul 08 '21 at 16:50
  • unlock it `"intervention/imagecache": "^2.3",` – N69S Jul 08 '21 at 20:22
  • laravelcollective has been installed but when changing the version of laravel I followed https://stackoverflow.com/questions/34395129/fatal-error-while-upgrading-laravel-5-1-to-5-2 but it throws: ```PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /vendor/laravel/framework/src/Illuminate/Container/Container.php:734``` – daaan Jul 08 '21 at 21:37
  • if you dont have enough experience to debug the errors you encounter, i suggest that you do a fresh install of the version you're aiming for and then add your project files one by one. – N69S Jul 08 '21 at 21:50

0 Answers0