Open PastorBones opened 8 years ago
When I run php artisan migrate --path=vendor/lucadegasperi/oauth2-server-laravel/migrations
, I get this error:
Fatal error: Call to undefined method Laravel\Lumen\Application::bindShared() in /Applications/MAMP/htdocs/order_api/vendor/lucadegasperi/oauth2-server-laravel/src/Storage/FluentStorageServiceProvider.php on line 54
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Laravel\Lumen\Application::bindShared()
What should I do now? I'm new to Laravel & Lumen. Thanks.
getting same error.
Found a solution, one of the fork repository "thomasgambina/oauth2-server-lumen.git", has made changes into composer.json. I have used same repository like below: in composer.json: "repositories": [ { "type": "git", "url": "https://github.com/thomasgambina/oauth2-server-lumen.git" } ], and under "require":
"optimus/oauth2-server-lumen":"dev-master"
This has resolved the issue.
@manojsaini81 can you please share your entire composer.json file?
Here is the Json. I was able to install all bundle but there is another issue coming while using oAuth Authentication which says Facade root is not found.
However here is the composer.json
{ "name": "laravel/lumen", "description": "The Laravel Lumen Framework.", "keywords": ["framework", "laravel", "lumen"], "license": "MIT", "type": "project", "repositories": [ { "type": "git", "url": "https://github.com/thomasgambina/oauth2-server-lumen.git" } ], "require": { "php": ">=5.5.9", "laravel/lumen-framework": "5.2.*", "vlucas/phpdotenv": "~2.2", "optimus/oauth2-server-lumen":"dev-master", "guzzlehttp/guzzle": "^6.1" }, "require-dev": { "fzaninotto/faker": "~1.4", "phpunit/phpunit": "~4.0" }, "autoload": { "psr-4": { "App\": "app/" } }, "autoload-dev": { "classmap": [ "tests/", "database/" ] } }
Damn this one just killed me during my upgrade to Lumen 5.2.*.
Call to undefined method Laravel\Lumen\Application::bindShared()
Caused by this include:
"optimus/oauth2-server-lumen": "0.1.*"
Would really prefer not to put a dev-master
dependency in my Composer file.
Since this is a critical/showstopper bug for using this library with the current version of Lumen, is there an ETA for this update being moved into a mainstream Composer dependency? Say, 0.2?
I replaced the occurences of bindShared with singleton after reading this https://laracasts.com/discuss/channels/laravel/call-to-undefined-method-illuminatefoundationapplicationbindshared
@mhousser Could you update this package without put 'dev-master' version? Which version did you use for Lumen 5.2?
The dependency version of lucadegasperi/oauth2-server-laravel is using $app->bindShared() which is now called $app->singleton().
The fix is to update your dependency to 5.1.1