doctrine/phpcr-odm
Doctrine PHPCR-ODM brings Doctrine-style object document mapping to PHP Content Repository (PHPCR) implementations. Map PHP objects to nodes and query content repositories via familiar Doctrine APIs. Supports Jackrabbit and Doctrine DBAL setups, with tests and docs available.
Adopt if:
/site/pages/blog/*).Look elsewhere if:
For Executives: "This package lets us build a scalable, hierarchical content platform—like a CMS or DAM—without reinventing the wheel. It’s the Doctrine ORM for tree-structured data, giving us versioning, access control, and flexible queries out of the box. Think of it as Laravel + Doctrine for content-heavy apps, where we can model nested categories, asset folders, or multi-level navigation as PHP objects. It integrates with our existing stack (Symfony components, Doctrine) and avoids vendor lock-in by supporting multiple backends (SQL, Java, etc.). The tradeoff? A slight learning curve and infrastructure setup for hierarchical data, but the long-term savings in development time and scalability are significant."
For Engineering/Architecture Teams: *"PHPCR ODM solves our hierarchical data persistence problem with a mature, Doctrine-backed solution. Here’s why it’s a fit:
/site/pages/*) or use Doctrine QueryBuilder for hierarchical data, avoiding custom SQL.For Developers: *"This is Doctrine ORM for hierarchical data—like Eloquent, but for trees, forests, and nested structures. Key perks:
BlogPost, Asset) with @Document, @Field, and @ParentDocument just like Doctrine ORM./blog with ->findBy(['path' => '/blog/*']), or use QueryBuilder for complex traversals.DocumentManager in Laravel’s service container, but expect to write custom listeners for caching, events, or Scout indexing.
Downsides: No out-of-the-box Laravel magic (e.g., Eloquent events), and you’ll need to configure a PHPCR backend (Java or SQL). If you’re comfortable with Doctrine, this is a powerful upgrade for hierarchical data."*How can I help you explore Laravel packages today?