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

Undefined property Application::$request. #31

Closed
brendt opened this issue Jul 18, 2018 · 5 comments
Closed

Undefined property Application::$request. #31

brendt opened this issue Jul 18, 2018 · 5 comments

Comments

@brendt
Copy link

brendt commented Jul 18, 2018

Access to an undefined property Illuminate\Contracts\Foundation\Application::$request.

This is the calling code, in a service provider.

$this->app->request->getHost()
@brendt
Copy link
Author

brendt commented Jul 18, 2018

Same goes for array accesses on $app:

Cannot access offset 'docs.navigation' on Illuminate\Contracts\Foundation\Application.

The code:

$this->app['docs.navigation']

@nunomaduro
Copy link
Collaborator

@brendt Thanks again for reporting this false positive. 👍

This issue got fixed on the version v0.1.6. Do you mind of performing a composer update nunomaduro/larastan and test it again?

@brendt
Copy link
Author

brendt commented Jul 23, 2018

Hi Nuno, this issue still seems to be there in 0.2.0:

68     Cannot access offset 'docs.navigation' on Illuminate\Contracts\Foundation\Application.

@nunomaduro
Copy link
Collaborator

@brendt Hummmmmmm.

Do you mind of performing a composer update nunomaduro/larastan and double check it?

If the problem is still there: When docs.navigation is registered on the container? Seems to me that service is bound into the container outside to bootstrap life-cycle of laravel.

@brendt
Copy link
Author

brendt commented Jul 24, 2018

It's gone now, I'm on 0.2.3. FYI, the parameter was read from $this->app in the boot method of a service provider. Seems to work, so great! 🌟

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

No branches or pull requests

2 participants