Monthly Archives: October 2020

Net_DNS2 v1.5.0 – Version Bump (requires >= PHP 5.4)

I’ve released version 1.5.0 of the Net_DNS2 library.

You can add it to your project using composer:

composer require pear/net_dns2

Or you can install it through the command line PEAR installer:

pear install Net_DNS2

Version 1.5.0

  • added the AMTRELAY resource record type (RFC 8777).
  • added Net_DNS2_RR::asArray(), which returns the same values as __toString(), but as an array for easier access.
  • added Net_DNS2::closeSockets(), which lets you close all cached network sockets in the resolver object.
  • added Net_DNS2::getSockets(), which returns the local sockets cache array.
  • added date_created and date_last_used to the Net_DNS2_Socket object, to track usage stats on each socket object.
  • added the SHA256, SHA384, and GOST digest defines to Lookups.php.
  • dropped the Net_DNS2_Socket_Sockets, and switch to just using the streams code. There’s no speed difference anymore.
  • fixed a bug in Net_DNS2_Packet::compress() and Net_DNS2_Packet::expand() related to dot literals in compressed names.
  • fixed a display issue in the IPSECKEY RR when displaying hostname / domain names in the gateway field.
  • fixed a couple inconsistencies in the docs.
  • fixed a PHP 7.4 bug in Sockets.php; accessing a null value as an array throws an exception now.
  • fixed Net_DNS2_RR_DS so it will be able to support other digest definitions without any other changes.
  • the Net_DNS2_RR_NIMLOC class was incorrectly named Net_DNS2_RR_NIMLOCK.
  • Net_DNS2_PrivateKey was using the wrong member variable name for the key_format value.
  • changed all references to array() to [].
  • removed all sorts of license noise from the files.
  • updated the test cases to use PHPUnit v9+.