Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Phpcr Admin Bundle Laravel Package

sonata-project/doctrine-phpcr-admin-bundle

Integrates Doctrine PHPCR with SonataAdminBundle for Symfony, enabling admin interfaces for PHPCR documents. Includes docs and CI badges, but note: this repository is abandoned with no active support; contributions welcome.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Hierarchical Content Management: Perfect fit for applications requiring nested content structures (e.g., CMS pages, organizational hierarchies, taxonomies) with PHPCR (Jackrabbit) as the backend. Leverages SonataAdmin’s familiar UI patterns while abstracting PHPCR-specific complexities.
  • Symfony/Sonata Ecosystem: Designed for Symfony 3/4 and SonataAdminBundle, making it ideal for projects already using this stack. Integrates seamlessly with Sonata’s ACL, CRUD, and templating systems.
  • PHPCR-ODM Compatibility: Built on top of Doctrine PHPCR-ODM, ensuring compatibility with PHPCR repositories (e.g., Jackrabbit, Apache Sling). Supports document types, relationships, and hierarchical queries.
  • Legacy System Integration: Useful for modernizing legacy PHPCR-based systems (e.g., eZ Publish) by providing a Symfony-native admin interface without rewriting the entire backend.

Integration Feasibility

  • Modular Design: Can be incrementally adopted—start with basic tree CRUD and extend functionality (e.g., custom permissions, advanced queries) as needed.
  • SonataAdmin Dependency: Requires SonataAdminBundle (v2.3+) and PHPCR-ODM, which may add complexity if not already in use. Symfony Flex compatibility is limited (last release predates Flex).
  • Configuration Overhead: Requires YAML/XML configuration for:
    • PHPCR repository setup (doctrine_phpcr).
    • SonataAdmin extensions (sonata_admin).
    • Tree-specific options (document_tree, cmf_tree).
  • Template Customization: Uses Twig templates for tree views, forms, and CRUD operations. Overriding templates (e.g., edit_phpcr_many_to_one.html.twig) is possible but may require adjustments for newer Symfony/Twig versions.

Technical Risk

Risk Area Severity Mitigation
Abandoned Maintenance High Fork the repository or allocate resources for patches. Monitor for Symfony 5/6+ compatibility.
Symfony 5/6+ Compatibility High Test thoroughly; expect deprecation warnings or breaking changes (e.g., Symfony’s config component).
PHPCR-ODM Version Lock Medium Bundle targets PHPCR-ODM v2.0; ensure your PHPCR setup aligns (e.g., Jackrabbit 2.x).
Twig/Sonata Template Changes Medium Update template paths (e.g., SonataDoctrinePHPCRAdminBundle:CRUD:...) to namespaced syntax (v2.1.1+).
ACL/Permission Gaps Medium Sonata’s ACL editor is supported, but custom PHPCR permissions may require extensions.
Performance at Scale Low PHPCR can be slow for deep hierarchies; optimize with indexes and caching (e.g., Varnish).

Key Questions for Stakeholders

  1. Symfony Version:

    • Are you using Symfony 3/4? If 5/6, will you fork/patch this bundle?
    • Impact: Untested compatibility may require significant effort.
  2. PHPCR Backend:

    • Which PHPCR implementation are you using (e.g., Jackrabbit, Sling)?
    • Impact: Configuration may vary (e.g., root_node, repository_name).
  3. SonataAdmin Maturity:

    • Is your team already using SonataAdminBundle? If not, what’s the cost to onboard?
    • Impact: Adds dependency complexity; training may be needed.
  4. Hierarchy Complexity:

    • How deep/nested are your content trees? (e.g., 5 levels vs. 50).
    • Impact: PHPCR performance degrades with depth; may need custom queries or caching.
  5. Long-Term Maintenance:

    • Will you fork this bundle or rely on community patches?
    • Impact: Abandoned projects require internal ownership.
  6. Alternatives Evaluated:

    • Have you considered modern alternatives (e.g., Neos CMS, API Platform + Elasticsearch)?
    • Impact: May offer better long-term support but higher initial effort.
  7. Customization Needs:

    • Do you need advanced PHPCR features (e.g., custom queries, fine-grained permissions) beyond basic trees?
    • Impact: May require extensions or a custom solution.

