-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
ServiceProvider autocomplete on $this->app no longer working in a package. #26060
Comments
Can we solve this by specifying both the class and the interface? @var \Illuminate\Contracts\Foundation\Application|\Illuminate\Foundation\Application |
Hmm, yeah that would solve it as well. |
That would be a temporary fix until the missing methods get added to the interface. /cc @TBlindaruk |
TBlindaruk
added a commit
to TBlindaruk/laravel-framework
that referenced
this issue
Oct 10, 2018
Fixed autocomplete for cases when someone developed a packages Fixed ticket: laravel#26060
@Voziv ,I have created a PR for this |
taylorotwell
pushed a commit
that referenced
this issue
Oct 10, 2018
Fixed autocomplete for cases when someone developed a packages Fixed ticket: #26060
taylorotwell
pushed a commit
to illuminate/support
that referenced
this issue
Oct 10, 2018
Fixed autocomplete for cases when someone developed a packages Fixed ticket: laravel/framework#26060
@Voziv , Changes are merged to 5.7. The issue will be fixed with a next release; |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
5.7.9
7.2.10-0ubuntu0.18.04.1
N/A
Description:
In the PR #25830 the phpdoc was changed from the contract to the concrete implemention.
In my laravel package I'm requiring
"illuminate/support": "^5.7"
in mycomposer.json
. With this update I no longer have any code completion on$this->app
in my service providers.Should I be depending on a different package? Is my laravel package supposed to depend on the whole framework instead?
For now I've worked around by overriding
protected $app
to add the old phpdoc back in.From what I understand the reason this change was made is because the concrete implementation has methods that are not in the interface. Should the interface not be updated with the methods that are missing?
Here's my service provider for reference: https://github.com/ratehub/laravel-newrelic/blob/dev/src/RateHub/NewRelic/Providers/NewRelicServiceProvider.php#L27
Steps To Reproduce:
"illuminate/support": "5.7.9"
Illuminate/Support/ServiceProvider
3.. Attempt to autocomplete
$this->app
The text was updated successfully, but these errors were encountered: