Skip to content

ParameterBag get method autocomplete and warning #1706

Closed
@werwolf666

Description

@werwolf666

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions