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

Commit 97e1a68

Browse files
committed
Merging develop to master in preparation for 2.10.0 release
2 parents 804b503 + 31e1d0b commit 97e1a68

File tree

17 files changed

+246
-86
lines changed

17 files changed

+246
-86
lines changed

.travis.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@ sudo: false
22

33
language: php
44

5-
branches:
6-
except:
7-
- /^release-.*$/
8-
- /^ghgfk-.*$/
9-
105
cache:
116
directories:
127
- $HOME/.composer/cache
13-
- $HOME/.local
14-
- zf-mkdoc-theme
158

169
env:
1710
global:
@@ -20,11 +13,6 @@ env:
2013
- COVERAGE_DEPS="php-coveralls/php-coveralls"
2114
- LEGACY_DEPS="phpunit/phpunit"
2215
- LATEST_DEPS="zendframework/zend-mvc-plugin-flashmessenger zendframework/zend-mvc-i18n zendframework/zend-mvc-console"
23-
- SITE_URL=https://zendframework.github.io/zend-view
24-
- GH_USER_NAME="Matthew Weier O'Phinney"
25-
26-
- GH_REF=github.com/zendframework/zend-view.git
27-
- secure: "kF7z5CxnrD/lsX9sP1+SYLKm1HdT/u1F0xovlyT9fDWrz+X4DBe8Oybzk6UX5HKXQvdhVTfAbHoWhFxFrkcRKrtaEOltk68bYFgnSOYhrK5EhZz6CHqN2j1MtT6FRfdlSOi6OECvCE3wd8nYHixxEviIZyB3L5+H39FOiu5Zi+eJT/myp6IuBO6lQfnSgqKdvuQXlfWSn9VGQJztX6ea2U89eM/TAVWEwbhLAJOsOejkvAy2lvYhIZpvSEkFm9jSp3/JOw8MFljG8UEDZUkpj+zba5/vqzM8thTTbybhAIBF7wNeMNrAeFBnrPz5KDPEQYYG8NG4we6F7GvbevvBz+ej5OJPXx/ulhMiEWKN1qEmQHZ3Gl0kG0O+TgXfqLErbCNn4MLP/K0Avar03m9bvXtaTA5Yqde0rIdspjwdxmKi0OI76UnGETMDyWuXbHkRfhs54sUEOBUdM3dz5lXhlSWPCTlQCgzkVqlgTL5b8b1u7YKpkwJAFSXMhhJBycFCNCfqAy10l2wjgvhXhLgPHle7sSwYR6SMVzkjj59P1UKc2yrxkwl/S7cqrbaeGSGjDv/QVMLtBL3OLqXwIaKy3POF2gQJhFXdrmGzDOADyCbEXVUYve5pQOmT1RdVHaHiT7AmZXEQibR1DW2zzU9eX94XpK9LKzlSzUOtYT8LNNA="
2816

2917
matrix:
3018
include:
@@ -34,9 +22,6 @@ matrix:
3422
- php: 5.6
3523
env:
3624
- DEPS=locked
37-
- TEST_COVERAGE=true
38-
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
39-
- PATH="$HOME/.local/bin:$PATH"
4025
- php: 5.6
4126
env:
4227
- DEPS=latest
@@ -46,6 +31,8 @@ matrix:
4631
- php: 7
4732
env:
4833
- DEPS=locked
34+
- CS_CHECK=true
35+
- TEST_COVERAGE=true
4936
- php: 7
5037
env:
5138
- DEPS=latest
@@ -58,25 +45,18 @@ matrix:
5845
- php: 7.1
5946
env:
6047
- DEPS=latest
61-
- php: hhvm
48+
- php: 7.2
6249
env:
6350
- DEPS=lowest
64-
- php: hhvm
51+
- php: 7.2
6552
env:
6653
- DEPS=locked
67-
- php: hhvm
54+
- php: 7.2
6855
env:
6956
- DEPS=latest
70-
allow_failures:
71-
- php: hhvm
72-
73-
notifications:
74-
irc: "irc.freenode.org#zftalk.dev"
75-
email: false
7657

7758
before_install:
7859
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
79-
- composer self-update
8060

8161
install:
8262
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
@@ -85,15 +65,14 @@ install:
8565
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
8666
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
8767
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
88-
- composer show --installed
68+
- stty cols 120 && composer show
8969

9070
script:
9171
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
9272
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
93-
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
94-
95-
after_success:
96-
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
9773

9874
after_script:
9975
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi
76+
77+
notifications:
78+
email: false

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
All notable changes to this project will be documented in this file, in reverse chronological order by release.
44

