Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af44670353 | ||
|
|
0bd3525938 | ||
|
|
c3f8424785 | ||
|
|
040aebe993 |
@@ -11,12 +11,10 @@ cache:
|
||||
- vendor
|
||||
|
||||
install:
|
||||
- phpenv config-rm xdebug.ini
|
||||
- composer self-update
|
||||
- phpenv config-rm xdebug.ini || true
|
||||
- composer config --global discard-changes true
|
||||
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer require --dev --no-update phpunit/phpunit ^4; fi
|
||||
- composer require satooshi/php-coveralls dev-master --dev --no-update
|
||||
- composer update --ignore-platform-reqs
|
||||
- composer update
|
||||
- composer require satooshi/php-coveralls dev-master --dev
|
||||
- composer show --installed
|
||||
|
||||
script:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"symfony/yaml": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5",
|
||||
"phpunit/phpunit": "^4|^5",
|
||||
"friendsofphp/php-cs-fixer": "^1.9",
|
||||
"macfja/phar-builder": "^0.2.5"
|
||||
},
|
||||
|
||||
@@ -194,7 +194,13 @@ class Issue implements Command {
|
||||
}
|
||||
|
||||
if (!empty($errors)) {
|
||||
throw new AcmeException("Couldn't resolve the following domains to an IPv4 nor IPv6 record: " . implode(", ", array_keys($errors)));
|
||||
$failedDomains = implode(", ", array_keys($errors));
|
||||
$reasons = implode("\n\n", array_map(function ($exception) {
|
||||
/** @var \Exception|\Throwable $exception */
|
||||
return get_class($exception) . ": " . $exception->getMessage();
|
||||
}, $errors));
|
||||
|
||||
throw new AcmeException("Couldn't resolve the following domains to an IPv4 nor IPv6 record: {$failedDomains}\n\n{$reasons}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Kelunik\AcmeClient\Commands;
|
||||
|
||||
use Amp\CoroutineResult;
|
||||
use Amp\Dns\NoRecordException;
|
||||
use Amp\Dns\Record;
|
||||
use Amp\Dns\ResolutionException;
|
||||
use InvalidArgumentException;
|
||||
@@ -80,8 +81,10 @@ class Setup implements Command {
|
||||
|
||||
try {
|
||||
yield \Amp\Dns\query($host, Record::MX);
|
||||
} catch (ResolutionException $e) {
|
||||
} catch (NoRecordException $e) {
|
||||
throw new AcmeException("No MX record defined for '{$host}'");
|
||||
} catch (ResolutionException $e) {
|
||||
throw new AcmeException("Dns query for an MX record on '{$host}' failed for the following reason: " . $e->getMessage(), null, $e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user