Closed wpillar closed 10 years ago
Looks pretty solid to me, so I'm happy. It lacks tests, but so does the rest of the library at the minute so I'm not too fussed.
I'll add it to my list of things.
Ta. Yeh wasn't sure what the deal was with tests. Looked like it would be quite a complex mocking tree/graph/chain for the proxy stuff.
Do you think we should check the type of the new collection?
i.e check it extends Doctrine\Common\Collections\ArrayCollection
?
Not a big deal just now, but I might add an issue to that effect.
I wondered about that. Is there anywhere DAL depends on it being ArrayCollection
? I guess it depends on being able to inject an array of stuff into the constructor, so maybe it should check the type of it.
This means that configuration for an entity relationship can define a custom collection class:
The
collection
attribute can either be a string with the class name for the custom collection or boolean to default to theDoctrine\Common\Collections\ArrayCollection
.