jobcloud / php-console-kafka-schema-registry
Console commands for the Kafka schema registry
Installs: 21 614
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 20
Forks: 2
Open Issues: 0
Requires
- php: ^8.0
- ext-json: *
- flix-tech/avro-php: ^3.0 || ^4.0 || ^5.0
- jobcloud/php-kafka-schema-registry-client: ^2.0
- kriswallsmith/buzz: ^1.2
- nyholm/psr7: ^1.4
- pimple/pimple: ^3.2
- symfony/console: ^5.1 || ^6.0 || ^7.0
Requires (Dev)
- infection/infection: ^0.26
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- rregeer/phpunit-coverage-check: ^0.3.1
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-12-08 09:56:11 UTC
README
Installation
composer require jobcloud/php-console-kafka-schema-registry
Requirements
- php: >= 7.4
Register commands
You can register each command separately like this:
<?php use Symfony\Component\Console\Application; use Jobcloud\SchemaConsole\Command\ListAllSchemasCommand; use Jobcloud\SchemaConsole\SchemaRegistryApi; use GuzzleHttp\Client; $client = new Client( [ 'base_uri' => 'url-to-your-schema-api', //'auth' => ['schema-username', 'schema-password'] ] ); $schemaRegistryApi = new SchemaRegistryApi($client); $console = new Application(); $console->add(new ListAllSchemasCommand($schemaRegistryApi));
or you can also register them over the service provider:
<?php use Jobcloud\SchemaConsole\ServiceProvider\CommandServiceProvider; use Pimple\Container; $container = new Container(); $container->register(new CommandServiceProvider());
Note: To use the service provider you need to set the following in your container:
- either
kafka.schema.registry.client
which is the guzzle client or alternativelykafka.schema.registry.url
- if you need to use basic authentication you need to set
kafka.schema.registry.username
andkafka.schema.registry.password