-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
ParameterBag get method autocomplete and warning #1706
Comments
Hi, if you use this class is the same problem: 'mising service' |
I'm experiencing this too, and would love a solution. |
@Haehnchen I'd love to hear your feedback on this if you have time. Thanks in advance :) |
same for Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface |
Please add support parameters for:
|
#1706 fix method references and multi resolve
#1706 add support for ParameterBagInterface
It works like a charm! THX!) |
Mmm... for the class Not working for me. 😥 |
#1706 support "ContainerBagInterface"
Hi, I tried, but I don't know. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
private ParameterBagInterface $parameterBag;
//...
$token = $this->parameterBag->get('app.token'); But, this don't work: use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
private ContainerBagInterface $containerBag;
//...
$token = $this->containerBag->get('app.token'); In my services.yaml: parameters:
app.token: '%env(TOKEN)%' Thx. Saludos. |
If we use object $parameterBag that implements
Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
and write $parameterBag->get('some_name') we have not correct behaviour.
If 'some_name' is name of service all works fine: this value could be autocompleted and Phpstorm not show warnings.
But if 'some_name' is name of parameter Phpstorm can't find this value: it not exists in autocomplete variants and Phpstorm show warning 'Missing Service'.
PhpStorm 2021.2.1 build PS-212.5080.71
Plugin version 0.23.212
Symfony 5.2.14
The text was updated successfully, but these errors were encountered: