Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindShared() is now singleton() #8

Open
PastorBones opened this issue Jan 15, 2016 · 7 comments
Open

bindShared() is now singleton() #8

PastorBones opened this issue Jan 15, 2016 · 7 comments

Comments

@PastorBones
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@manojsaini81
Copy link

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
Copy link

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
Copy link

kojilab commented May 16, 2016

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

@ghost
Copy link

ghost commented Sep 27, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants