-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
@@ -195,4 +162,34 @@ public function removeFilter($name) | |||
{ | |||
return $this->filterComposite->removeFilter($name); | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change order of methods for no reason: it just scrambles the diffs
@weierophinney I see no reason in having the default strategy used like that - it's just useless overhead in this case (and quite a lot). For the interface, I think the PR is still WIP and is missing the real reason to exist :) |
Same conclusion, I tried to understand the reason behind this but I cannot see it. The strategy is not pulled from service locator so there isn't even the advantage of being able to override a default strategy globally. The overhead is not worthwhile imho. I'll wait for @mouhamed to explain it :). |
Hi all, thx u for your reviews, there is two changes : @Ocramius There is no reason for the order change, it result perhaps from a luckless copy/paste ;) |
@mouhamed can you please separate the two changesets then, so that each of your requested changes gets its own review? |
Isn't the FilterProviderInterface (https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php) enough
Well, the main problem is that it adds a lot of overhead for nothing. The hydrator has already grow to the point that it is quite slow, adding this kind of thing does not bring enough interest to justify the loss in performance. I think it's best, if you need a custom strategy for all fields by default, you can use the wildcard strategy. For ZF3 I'd be in favor to keep a very lightweight hydrator as abstract, and find another mechanism to extend it. The filter thing is already a performance hunger, and I think I never used it once. |
No description provided.