PhpStorm 2017.1.2 / Symfony 3.2.7 autocomplete issuse

Recently I upgraded to PhpStorm 2017. After the upgrade the IDE will no long autocomplete when using $this->get() to retrieve connections from config_dev.yml. The IDE also sees the connection as invalid when I type it in manually and shows the associated methods as not found in class. I have verified that the code works as expected which is why I have deduced that this is a problem with the IDE itself.

Please advise. 

0
3 comments
Avatar
Permanently deleted user

Hello,

Could you provide a code sample where this issue could be reproduced, please?

0
Avatar
Permanently deleted user
protected function getFirstName($buyer_id)
{
$conn = $this->get('doctrine.dbal.default_connection');

$nameSQL = "SELECT first_name FROM users_2 WHERE id = :id";
$nameStatement = $conn->prepare($nameSQL);
$nameStatement->bindValue('id', $buyer_id);
$nameStatement->execute();
$nameResult = $nameStatement->fetch();

$response = $nameResult['first_name'];

return $response;
}
0

Do you have a "get" method in this file (is it src/Bsys/AppBundle/Document/User.php?)?

 

0

Please sign in to leave a comment.