False negative with SwiftMailer
Hi Luka :-) not entirely sure how best to troubleshoot this with you, but am getting false negatives with SwiftMailer.
Output:
✖ Name: \Swift_Message::newInstance($emailMessage->getSubject()) in src/service/MailerAdapter.php:27
Expression \Swift_Message::newInstance($emailMessage->getSubject()) calls function Swift_Message::newInstance.
Function Swift_Message::newInstance not found.
Rule documentation: https://gitlab.com/phlint/phlint/blob/master/documentation/rule/name.md
✖ Name: \Swift_Attachment::fromPath($emailMessage->getAttachment()) in src/service/MailerAdapter.php:35
Expression \Swift_Attachment::fromPath($emailMessage->getAttachment()) calls function Swift_Attachment::fromPath.
Function Swift_Attachment::fromPath not found.
Rule documentation: https://gitlab.com/phlint/phlint/blob/master/documentation/rule/name.md
✖ Name: \Swift_SendmailTransport::newInstance() in src/service/MailerAdapter.php:38
Expression \Swift_SendmailTransport::newInstance() calls function Swift_SendmailTransport::newInstance.
Function Swift_SendmailTransport::newInstance not found.
Rule documentation: https://gitlab.com/phlint/phlint/blob/master/documentation/rule/name.md
✖ Name: \Swift_Mailer::newInstance(\Swift_SendmailTransport::newInstance()) in src/service/MailerAdapter.php:38
Expression \Swift_Mailer::newInstance(\Swift_SendmailTransport::newInstance()) calls function Swift_Mailer::newInstance.
Function Swift_Mailer::newInstance not found.
Rule documentation: https://gitlab.com/phlint/phlint/blob/master/documentation/rule/name.md
SwiftMailer is a dependency in composer.json, and the files it mentions are present, and the methods - accordingly - do exist. A case in point: the code is in production and it works.
It seems strange that phlint would have an issue with one lib, so quite bamboozling. But have to admit have spent no time troubleshooting it.
Cheers.