Here's a little Doctrine ORM tip to safeguard your business logic when dealing with collections.
Here's why you should consider throwing exceptions in your repositories.
It really irks me when I see some design/architecture decisions other developers have made but there's no technical explanation. What packages did they use? What challenges did they face? What trade-offs were made?
I'll go over some more specifics in this post.
One of the biggest struggles for me, as an app developer, is coming up with an architecture that I'm happy with. It's something I wish other developers talked about more often. I thoroughly enjoyed Kris Wallsmith's SymfonyCon talk. It's very raw and real and doesn't come across as him talking down to anyone at all. Do I agree with everything he says? No, but that's not a bad thing. It's very insightful and I really enjoy taking a peak behind the curtains and seeing how other people do things.
This is my attempt at doing just that. What I'm going to say isn't unique to me but rather me stealing a bunch of good ideas from several developers smarter than me. I want give a big thanks to Mathias Varraes. He's got it figured out and happily helps me sort things out in the DDDinPHP forum. His blog is also chock-full of awesome posts.