veewee/xml
Type-safe, declarative XML toolkit for PHP. Includes DOM helpers, safe error handling, memory-safe reader/writer, XML encode/decode, plus XSD and XSLT utilities. Spec-compliance ready for PHP 8.4+, with maintained v3 for older PHP.
SimpleXML, DOMDocument) by introducing security-focused configurators like disallow_doctype(), which aligns with modern XML security best practices (e.g., preventing DOCTYPE-based attacks like XXE).libxml_disable_entity_loader()) to mitigate XXE vulnerabilities.disallow_doctype() to CI/CD templates for XML generation pipelines to enforce security-by-default.disallow_doctype() requires PHP 8.2+)."This update adds a critical security layer to our XML handling: the ability to block DOCTYPE declarations entirely, eliminating a common attack vector (XXE) in XML processing. For example, if we generate XML for APIs or parse user-uploaded templates, this feature closes a gap in our security posture without sacrificing functionality. It’s a low-effort, high-impact upgrade that aligns with our compliance goals and reduces risk in XML-heavy workflows like EDI or report generation."
*"New in 4.12.0: The disallow_doctype() configurator lets you disable DOCTYPE declarations during XML generation, which is a best practice for security. Use it like this:
$xml = Xml::element('root')
->configure(XmlConfig::disallow_doctype()) // Blocks DOCTYPE entirely
->addElement('item', ['id' => '123']);
Why it matters:
*"This release introduces a security-hardened XML builder that addresses OWASP XML Security Risks (A03:2021). Key architectural implications:
disallow_doctype() with existing measures (e.g., libxml_disable_entity_loader()) for layered protection.How can I help you explore Laravel packages today?