Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

FilterPluginManager returns NumberFormat view helper instead of filter #23

Closed
bacinsky opened this issue Feb 5, 2016 · 1 comment
Closed

Comments

@bacinsky
Copy link
Contributor

bacinsky commented Feb 5, 2016

What a mistake!

This commit introduces NumberFormat view helper instead of filter into the FilterPluginManager:
a053cea

So view helper is returned instead of filter:
https://github.com/zendframework/zend-filter/blob/master/src/FilterPluginManager.php#L16
https://github.com/zendframework/zend-filter/blob/master/src/FilterPluginManager.php#L263

The validate method of FilterPluginManager is useless in this case, because it checks for interface and if it not pass it checks for callable, but this breaks the contract because the callable doesn't implement the FilterInterface, so the filter method cannot be called.
https://github.com/zendframework/zend-filter/blob/master/src/FilterPluginManager.php#L332

@weierophinney
Copy link
Member

What a mistake!

Please recognize that all of us contributing are a) human and b) fallible when you open issues. I was, and still am, tempted to delete the issue based on this, as it's disrespectful to everyone involved. If you're unsure how to word issues, try the following: "Such-and-such commit has led to the following situation ...", which makes no judgment on those who have contributed, and instead only calls out the problem.

I will create a patch and an updated release shortly.

weierophinney added a commit to weierophinney/zend-filter that referenced this issue Feb 8, 2016
weierophinney added a commit that referenced this issue Feb 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants