Skip to content

Commit 7467f2c

Browse files
authored
Replace guzzle with buzz (#30)
* Fix command description * Fix CS * Bump PHP * Bump registry client * Require libs * Remove additional libs and set client * Revert changes in service provider * Bump alpine * Replace guzzle with buzz and psr7 * Replace guzzle with buzz and psr7 in code * Replace guzzle with buzz and psr7 in test * Sort and bump deps * Bump orbs * Update PHPDoc comments * Update readme * Refactor tests * Remove @throws where no actual exception has been thrown * Added php dependency * Remove throws * Remove throws
1 parent 06a814d commit 7467f2c

25 files changed

+44
-116
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2.1
22

33
orbs:
4-
ci-caching: jobcloud/ci-caching@1.0.2
5-
ci-php: jobcloud/ci-php@0.32
4+
ci-caching: jobcloud/ci-caching@3.0
5+
ci-php: jobcloud/ci-php@2.0
66

77
workflows:
88
test-console-kafka-schema-registry:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
## Installation
44
```
5-
composer require jobcloud/php-console-kafka-schema-registry "^1.1"
5+
composer require jobcloud/php-console-kafka-schema-registry
66
```
77

8+
## Requirements
9+
- php: >= 7.4
10+
811
## Register commands
912
You can register each command separately like this:
1013
```php

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@
1616
}
1717
],
1818
"require": {
19+
"php": ">=7.4",
1920
"ext-json": "*",
2021
"flix-tech/avro-php": "^3.0|^4.0",
21-
"symfony/console": "^4.3|^5.1",
22+
"jobcloud/php-kafka-schema-registry-client": "^1.0",
23+
"kriswallsmith/buzz": "^1.2",
24+
"nyholm/psr7": "^1.4",
2225
"pimple/pimple": "^3.2",
23-
"jobcloud/php-kafka-schema-registry-client": "^0.1",
24-
"guzzlehttp/guzzle": "^6.3|^7.3"
26+
"symfony/console": "^4.3|^5.1"
2527
},
2628
"require-dev": {
27-
"phpunit/phpunit": "^9.5",
29+
"infection/infection": "^0.25",
2830
"phpstan/phpstan": "^0.12",
29-
"infection/infection": "^0.18",
30-
"squizlabs/php_codesniffer": "^3.4",
31-
"rregeer/phpunit-coverage-check": "^0.3.1"
31+
"phpunit/phpunit": "^9.5",
32+
"rregeer/phpunit-coverage-check": "^0.3.1",
33+
"squizlabs/php_codesniffer": "^3.6"
3234
},
3335
"autoload": {
3436
"psr-4": {

docker/dev/php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.3-cli-alpine3.14
1+
FROM php:7.4-cli-alpine3.15
22

33
ARG HOST_USER_ID
44

src/Command/AbstractModeCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44

55
namespace Jobcloud\SchemaConsole\Command;
66

7-
use GuzzleHttp\Exception\ClientException;
87
use Symfony\Component\Console\Input\InputInterface;
98
use Symfony\Component\Console\Output\OutputInterface;
109

1110
abstract class AbstractModeCommand extends AbstractSchemaCommand implements ModeCommandInterface
1211
{
13-
1412
/**
1513
* @return void
1614
*/
@@ -23,10 +21,9 @@ protected function configure(): void
2321
}
2422

2523
/**
26-
* @param InputInterface $input
24+
* @param InputInterface $input
2725
* @param OutputInterface $output
2826
* @return integer
29-
* @throws ClientException
3027
*/
3128
public function execute(InputInterface $input, OutputInterface $output): int
3229
{

src/Command/AbstractSchemaCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
abstract class AbstractSchemaCommand extends Command
99
{
10-
1110
/**
1211
* @var KafkaSchemaRegistryApiClientInterface
1312
*/

src/Command/CheckAllSchemaTemplatesDefaultTypeCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Jobcloud\SchemaConsole\Command;
44

5-
use GuzzleHttp\Exception\RequestException;
65
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
76
use Symfony\Component\Console\Command\Command;
87
use Symfony\Component\Console\Input\InputArgument;
@@ -41,7 +40,6 @@ protected function configure(): void
4140
* @param InputInterface $input
4241
* @param OutputInterface $output
4342
* @return integer
44-
* @throws RequestException
4543
*/
4644
public function execute(InputInterface $input, OutputInterface $output): int
4745
{

src/Command/CheckAllSchemaTemplatesDocCommentsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Jobcloud\SchemaConsole\Command;
66

7-
use GuzzleHttp\Exception\RequestException;
87
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
8+
use JsonException;
99
use Symfony\Component\Console\Input\InputArgument;
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Output\OutputInterface;
@@ -34,10 +34,9 @@ protected function configure(): void
3434
}
3535

3636
/**
37-
* @param InputInterface $input
37+
* @param InputInterface $input
3838
* @param OutputInterface $output
3939
* @return integer
40-
* @throws RequestException
4140
*/
4241
public function execute(InputInterface $input, OutputInterface $output): int
4342
{
@@ -66,6 +65,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
6665
* @param array<string, mixed> $avroFiles
6766
* @param array<string, mixed> $failed
6867
* @return boolean
68+
* @throws JsonException
6969
*/
7070
private function checkDocCommentsOnSchemaTemplates(array $avroFiles, array &$failed = []): bool
7171
{

src/Command/CheckAllSchemasAreValidAvroCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use AvroSchema;
66
use AvroSchemaParseException;
7-
use GuzzleHttp\Exception\RequestException;
87
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
98
use Symfony\Component\Console\Command\Command;
109
use Symfony\Component\Console\Input\InputArgument;
@@ -30,7 +29,6 @@ protected function configure(): void
3029
* @param InputInterface $input
3130
* @param OutputInterface $output
3231
* @return integer
33-
* @throws RequestException
3432
*/
3533
public function execute(InputInterface $input, OutputInterface $output): int
3634
{

src/Command/CheckAllSchemasCompatibilityCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Jobcloud\SchemaConsole\Command;
44

5-
use GuzzleHttp\Exception\RequestException;
65
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
76
use Symfony\Component\Console\Input\InputArgument;
87
use Symfony\Component\Console\Input\InputInterface;
@@ -11,7 +10,6 @@
1110

1211
class CheckAllSchemasCompatibilityCommand extends AbstractSchemaCommand
1312
{
14-
1513
/**
1614
* @return void
1715
*/
@@ -25,10 +23,9 @@ protected function configure(): void
2523
}
2624

2725
/**
28-
* @param InputInterface $input
26+
* @param InputInterface $input
2927
* @param OutputInterface $output
3028
* @return integer
31-
* @throws RequestException
3229
*/
3330
public function execute(InputInterface $input, OutputInterface $output): int
3431
{

0 commit comments

Comments
 (0)