Attempted to call an undefined method named "newInstance" of class "Swift_Message"

Actually while posting the question and linking to the documentation, I was surprised to see it was updated

Now it is

 $message = (new \Swift_Message('Hello Email'))

instead of

 $message = \Swift_Message::newInstance()
       ->setSubject('Hello Email')

since the release of swiftmailer6 according to the changelog

https://github.com/swiftmailer/swiftmailer/blob/master/CHANGES#L24

it's a pity there wasn't a "deprecated" period.