1
votes

I'm developping a web app using Lumen. I followed the instructions from the doc, installing laravel/lumen-installer via Composer, then doing lumen new myApp to get it properly installed (it was in April 2015).

While working on queues, the method "onQueue" was (and still is) not found... I presume I have an old version of the package "Illuminate/queue" (or what else?). Checking on packagist, Lumen is now in v5.1.5 (https://packagist.org/packages/laravel/lumen-framework) and the one I'm using is v5.0.4. So I did an update with composer :

composer update laravel/lumen-framework

But I get the v5.0.10, not the 5.1.4. Why so?

I checked that issue: https://github.com/dingo/api/issues/447 but in my composer.json, I have:

"config": {
    "preferred-install": "dist"
}

So what is the problem? How can I get the last version of Lumen? Moreover, how can I get the onQueue method (updating only the package "Illuminate/queue")?

Thanks in advance


UPDATE, as asked in comments below, this is my initial composer.json (just not to miss anything):

{
    "require": {
        "laravel/lumen-installer": "~1.0"
    }
}

and myApp composer.json:

{
    "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/lumen-framework": "5.0.*",
        "vlucas/phpdotenv": "~1.0",
        "illuminate/mail": "~5.0",
        "imagine/imagine": "^0.6.2",
        "league/csv": "^7.1",
        "gregwar/captcha": "^1.1",
        "neitanod/forceutf8": "^1.4",
        "predis/predis": "^1.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}
1
Show us your full composer.json file.BrokenBinary
By far the easiest way is to run composer require laravel/lumen-framework:5.1 which will update your composer.json and include the new dependency. This is easier than the answer below.R. Chappell

1 Answers

2
votes

You have to update your composer.json

"require": {
    "php": ">=5.5.9",
    "laravel/lumen-framework": "5.1.*",
    "vlucas/phpdotenv": "~1.0"
},