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

Add helper trait to provide type-hinting for zend-view #102

Merged
merged 12 commits into from
Nov 18, 2019

Conversation

thexpand
Copy link
Contributor

In favor of the following proposal:
zendframework/zend-view#102

@thexpand
Copy link
Contributor Author

@froschdesign
Travis build has failed with something like a timeout? Is there anything that we can do to re-run it or something?

src/View/HelperTrait.php Outdated Show resolved Hide resolved
src/View/HelperTrait.php Outdated Show resolved Hide resolved
src/View/HelperTrait.php Outdated Show resolved Hide resolved
src/View/HelperTrait.php Outdated Show resolved Hide resolved
src/View/HelperTrait.php Show resolved Hide resolved
@froschdesign
Copy link
Member

This is an important enhancement for developers and should be mentioned in the documentation.

@froschdesign
Copy link
Member

@thexpand thexpand changed the base branch from master to develop September 5, 2018 08:38
@thexpand
Copy link
Contributor Author

thexpand commented Sep 5, 2018

@froschdesign The IntlDateFormatter class is used, but the ext-intl extension is not required in composer.json. The whole repository uses it, actually, so I think it's a good idea to add it (maybe in another PR, because it is a breaking change?)

@froschdesign
Copy link
Member

@thexpand
Already there as suggestion:

zend-i18n/composer.json

Lines 33 to 34 in c6c465a

"suggest": {
"ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP",

@thexpand
Copy link
Contributor Author

thexpand commented Sep 5, 2018

@froschdesign
I suggest adding the documentation as a sub-section of the main section View Helpers. We could name the sub-section: Auto-completion in templates or IDE auto-completion in templates.
Which place do you think will be more appropriate - at the top or at the bottom of the view helpers?
https://docs.zendframework.com/zend-i18n/view-helpers/

@froschdesign
Copy link
Member

froschdesign commented Sep 5, 2018

@thexpand

Which place do you think will be more appropriate - at the top or at the bottom of the view helpers?

At the top. (Later we will split the entire page and then we can also add an introduction like in other components,)

@thexpand
Copy link
Contributor Author

@froschdesign
I've added the documentation. Can you take a look so that I can copy-paste it to the other repositories' PRs for the HelperTrait?

Copy link
Member

@froschdesign froschdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! 👍

Only 3 small changes. Thanks!

@@ -7,6 +7,29 @@ displaying translated content.
See the [zend-view helpers documentation](http://framework.zend.com/manual/current/en/modules/zend.view.helpers.html#zend-view-helpers)
for more information.

## IDE auto-completion in templates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, we should set the entire section as a blockquote.

> ### IDE auto-completion in templates
>
> The `Zend\I18n\View\Helper\HelperTrait` trait can be used to provide...

The headline is then marked up with ###.

auto-completion for modern IDEs. It defines the aliases of the view helpers in a
DocBlock as `@method` tags.

### Usage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This headline gets the level of 4.

@thexpand
Copy link
Contributor Author

thexpand commented Sep 12, 2018

I have moved it in a block quote and applied the headings indentation - looks better now 👍

@froschdesign froschdesign added this to the 2.10.0 milestone Sep 19, 2019
weierophinney added a commit that referenced this pull request Nov 18, 2019
Add helper trait to provide type-hinting for zend-view
weierophinney added a commit that referenced this pull request Nov 18, 2019
@weierophinney weierophinney merged commit fa2136b into zendframework:develop Nov 18, 2019
@weierophinney
Copy link
Member

Thanks, @thexpand!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants