@Phrlog How they're managed doesn't matter unless it is tightly coupled to a framework. In the scenario you described the "domain" entities happen to be saved via Doctrine. They're not doctrine entities, you can even have a map between your domain entities and doctrine. don't you agree?
@mateusjatenee I got it! But I was expecting the no-reference version to take more memory because it is copying the values, right? Or is it taken by the GC right after the foreach is ended?
@Aneurysm9 I have a question about AoC. Can I use the sample input on a blog post? I know it is not allowed to share the input, but the sample should be okay right? ref: https://t.co/4L79Il9jmx