phpstan/phpstan-symfony

Stubs overruling actual interface ?

alcohol opened this issue · 2 comments

Maybe I am missing something in configuration or documentation, but the application I maintain has a User entity that implements LegacyPasswordAuthenticatedUserInterface, thus including the PasswordAuthenticatedUserInterface it has both the getSalt() and getPassword() methods. But phpstan complains about using these methods:

  57     Call to an undefined method Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface::setPassword().  
  58     Call to an undefined method Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface::setSalt().  

I'm an idiot. They only declare getters, not setters. Sigh.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.