zendframework/zendxml
ZendXml provides secure XML scanning/loading for PHP to help prevent XXE and XML entity expansion (XEE) attacks. It disables external entity loading and rejects documents using ENTITY declarations, returning SimpleXMLElement or DOMDocument. Repository abandoned; moved to laminas/laminas-xml.
Security::scanHtml()) improves handling of mixed XML/HTML payloads, critical for systems integrating with legacy web services or legacy HTML-based APIs (e.g., older CMS exports, government portals, or enterprise intranets).scanHtml() method adds targeted HTML sanitization, reducing XSS risks when parsing untrusted XML containing embedded HTML fragments (e.g., SOAP responses with HTML error messages or partner APIs returning mixed content).scanHtml() extends the package’s utility for edge cases, justifying its continued use as a stopgap during migration to modern JSON/GraphQL stacks—especially for systems where XML/HTML interoperability is unavoidable.Avoid if:
SimpleXML, DOMDocument) for new projects.masterminds/html5 for HTML-specific needs.SimpleXML or XMLReader—this package’s added scanHtml() method may introduce overhead for high-throughput scenarios.w3c/php-xmlschema or php-soap extension instead.Look elsewhere if:
masterminds/html5 or symfony/dom-crawler for HTML-specific tasks.SimpleXML or DOMDocument may suffice.spatie/array-to-xml for lightweight XML generation.For Executives:
*"This updated package now includes a security-focused HTML scanning method (Security::scanHtml()), which is a game-changer for systems handling XML payloads with embedded HTML—common in legacy integrations (e.g., government APIs, enterprise SOAP services, or CMS exports). By adopting this, we:
For Engineering:
*"The 1.2.0 release adds Security::scanHtml(), which enables safe parsing of XML containing HTML fragments—a critical feature for:
Key Benefits:
Trade-offs:
scanHtml() against DOMDocument for high-volume use cases.spatie/array-to-xml or custom logic as we deprecate XML.Recommendation: Use this package for XML/HTML hybrid scenarios, but:
scanHtml().masterminds/html5 for dedicated HTML needs if this package’s security model proves insufficient."*How can I help you explore Laravel packages today?