-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Zend\I18n\View\Helper\AbstractTranslatorHelper dependency #50
Comments
Unfortunately, it won't. AbstractHelper also implements HelperInterface, which all helpers need to implement. So while you'd remove the need to extend the base helper from zend-view, you'd still have the dependency due to the interface. Originally posted by @weierophinney at zendframework/zend-form#41 (comment) |
Gack :| OK, so how about moving the core functionality to That should be possible without a BC break (me, eternal optimist ;) and could provide a path towards moving them over to zend-view in future (discoverability / fewer suggests, as discussed over at zendframework/zend-validator#1). Originally posted by @kynx at zendframework/zend-form#41 (comment) |
@kynx Originally posted by @pine3ree at zendframework/zend-form#41 (comment) |
I'm a newbie and this just bit me for a few minutes with a 26-level stack trace. Figured it out eventually, but should zendframework/zend-i18n be a composer dependency of zendframework/zend-form so that it gets brought in, until this issue is figured out by the big brains? Originally posted by @bitwombat at zendframework/zend-form#41 (comment) |
It is already there. See composer.json:
https://github.com/zendframework/zend-form/blob/master/composer.json#L46 Why suggest section in composer? Not everyone uses the view / output part of Originally posted by @froschdesign at zendframework/zend-form#41 (comment) |
Ah, got it. So I should have read the 'suggested' output from composer better. Thanks for the reply. Originally posted by @bitwombat at zendframework/zend-form#41 (comment) |
I am closing it. As stated, there is i18n component in suggest in composer.json |
@samsonasik |
@froschdesign ok, I re-open it. |
This is a follow-on from #32.
You cannot use the view helpers without requiring zend-view. This is because
Zend\Form\View\Helper\AbstractHelper
extendsZend\I18n\View\Helper\AbstractTranslatorHelper
, which in turn extendsZend\View\Helper\AbstractHelper
.I would like to break this dependency. After a quick scan it looks like implementing the
setView()
/getView()
/setTranslator()
/getTranslator()
methods in the abstract helper would do the trick. Would this be the right approach?Originally posted by @kynx at zendframework/zend-form#41
The text was updated successfully, but these errors were encountered: