2010/11/3 Tim Nagel <[email protected]>:
> Fair enough Bernhard - If PHP doesnt support a concept like AOP then we
> might not be able to achieve it, however you mention that it is possible
> with custom code?
>
> I'm already using NOTIFY change tracking in Doctrine2 which requires
> additional code in each setter, is it possible to potentially add more code
> to setters to handle this ability?

It might be. But there are still more problems to be solved:

* Delayed validation: If validation is called everytime in your setter
and requires expensive API calls, your whole application is slowed
down
* Contextual validation: Sometimes values can be valid or invalid
dependent on a context (f.i. "user logged in as admin/normal user"
etc.)
* Grouped validation: If different values are only valid in
combination (f.i. street, city, zip code), when do I validate them?
When the last value is set? Then I have an object with an incomplete
and invalid state.

The validator as it is now is based on JSR303 which has been in
development for two years, which means that many intelligent heads
tried to figure out how to solve exactly these problems. Any
ground-breaking changes we make to it mean we have to go through this
process again, ourselves.


Bernhard

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to