doctrine/oxm
Doctrine OXM (Object XML Mapper) maps PHP objects to XML documents and back using Doctrine-style metadata. Useful for XML serialization/deserialization in domain models, with mapping drivers and runtime tools to integrate XML workflows into applications.
Use When:
Look Elsewhere If:
SimpleXmlElement or xml_to_array helpers.spatie/array-to-xml or league/xml-to-array).For Executives: "This package lets us quickly and reliably convert between PHP objects and XML—critical for integrating with legacy systems or meeting industry standards (e.g., healthcare APIs, financial reporting). By adopting this, we avoid months of custom development, reduce errors in data exchange, and future-proof our integrations. The MIT license ensures no legal risks, and the ORM-like approach aligns with our Laravel ecosystem. For projects targeting XML-heavy markets, this is a low-risk, high-reward decision."
For Engineering:
"Doctrine OXM provides a mature, Doctrine DBAL-inspired solution for XML mapping in PHP. It handles complex schemas, namespaces, and object graphs with annotations—similar to how Doctrine ORM works but for XML. While archived, it’s battle-tested and integrates well with Laravel. For new projects needing XML support, this is a drop-in solution; for existing ones, it can replace ad-hoc XML parsing logic. Alternatives like spatie/array-to-xml are lighter but lack schema validation or complex mapping features. Recommend evaluating this if XML interoperability is a priority."
How can I help you explore Laravel packages today?