5+
## 3.0.0 - TBD
6+
7+
### Added
8+
9+
- [#135](https://github.com/zendframework/zend-view/pull/135) adds support
10+
for PHP 7.2.
11+
12+
- [#138](https://github.com/zendframework/zend-view/pull/138) adds support for
13+
the HTML5 "as" attribute to the `HeadLink` helper. This can be used to help
14+
prioritize resource loading.
15+
16+
- [#139](https://github.com/zendframework/zend-view/pull/139) adds two new
17+
methods to the `Zend\View\Helper\Gravatar` class: `setAttributes()` and
18+
`getAttributes()`.
19+
20+
### Changed
21+
22+
- [#133](https://github.com/zendframework/zend-view/pull/133) modifies the
23+
behavior the `placeholder()` helper to no longer render a prefix or postfix if
24+
no items are available in the container.
25+
26+
### Deprecated
27+
28+
- [#139](https://github.com/zendframework/zend-view/pull/139) deprecates the
29+
`Zend\View\Helper\Gravatar` methods `setAttribs()` and `getAttribs()` in favor
30+
of the new methods `setAttributes()` and `getAttributes()`, respectively.
31+
32+
### Removed
33+
34+
- [#135](https://github.com/zendframework/zend-view/pull/135) removes support
35+
for HHVM.
36+
37+
### Fixed
38+
39+
- Nothing.
40+
541
## 2.9.1 - 2018-01-17
642

743
### Added

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"zendframework/zend-permissions-acl": "^2.6",
4040
"zendframework/zend-router": "^3.0.1",
4141
"zendframework/zend-serializer": "^2.6.1",
42-
"zendframework/zend-session": "^2.6.2",
4342
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
43+
"zendframework/zend-session": "^2.8.1",
4444
"zendframework/zend-uri": "^2.5"
4545
},
4646
"suggest": {
@@ -70,6 +70,9 @@
7070
}
7171
},
7272
"autoload-dev": {
73+
"files": [
74+
"test/autoload.php"
75+
],
7376
"psr-4": {
7477
"ZendTest\\View\\": "test/"
7578
}

composer.lock

Lines changed: 23 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
<php>
2525
<ini name="date.timezone" value="UTC"/>
26+
<ini name="error_reporting" value="E_ALL"/>
27+
<ini name="max_execution_time" value="360"/>
2628

2729
<!-- OB_ENABLED should be enabled for some tests to check if all
2830
functionality works as expected. Such tests include those for

src/Helper/Gravatar.php

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Gravatar extends AbstractHtmlElement
4747
*
4848
* @var array
4949
*/
50-
protected $attribs;
50+
protected $attributes;
5151

5252
/**
5353
* Email Address
@@ -86,21 +86,21 @@ class Gravatar extends AbstractHtmlElement
8686
*
8787
* @see http://pl.gravatar.com/site/implement/url
8888
* @see http://pl.gravatar.com/site/implement/url More information about gravatar's service.
89-
* @param string|null $email Email address.
90-
* @param null|array $options Options
91-
* @param array $attribs Attributes for image tag (title, alt etc.)
89+
* @param string|null $email Email address.
90+
* @param null|array $options Options
91+
* @param array $attributes Attributes for image tag (title, alt etc.)
9292
* @return Gravatar
9393
*/
94-
public function __invoke($email = "", $options = [], $attribs = [])
94+
public function __invoke($email = "", $options = [], $attributes = [])
9595
{
9696
if (! empty($email)) {
9797
$this->setEmail($email);
9898
}
9999
if (! empty($options)) {
100100
$this->setOptions($options);
101101
}
102-
if (! empty($attribs)) {
103-
$this->setAttribs($attribs);
102+
if (! empty($attributes)) {
103+
$this->setAttributes($attributes);
104104
}
105105

106106
return $this;
@@ -168,28 +168,63 @@ public function getImgTag()
168168
{
169169
$this->setSrcAttribForImg();
170170
$html = '<img'
171-
. $this->htmlAttribs($this->getAttribs())
171+
. $this->htmlAttribs($this->getAttributes())
172172
. $this->getClosingBracket();
173173

174174
return $html;
175175
}
176176

177177
/**
178-
* Set attribs for image tag
178+
* Set attributes for image tag
179179
*
180-
* Warning! You shouldn't set src attrib for image tag.
181-
* This attrib is overwritten in protected method setSrcAttribForImg().
180+
* Warning! You shouldn't set src attribute for image tag.
181+
* This attribute is overwritten in protected method setSrcAttribForImg().
182182
* This method(_setSrcAttribForImg) is called in public method getImgTag().
183183
*
184+
* @param array $attributes
185+
* @return Gravatar
186+
*/
187+
public function setAttributes(array $attributes)
188+
{
189+
$this->attributes = $attributes;
190+
return $this;
191+
}
192+
193+
/**
194+
* Set attribs for image tag
195+
*
184196
* @param array $attribs
185197
* @return Gravatar
198+
*
199+
* @deprecated Please use Zend\View\Helper\Gravatar::setAttributes
186200
*/
187201
public function setAttribs(array $attribs)
188202
{
189-
$this->attribs = $attribs;
203+
trigger_error(sprintf(
204+
'%s is deprecated; please use %s::setAttributes',
205+
__METHOD__,
206+
__CLASS__
207+
), E_USER_DEPRECATED);
208+
209+
$this->setAttributes($attribs);
190210
return $this;
191211
}
192212

213+
/**
214+
* Get attributes of image
215+
*
216+
* Warning!
217+
* If you set src attribute, you get it, but this value will be overwritten in
218+
* protected method setSrcAttribForImg(). And finally your get other src
219+
* value!
220+
*
221+
* @return array
222+
*/
223+
public function getAttributes()
224+
{
225+
return $this->attributes;
226+
}
227+
193228
/**
194229
* Get attribs of image
195230
*
@@ -199,10 +234,18 @@ public function setAttribs(array $attribs)
199234
* value!
200235
*
201236
* @return array
237+
*
238+
* @deprecated Please use Zend\View\Helper\Gravatar::getAttributes
202239
*/
203240
public function getAttribs()
204241
{
205-
return $this->attribs;
242+
trigger_error(sprintf(
243+
'%s is deprecated; please use %s::getAttributes',
244+
__METHOD__,
245+
__CLASS__
246+
), E_USER_DEPRECATED);
247+
248+
return $this->getAttributes();
206249
}
207250

208251
/**
@@ -352,8 +395,8 @@ public function getSecure()
352395
*/
353396
protected function setSrcAttribForImg()
354397
{
355-
$attribs = $this->getAttribs();
356-
$attribs['src'] = $this->getAvatarUrl();
357-
$this->setAttribs($attribs);
398+
$attributes = $this->getAttributes();
399+
$attributes['src'] = $this->getAvatarUrl();
400+
$this->setAttributes($attributes);
358401
}
359402
}

0 commit comments

Comments
 (0)