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

Phpcr Api Tests Laravel Package

phpcr/phpcr-api-tests

Test suite for the PHP Content Repository (PHPCR) API. Provides reusable, vendor-neutral compliance tests to validate PHPCR implementations against the specification, helping ensure consistent behavior across repositories and adapters.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is not a library for direct application usage—it's a test suite provider for PHPCR implementations (e.g., jackalope, doctrine/phpcr-odm). Start by examining the phpunit.xml.dist and tests/ directory to understand how it defines and runs functional tests against PHPCR endpoints. To use it, your PHPCR implementation must implement the PHPCR\SessionInterface, and you typically require this package as a dev dependency and extend its abstract test classes (e.g., PHPCR\Tests\Functional\BasicTest) to validate your implementation’s conformance.

Implementation Patterns

  • Extending Base Tests: Create your own test suite by subclassing the provided abstract test cases (e.g., SessionTest, NodeTest) and inject your custom PHPCR implementation.
  • Configuration Injection: Use the bootstrap.php or phpunit.xml to configure the _PHPCR_TESTS_IMPLEMENTATION constant pointing to your implementation class.
  • Conditional Skips: Leverage @group annotations (e.g., @group jcr-283) to skip tests unsupported by your implementation, enabling fine-grained compatibility reporting.
  • CI Integration: Run via vendor/bin/phpunit against your local or remote PHPCR backend (e.g., JCR repository over RMI or WebDAV) to verify API compliance.

Gotchas and Tips

  • Missing Namespace Alignment: PHPCR relies on strict namespace conventions—ensure your implementation uses the exact PHPCR and sub-namespaces as defined in the interface; typos cause cryptic class-not-found errors.
  • Static Fixture Data: Test fixtures (e.g., node trees in tests/fixtures/) are reset per suite—avoid mutating them in tests; instead, use setUp()/tearDown() for per-test isolation.
  • Strict Type Enforcement: Some tests (e.g., ItemInterfaceTest) assert type-hinted returns like NodeInterface|DocumentInterface; mismatches cause fatal errors—use strict typing (declare(strict_types=1)) early in your implementation.
  • Autoload Pitfalls: If using Composer, ensure your PHPCR package is autoloaded before the test suite (via autoload-devclassmap or PSR-4).
  • Last Release Lag: Since the last release was in 2023, track the repo directly (if public) or pin to a known commit to avoid drift between this test suite and your PHPCR version.
  • Debugging Tip: Enable PHPCR logging via phpcr.logger (if supported) or patch PHPCR\Util\UUIDHelper to log UUID generation failures—common in implementation bugs.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport