Skip to content

Commit

Permalink
feat(MPM-708): drop php7.4 support (#45)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
ruzakaranbol and bajdzun authored Dec 30, 2022
1 parent 5cf268b commit c8bba23
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
}
],
"require": {
"php": ">=7.4",
"php": "^8.0",
"ext-json": "*",
"flix-tech/avro-php": "^3.0|^4.0",
"jobcloud/php-kafka-schema-registry-client": "^1.0",
"kriswallsmith/buzz": "^1.2",
"nyholm/psr7": "^1.4",
"pimple/pimple": "^3.2",
"symfony/console": "^4.3|^5.1|^6.0"
"symfony/console": "^5.1|^6.0"
},
"require-dev": {
"infection/infection": "^0.26",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"rregeer/phpunit-coverage-check": "^0.3.1",
"squizlabs/php_codesniffer": "^3.6"
Expand Down
2 changes: 1 addition & 1 deletion docker/dev/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.4-cli-alpine3.16
FROM php:8.0-cli-alpine3.16

ARG HOST_USER_ID

Expand Down
6 changes: 3 additions & 3 deletions src/Command/CheckAllSchemaTemplatesDefaultTypeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private function checkSchemas(array $avroFiles, array &$failed = []): bool

/**
* @param string $localSchema
* @return array<string, mixed>
* @return array<int|string, mixed>
*/
private function checkDefaultType(string $localSchema): array
{
Expand All @@ -103,7 +103,7 @@ private function checkDefaultType(string $localSchema): array
/**
* @param mixed $decodedSchema
* @param array<mixed, mixed> $defaultFields
* @return array<string, mixed>
* @return array<int|string, mixed>
*/
private function checkAllFields($decodedSchema, array $defaultFields = []): array
{
Expand Down Expand Up @@ -132,7 +132,7 @@ private function checkAllFields($decodedSchema, array $defaultFields = []): arra
* @param mixed $fieldType
* @param mixed $field
* @param array<mixed, mixed> $defaultFields
* @return array<string, mixed>
* @return array<int|string, mixed>
*/
private function checkSingleField($fieldType, $field, array $defaultFields): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Command/ListAllSchemasCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$schemas = $this->schemaRegistryApi->getSubjects();

foreach ($schemas as $schema) {
$output->writeln($schema);
$output->writeln((string) $schema);
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Command/ListVersionsForSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$schemaVersions = $this->schemaRegistryApi->getAllSubjectVersions($schemaName);

foreach ($schemaVersions as $schemaVersion) {
$output->writeln($schemaVersion);
$output->writeln((string) $schemaVersion);
}

return 0;
Expand Down
3 changes: 1 addition & 2 deletions src/Command/RegisterChangedSchemasCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use AvroSchema;
use AvroSchemaParseException;
use Jobcloud\Kafka\SchemaRegistryClient\Exception\SubjectNotFoundException;
use Jobcloud\Kafka\SchemaRegistryClient\KafkaSchemaRegistryApiClientInterface;
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -134,7 +133,7 @@ private function registerFiles(

try {
$latestVersion = $this->schemaRegistryApi->getLatestSubjectVersion($schemaName);
} catch (SubjectNotFoundException $e) {
} catch (\Throwable $e) {
$latestVersion = null;
}

Expand Down

0 comments on commit c8bba23

Please sign in to comment.