jackalope/jackalope-doctrine-dbal
Doctrine DBAL-based Jackalope backend for PHPCR, enabling content repository storage on SQL databases. Provides a DBAL transport layer, schema management, and integration pieces for running Jackalope with Doctrine DBAL across multiple database platforms.
Start by installing the package via Composer: composer require jackalope/jackalope-doctrine-dbal. Next, configure Doctrine DBAL (e.g., via config/packages/doctrine.yaml) with your DB connection (MySQL, PostgreSQL, etc.). Instantiate the PHPCR Repository using Jackalope\Repository and wire it with Jackalope\Transport\DoctrineDBAL\Transport — passing your DBAL Connection instance. For rapid prototyping, use phpcr:init and phpcr:registerNodeType commands (if using CMF/CR stack) or manually create the database schema via jackalope:dbal:ensure-db-is-ready (assuming symfony-cmf/console is installed). The first use case is typically storing and retrieving hierarchical content (e.g., pages or assets) with PHPCR’s getNode(), createNode(), and setProperty() methods.
PhpcrSessionFactory) and inject it via constructor. Use Doctrine’s EntityManager alongside DBAL connection for mixed ORM/PHPCR workflows.phpcr:version:initialize (or programmatic initializeVersioning) and use QueryManager::createQuery() with SQL2/JCR-QOM to filter nodes by path, properties, or hierarchy.Post::phpcrPath → PHPCR node), using lifecycle callbacks to sync state.Session::save() with transactional semantics for bulk node creation or update (avoid calling save() per node).sqlite DBAL connection for tests; configure in-memory DB and run jackalope:dbal:schema:dump before each test.jackalope:dbal:schema:dump (or jackalope:dbal:ensure-db-is-ready) after version upgrades to regenerate tables — check var/phPCR_schema.sql if issues arise.getNodeByPath() in tight loops — it’s less efficient than getNode() when you already have UUIDs. Prefer PHPCR’s getNodeByIdentifier() for known nodes.save() in explicit DBAL transaction ($connection->beginTransaction()) if atomicity across DBAL and PHPCR is required.Transport or NodeRepository classes via DI to inject logging, monitoring, or custom event listeners — look for Transport’s doGetNodes() and doExecuteQuery() extension points.How can I help you explore Laravel packages today?