pear/net_dns2
Net_DNS2 is a pure-PHP DNS resolver for querying A, AAAA, MX, NS, TXT, SRV, SOA and other records over UDP or TCP. It supports IPv4/IPv6, custom nameservers, caching, and detailed response objects, so PHP apps can perform DNS lookups without external extensions.
Architecture fit
pear/net_dns2 is a low-level, synchronous PHP DNS resolver, not a Laravel package. It fits as an infrastructure adapter behind an application-owned DnsResolverInterface, not as a direct dependency in controllers or domain logic.Integration feasibility
pear/net_dns2, but the package uses PEAR-style class names (Net_DNS2_*) and may require explicit autoload/classmap handling rather than PSR-4 assumptions.Technical risk
Key questions
dns_get_record, or adopt a maintained resolver?Stack fit
App\Contracts\DnsResolver with methods such as resolveA, resolveMx, and resolveTxt.NetDns2Resolver behind that contract. Bind it in AppServiceProvider and expose only application-specific result objects, not raw Net_DNS2_* response objects.config/dns.php for nameservers, timeout, retries, cache TTL, and allow-list/deny-list behavior.Migration path
dns_get_record behind the same interface for fallback and comparison testing.Compatibility
require in the adapter only.Sequencing
Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?