11# Confluent Schema Registry PHP API
22
3- [ ![ Build Status] ( https://travis-ci.org/flix-tech/schema-registry-php-client.svg?branch=2.0.2 )] ( https://travis-ci.org/flix-tech/schema-registry-php-client )
3+ [ ![ Build Status] ( https://travis-ci.org/flix-tech/schema-registry-php-client.svg?branch=master )] ( https://travis-ci.org/flix-tech/schema-registry-php-client )
44[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/flix-tech/schema-registry-php-client/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/flix-tech/schema-registry-php-client/?branch=master )
55[ ![ Code Coverage] ( https://scrutinizer-ci.com/g/flix-tech/schema-registry-php-client/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/flix-tech/schema-registry-php-client/?branch=master )
66[ ![ Latest Stable Version] ( https://poser.pugx.org/flix-tech/confluent-schema-registry-api/v/stable )] ( https://packagist.org/packages/flix-tech/confluent-schema-registry-api )
77[ ![ Total Downloads] ( https://poser.pugx.org/flix-tech/confluent-schema-registry-api/downloads )] ( https://packagist.org/packages/flix-tech/confluent-schema-registry-api )
88[ ![ License] ( https://poser.pugx.org/flix-tech/confluent-schema-registry-api/license )] ( https://packagist.org/packages/flix-tech/confluent-schema-registry-api )
99
10- A PHP 7.1 + library to consume the Confluent Schema Registry REST API. It provides low level functions to create PSR-7
10+ A PHP 7.2 + library to consume the Confluent Schema Registry REST API. It provides low level functions to create PSR-7
1111compliant requests that can be used as well as high level abstractions to ease developer experience.
1212
1313#### Contents
@@ -33,9 +33,9 @@ compliant requests that can be used as well as high level abstractions to ease d
3333
3434| Dependency | Version | Reason |
3535| :--- | :---:| :--- |
36- | ** ` php ` ** | ~ 7.1 | Anything lower has reached EOL |
36+ | ** ` php ` ** | ~ 7.2 | Anything lower has reached EOL |
3737| ** ` guzzlephp/guzzle ` ** | ~ 6.3 | Using ` Request ` to build PSR-7 ` RequestInterface ` |
38- | ** ` beberlei/assert ` ** | ~ 2.7 | The de-facto standard assertions library for PHP |
38+ | ** ` beberlei/assert ` ** | ~ 2.7\| ~ 3.0 | The de-facto standard assertions library for PHP |
3939| ** ` flix-tech/avro-php ` ** | ^3.0 | Maintained fork of the only Avro PHP implementation: ` rg/avro-php ` |
4040
4141### Optional dependencies
@@ -50,7 +50,7 @@ compliant requests that can be used as well as high level abstractions to ease d
5050This library is installed via [ ` composer ` ] ( http://getcomposer.org ) .
5151
5252``` bash
53- composer require " flix-tech/confluent-schema-registry-api=^6 .0"
53+ composer require " flix-tech/confluent-schema-registry-api=^7 .0"
5454```
5555
5656> ** NOTE**
@@ -97,7 +97,7 @@ $promise = $registry->register('test-subject', $schema);
9797// We want to leave that decision to the user of the lib.
9898// TODO: Maybe return an Either Monad instead
9999$promise = $promise->then(
100- function ($schemaIdOrSchemaRegistryException) {
100+ static function ($schemaIdOrSchemaRegistryException) {
101101 if ($schemaIdOrSchemaRegistryException instanceof SchemaRegistryException) {
102102 throw $schemaIdOrSchemaRegistryException;
103103 }
@@ -120,7 +120,7 @@ $schema = $promise->wait();
120120$version = $registry->schemaVersion(
121121 'test-subject',
122122 $schema,
123- function (RequestInterface $request) {
123+ static function (RequestInterface $request) {
124124 return $request->withAddedHeader('Cache-Control', 'no-cache');
125125 }
126126)->wait();
@@ -207,12 +207,12 @@ $avroObjectCachedAsyncApi = new CachedRegistry(
207207
208208// NEW in version 4.x, passing in custom hash functions to cache schema ids via the schema hash
209209// By default the following function is used internally
210- $defaultHashFunction = function (AvroSchema $schema) {
210+ $defaultHashFunction = static function (AvroSchema $schema) {
211211 return md5((string) $schema);
212212};
213213
214214// You can also define your own hash callable
215- $sha1HashFunction = function (AvroSchema $schema) {
215+ $sha1HashFunction = static function (AvroSchema $schema) {
216216 return sha1((string) $schema);
217217};
218218
@@ -240,13 +240,13 @@ You can set the default variables by copying `variables.mk.dist` to `variables.m
240240#### Build the local docker image
241241
242242``` bash
243- PHP_VERSION=7.1 XDEBUG_VERSION=2.6.1 make docker
243+ PHP_VERSION=7.2 XDEBUG_VERSION=2.7.2 make docker
244244```
245245
246246#### Unit tests, Coding standards and static analysis
247247
248248``` bash
249- PHP_VERSION=7.1 make ci-local
249+ PHP_VERSION=7.2 make ci-local
250250```
251251
252252#### Integration tests
@@ -264,10 +264,10 @@ KAFKA_BROKER_IPV4=172.68.0.102
264264ZOOKEEPER_IPV4=172.68.0.101
265265```
266266
267- ##### Building the confluent platform with a specific version and run the integation tests
267+ ##### Building the confluent platform with a specific version and run the integration tests
268268
269269``` bash
270- CONFLUENT_VERSION=5.0 .3 make platform
270+ CONFLUENT_VERSION=5.2 .3 make platform
271271make phpunit-integration
272272make clean
273273```
0 commit comments