Thursday, March 9, 2017

Trouble updating composer on a Laravel 4 project

I am attempting to use composer update on a Laravel 4 project. It fails and returns the following:

PHP Fatal error:  Call to undefined function Illuminate\Database\Eloquent\class_uses_recursive() in /home/dev.habbocreate.com/bootstrap/compiled.php on line 6416
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Call to undefined function Illuminate\\Database\\Eloquent\\class_uses_recursive()","file":"\/home\/dev.habbocreate.com\/bootstrap\/compiled.php","line":6416}}Script php artisan clear-compiled handling the post-update-cmd event returned with error code 255

I have also tried composer dump-autoload then updating, also deleting composer.lock and the vendors folder then reupdating

Here's my composer.json file

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "laravel/framework": "4.2",
        "hisorange/bbcoder": "dev-master",
        "orchestra/imagine": "2.2.x",
        "teepluss/gateway": "1.x",
        "yangqi/htmldom": "dev-master",
        "nubs/random-name-generator": "^1.0"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}

It's telling me I need to add more of a description but I'm pretty sure if I create a long enough sentence it will sure enough let me post.



via Ben Shepherd

Advertisement