flix-tech/schema-registry-php-client
59.3
Adequate · 21 September 2026
1.7k
lines of production code
PHP
primary language
4
measurements over time
What this system is
This system is a PHP client library for the Confluent Schema Registry REST API, enabling applications to manage Avro schemas and their compatibility settings. It provides both synchronous and asynchronous interfaces for registering schemas, retrieving versions, and checking compatibility, with built-in support for schema references. The library includes flexible caching mechanisms via PSR-6, PSR-16, and Doctrine adapters to optimize performance, along with structured exception handling for precise error management.
Features
Add Docker-based PHP execution and service wait scripts
The repository now includes shell scripts in the bin directory to facilitate local development and testing. The new bin/php script executes PHP commands inside a Docker container (defaulting to PHP 7.4), ensuring a consistent environment without requiring a local PHP installation. Additionally, bin/wait-for-all.sh and bin/wait-for-it.sh are added to handle dependency startup, allowing users to wait for Zookeeper, Kafka, and Schema Registry services to become available before proceeding.
bin · high confidence
Initial project scaffolding and development environment setup
This change establishes the foundational structure for the Confluent Schema Registry PHP client. It introduces a Dockerfile for a PHP 7.4 development environment with Xdebug, a Makefile to automate testing, static analysis (PHPStan), and code style enforcement (PHP-CS-Fixer), and configuration files for PHPUnit (including integration test support) and PHPStan. It also adds the MIT license, an Apache 2.0 license for the Avro dependency, a .gitignore, and comprehensive documentation in the README and UPGRADE.md files.
(repo-wide) · high confidence
Introduction of Registry interfaces for synchronous and asynchronous schema operations
The library now exposes explicit \Registry\, \SynchronousRegistry\, and \AsynchronousRegistry\ interfaces that define the contract for interacting with the schema registry. The \SynchronousRegistry\ provides blocking methods returning concrete types (e.g., \int\ for IDs, \AvroSchema\ for schema data), while \AsynchronousRegistry\ offers non-blocking equivalents returning \PromiseInterface\ objects. Both interfaces support passing schema references via the \AvroReference\ parameter, allowing users to choose the execution model that best fits their application's concurrency requirements.
src · high confidence
New cache adapters for PSR-6, PSR-16, and Doctrine
The registry now includes four new cache adapter implementations in the \src/Registry/Cache\ directory, allowing users to persist schema data using different backends. \CacheItemPoolAdapter\ wraps PSR-6 \CacheItemPoolInterface\ implementations, \SimpleCacheAdapter\ wraps PSR-16 \CacheInterface\ implementations, and \DoctrineCacheAdapter\ integrates with \Doctrine\\Common\\Cache\\Cache\. Additionally, \AvroObjectCacheAdapter\ provides an in-memory cache that stores \AvroSchema\ objects directly without serialization. All adapters support caching schemas by ID, by hash, and by subject/version.
src/Registry/Cache · high confidence
New registry implementations: caching, blocking, and promise-based access
The library now provides three new registry wrappers in the \src/Registry\ namespace to improve usability and performance. \CachedRegistry\ allows users to cache schema lookups by ID, subject/version, and schema hash using a pluggable \CacheAdapter\ interface, reducing redundant network calls. \BlockingRegistry\ wraps an asynchronous registry to provide synchronous methods that block until the result is available, throwing exceptions on failure rather than returning rejected promises. \PromisingRegistry\ serves as the underlying asynchronous implementation that handles HTTP requests via Guzzle, supporting schema references and returning \PromiseInterface\ results for non-blocking operations.
src/Registry · high confidence
Support for Avro schema references in serialization
The schema component now supports Avro schema references. A new AvroName class validates names against the Avro specification, and a new AvroReference class allows referencing external schemas by name, subject, and version. The AvroReference class implements JsonSerializable to ensure these references are correctly serialized to JSON, enabling users to define and transmit schema dependencies.
src/Schema · high confidence
Behavioural changes
Add schema compatibility and HTTP header constants
The application now defines explicit constants for Schema Registry compatibility modes (NONE, BACKWARD, FORWARD, FULL, and their transitive variants) and standard HTTP headers (Accept and Content-Type) using the schema registry JSON content type. This centralizes configuration values for schema validation and API communication.
src/Constants · high confidence
Introduce functional request factory for Schema Registry API
The request-building logic has been moved into a new \Functions.php\ file within the \Requests\ namespace, providing a set of pure functions that generate PSR-7 \RequestInterface\ objects for all Schema Registry operations. This change introduces support for passing schema references when registering new schema versions, adds dedicated functions for checking schema compatibility against specific versions, and implements functions for managing both default and subject-specific compatibility levels (including validation of compatibility modes like BACKWARD, FORWARD, and FULL). All requests now explicitly set the Content-Type header for POST operations and use the Assert library for input validation.
src/Requests · high confidence
Structured exception handling for Schema Registry errors
The library now provides a comprehensive set of specific exception classes (such as IncompatibleAvroSchemaException, SchemaNotFoundException, and InvalidCompatibilityLevelException) that map directly to Schema Registry error codes. These exceptions extend a new AbstractSchemaRegistryException base class and implement the SchemaRegistryException interface, which enforces a static errorCode() method. An invokable ExceptionMap singleton is introduced to automatically translate Guzzle HTTP errors into these specific internal exceptions based on the response body's error\_code, allowing users to catch and handle precise failure scenarios rather than generic HTTP errors.
src/Exception · high confidence
Test coverage
Added integration tests for Schema Registry API; Added test coverage for Registry implementations and Schema components; Added tests for schema registry cache adapters; Added unit tests for Schema Registry exception mapping; Added unit tests for Schema Registry request functions.
Dependencies
Initial release of Confluent Schema Registry API client
This entry introduces the \flix-tech/confluent-schema-registry-api\ library, a PHP 7.4+ and 8.0+ client for the Confluent Schema Registry REST API. The package relies on Guzzle 7 for HTTP communication, utilizes \guzzlehttp/promises\ and \guzzlehttp/psr7\ for async and PSR-7 compatibility, and employs \beberlei/assert\ for input validation. It also includes optional support for caching via \doctrine/cache\, \psr/cache\, and \psr/simple-cache\ through suggested dependencies.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 57 → 59 (+2.1)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.1)
- Architecture 100 → 100 (+0.0)
- Maturity 50 → 50 (+0.0)
- Readiness 56 → 53 (-3.3)
- Security 51 → 67 (+16.1)
Resolved (19)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (13 lines × 2) (src/Registry/CachedRegistry.php)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Test reliability not included
- dormant codebase — no living knowledge left to concentrate
New (28)
- Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
- Documentation: no architecture or design documentation (README.md)
- Documentation: no installation or build instructions (README.md)
- Duplicated block (12 lines × 2) (src/Registry/CachedRegistry.php)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 8 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
flix-tech/schema-registry-php-client was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 87023aebb0393da62d932b9be49d0d891a52ae37 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.