doctrine/collections — pull request #10 by bakura10 (2013-04-16 14:25:58+00:00)
Title: Add support for extracting data through Reflection

Hi,

This was a needed change when dealing with Doctrine ORM Collection. If the collection is not initialized, Doctrine ORM correctly does the matching through SQL, but once it is initialized, it uses the Common ClosureExpressionVisitor and fails if the property is not accessible.

I know the visitor try to get data through getter setter, but one of my property is called "isDeleted", so I need to do something like that: expr()->eq('deleted', true), otherwise if I match my property name, the visitor try to call isisdeleted, which obviously does not exist.

Concerning the implementation, I need to do both the property_exists and Reflection, because otherwise it breaks two tests that use stdClass (it seems that PHP does not consider stdClass has properties with ReflecitonProperty, although property_exists work as expected, must be a bug from PHP ?).