Factories vs new

Is there any scenario where you would choose to use the new keyword to create an object rather than a Factory via dependency injection? Someone I work with someone who instantiates some objects with new rather than factories.

For example, instead of generating a factory class with the TimezoneInterface that already exists in Magento, they use new DateTime(). I personally don’t really like doing this because it goes against Magento standards.

Perhaps I’m being overly critical of this or just haven’t considered valid reasons for doing it? Just looking for some other opinions!

submitted by /u/photocaster
[link] [comments]