-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Proposal for a code documentation #15
Comments
It would definitely help, but I see two problems:
Are there any other ideas or suggestions how we can get an IDE support for helpers from other components? Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
I like the idea to add a description of all the helpers (and i18n helpers too) to the 'Renderer/PhpRenderer.php' file Originally posted by @Sohorev at zendframework/zend-view#102 (comment) |
Agree with @froschdesign. It is also massively misleading, giving impression that the components are already available. I will try to use them, since IDE says they are there, and then get service manager errors about components not existing. This contradictory behavior will not be obvious to solve where the problem is. It is also a mild problem with custom view helpers. An off the wall propositions, I hope I won't get stoned for, is to maybe take advantage of composer installer that will automatically add/subtract methods from some interface in a writable directory. Custom view component, or zend\view, can implement interface from somewhere like approot\data\ViewInterface. (needed namespace and autoloading configurations added). As new composer package is installed that has view helpers, it adds another method to that interface. Users of the interface, then have proper up to date knowledge of what is available. Originally posted by @alextech at zendframework/zend-view#102 (comment) |
Phalcon Framework has additional class-empty structures to help IDE with code completion, called "ide-stubs". https://github.com/phalcon/ide-stubs We can create, another project, called "zend-view-stubs", or something, to add this feature into IDEs. Originally posted by @wandersonwhcr at zendframework/zend-view#102 (comment) |
One thing I did is defining all On 2 May 2017 17:36, "Wanderson Camargo" [email protected] wrote:
Originally posted by @Ocramius at zendframework/zend-view#102 (comment) |
I don't believe you're telling this, @Ocramius! LOL Originally posted by @wandersonwhcr at zendframework/zend-view#102 (comment) |
I also use traits for zend-form and zend-i18n. @weierophinney Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
@froschdesign Sure, but the question is: how do these traits then get composed into the I think there are still questions to be answered... Originally posted by @weierophinney at zendframework/zend-view#102 (comment) |
@weierophinney <?php
/**
* @var \Zend\View\Renderer\PhpRenderer $this
*/ With the new traits: <?php
/**
* @var \Zend\View\Renderer\PhpRenderer|\Zend\Form\View\HelperTrait|\Zend\I18n\View\HelperTrait $this
*/ Depending on which components are in use. Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
Oh, I see - the traits go in the view scripts. Yes, go for it! Don't forget to add documentation for this as well, so folks know what they need to do in order to enable these IDE-centric features. Originally posted by @weierophinney at zendframework/zend-view#102 (comment) |
We should add an explanation with a code example in the documentation and also a description in the DocBlock of each trait. Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
What is the status of this issue? Originally posted by @thexpand at zendframework/zend-view#102 (comment) |
No, but the label "help wanted" is still present. 😉 Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
@froschdesign Originally posted by @thexpand at zendframework/zend-view#102 (comment) |
@thexpand Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
Btw. Thanks in advance. 👍 Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
@froschdesign Originally posted by @thexpand at zendframework/zend-view#102 (comment) |
Right, because without any explanation no one knows why these traits are there. Originally posted by @froschdesign at zendframework/zend-view#102 (comment) |
@froschdesign Originally posted by @thexpand at zendframework/zend-view#102 (comment) |
Fixed with #188 |
I propose to add the following lines to the 'Renderer/PhpRenderer.php' file
This will add IDE autocomplete for form helpers
Originally posted by @Sohorev at zendframework/zend-view#102
The text was updated successfully, but these errors were encountered: