theseer/fdomdocument
Archived PHP library extending DOMDocument to throw exceptions instead of warnings/notices, plus handy shortcuts like XPath query helpers and appendElement variants. Drop-in replacement for DOM with libxml support; works with PHP 5.3.3–8.1 (v1.6.7).
queryOne(), select(), and appendElement(). Aligns with Laravel’s emphasis on developer productivity.fDOMException), enabling better logging (e.g., Laravel’s Log::error()) and CI/CD pipeline compliance (fail on warnings).__toString support). Useful for migrating monolithic apps to newer PHP versions incrementally.try-catch blocks for malformed responses).createElement throws exceptions on failure).saveHTML().Log::error() integration).assertEquals('foo', $dom->queryOne('//child')->getAttribute('name'))).Log facade).select()) to simplify DOM queries without adding dependencies like Symfony/CSSSelector.createElement throws exceptions on failure).php-dom or symfony/dom.Str::of() for HTML parsing) or third-party libraries like Guzzle/Symfony that handle DOM internally.DOMDocument warnings/notices.For Executives:
"This package lets us replace noisy PHP warnings with structured exceptions for DOM operations—critical for production stability and CI/CD compliance. It also cuts developer time by 30%+ with shortcuts like CSS selectors and queryOne(), while supporting our legacy PHP stack. Low risk: archived but battle-tested (used in 247+ repos). Ideal for web scraping, report generation, or API response transformations in Laravel. Trade-off: no future updates, but perfect for short-to-medium-term gains."
For Engineering:
select() method for jQuery-like syntax ($dom->select('.class')), reducing dependency on Symfony/CSSSelector.appendElement(), saveHTML() on nodes, and __toString support reduce boilerplate.DOMDocument for fDOMDocument with minimal code changes (e.g., new TheSeer\fDOM\fDOMDocument()).Log::error()), testing (PHPUnit assertions), and service providers.try-catch blocks).Symfony/DomCrawler) if long-term support is needed.DOMDocument: Lower risk but lacks convenience methods and exception handling.Symfony/DomCrawler: More feature-rich (e.g., jQuery-like selectors) but heavier dependency.php-dom: Active alternative with modern PHP support but different API design.How can I help you explore Laravel packages today?