Integration Approach

Stack Fit

  • Core Stack:
    • Symfony 3/4 (Symfony 5/6 requires patches).
    • SonataAdminBundle (v2.3+).
    • Doctrine PHPCR-ODM (v2.0+).
    • PHPCR Repository (e.g., Jackrabbit, Sling).
    • Twig for templating.
  • Dependencies:
    • sonata-project/core-bundle (^3.8–^3.14).
    • sonata-project/doctrine-phpcr-odm-admin (for PHPCR-ODM integration).
    • doctrine/phpcr-odm (v2.0+).
  • Compatibility Notes:
    • Symfony 4: Officially supported (v2.2.0+), but test for deprecations (e.g., symfony/config 4.2+).
    • PHP 7.1+: Required (PHP 5/7.0 dropped in v2.2.0).
    • Twig 2.x: Assumes namespaced template syntax (v2.1.1+).

Migration Path

  1. Prerequisites:
    • Set up PHPCR-ODM and a repository (e.g., Jackrabbit).
    • Install SonataAdminBundle and configure basic CRUD for your document types.
  2. Bundle Installation:
    composer require sonata-project/doctrine-phpcr-admin-bundle
    
  3. Configuration:
    • Enable the bundle in config/bundles.php:
      SonataDoctrinePhpcrAdminBundle\SonataDoctrinePhpcrAdminBundle::class => ['all' => true],
      
    • Configure PHPCR (config/packages/doctrine_phpcr.yaml):
      doctrine_phpcr:
          document_managers:
              default:
                  backend:
                      type: "doctrine_phpcr_odm_backend"
                      # Jackrabbit/Sling config here
                  odm:
                      auto_mapping: true
                      auto_generate_proxy_classes: "%kernel.debug%"
      
    • Extend SonataAdmin for PHPCR documents (e.g., src/Admin/PageAdmin.php):
      use Sonata\DoctrinePhpcrAdminBundle\Admin\AbstractPhpcrAdmin;
      
      class PageAdmin extends AbstractPhpcrAdmin {
          protected $documentClass = 'App\Document\Page';
          protected $parentDocumentClass = 'App\Document\Folder';
          protected $baseRouteName = 'page';
          protected $baseRoutePattern = 'page';
      }
      
    • Register routing (config/routes.yaml):
      sonata_doctrine_phpcr_admin_tree:
          resource: "@SonataDoctrinePhpcrAdminBundle/Resources/config/routing/tree.xml"
          prefix: /admin
      
  4. Template Overrides (Optional):
    • Override default templates (e.g., templates/SonataDoctrinePHPCRAdminBundle/CRUD/edit_phpcr_one_to_one.html.twig) for custom UI.
  5. Testing:
    • Verify tree operations (create, edit, delete, move).
    • Test permissions (ACL integration).
    • Check performance with large hierarchies.

Compatibility

Component Compatibility Notes
Symfony 3.4–4.4 (tested) Symfony 5/6 untested; may need patches.
SonataAdminBundle 2.3+ Requires SonataAdmin’s core features (e.g., ACL, CRUD).
PHPCR-ODM 2.0+ Bundle targets v2.0; ensure your setup matches.
Twig 2.x (namespaced syntax) Older Twig versions may break template rendering.
PHP 7.1+ PHP 5/7.0 dropped in v2.2.0.
Jackrabbit/Sling Tested with PHPCR backends Configuration varies by backend.

Sequencing

  1. Phase 1: Core Integration (2–4 weeks):
    • Set up PHPCR-ODM and SonataAdmin.
    • Configure basic
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony