title: Should the new keyword be avoided in favour of another pattern (for example factory)?
body: <p><a href="https://www.youtube.com/watch?v=-FRm3VPhseI" rel="nofollow noreferrer">This video</a> from Google's clean code talks says <code>new</code> is bad for testing, which looks plausible at first sight.</p>
  
  <p>What would be a good practice for PHP? Should I create a factory class to instantiate different object types with a method for each one, allowing loose coupling? Or would a generic initialization method (auto loader?) with a single method to init <code>new</code> instances be more suitable, although the latter has no return type specified, which leaves the code completion of an IDE in the dark.</p>