esbenp / oauth2-server-lumen

A lumen bridge for lucadegasperi/oauth2-server-laravel
55 stars 17 forks source link

bindShared() is now singleton() #8

Open PastorBones opened 8 years ago

PastorBones commented 8 years ago

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

zulhfreelancer commented 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.

manojsaini81 commented 8 years ago

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.

zulhfreelancer commented 8 years ago

@manojsaini81 can you please share your entire composer.json file?

manojsaini81 commented 8 years ago

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/" ] } }

mhousser commented 8 years ago

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?

kojilab commented 8 years ago

I replaced the occurences of bindShared with singleton after reading this https://laracasts.com/discuss/channels/laravel/call-to-undefined-method-illuminatefoundationapplicationbindshared

ghost commented 7 years ago

@mhousser Could you update this package without put 'dev-master' version? Which version did you use for Lumen 5.2?