diff --git a/CHANGELOG.md b/CHANGELOG.md index 35133aa0..ca817b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 1.7.0 (2021-06-25) + +* Feature: Update DNS `Factory` to accept complete `Config` object. + Add new `FallbackExecutor` and use fallback DNS servers when `Config` lists multiple servers. + (#179 and #180 by @clue) + + ```php + // old (still supported) + $config = React\Dns\Config\Config::loadSystemConfigBlocking(); + $server = $config->nameservers ? reset($config->nameservers) : '8.8.8.8'; + $resolver = $factory->create($server, $loop); + + // new + $config = React\Dns\Config\Config::loadSystemConfigBlocking(); + if (!$config->nameservers) { + $config->nameservers[] = '8.8.8.8'; + } + $resolver = $factory->create($config, $loop); + ``` + ## 1.6.0 (2021-06-21) * Feature: Add support for legacy `SPF` record type. diff --git a/README.md b/README.md index 05266ca8..385992c1 100644 --- a/README.md +++ b/README.md @@ -429,7 +429,7 @@ This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require react/dns:^1.6 +$ composer require react/dns:^1.7 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.