Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: php

branches:
except:
- /^release-\d+\.\d+\.\d+.*$/
- /^release-.*$/
- /^ghgfk-.*$/

cache:
Expand Down Expand Up @@ -59,10 +59,19 @@ matrix:
- php: 7.1
env:
- DEPS=latest
- php: 7.2
env:
- DEPS=lowest
- php: 7.2
env:
- DEPS=locked
- php: 7.2
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update
- if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi

install:
- travis_retry composer install $COMPOSER_ARGS
Expand All @@ -81,7 +90,7 @@ after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi

notifications:
email: false
Expand Down
3 changes: 3 additions & 0 deletions src/Header/AbstractAddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public function getFieldName()
protected function idnToAscii($domainName)
{
if (extension_loaded('intl')) {
if (defined('INTL_IDNA_VARIANT_UTS46')) {
return (idn_to_ascii($domainName, 0, INTL_IDNA_VARIANT_UTS46) ?: $domainName);
}
return (idn_to_ascii($domainName) ?: $domainName);
}
return $domainName;
Expand Down
6 changes: 0 additions & 6 deletions test/Header/HeaderWrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,10 @@ public function testMimeDecoding()
public function testCanBeEncoded()
{
// @codingStandardsIgnoreStart
$name = 'Subject';
$value = "[#77675] New Issue:xxxxxxxxx xxxxxxx xxxxxxxx xxxxxxxxxxxxx xxxxxxxxxx xxxxxxxx, tähtaeg xx.xx, xxxx";
$encoded = "Subject: =?UTF-8?Q?[#77675]=20New=20Issue:xxxxxxxxx=20xxxxxxx=20xxxxxxxx=20?=\r\n =?UTF-8?Q?xxxxxxxxxxxxx=20xxxxxxxxxx=20xxxxxxxx,=20t=C3=A4htaeg=20xx.xx,=20xxxx?=";
// @codingStandardsIgnoreEnd
//
$res = HeaderWrap::canBeEncoded($value);
$this->assertTrue($res);

$header = new GenericHeader($name, $value);
$res = $header->toString();
$this->assertEquals($encoded, $res);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This last setup/assertion check is just a proxy for a call to zend-mime, that is affected by #183 (comment)
Is this really necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this check, build fails only on PHP 7.2 with lowest/locked dependencis because of old zend-validator.
Latest depencencies on PHP 7.2 are fine.

}
}