Skip to content

Commit c8bba23

Browse files
feat(MPM-708): drop php7.4 support (#45)
Co-authored-by: Marko <[email protected]>
1 parent 5cf268b commit c8bba23

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.4",
14+
"php": "^8.0",
1515
"ext-json": "*",
1616
"flix-tech/avro-php": "^3.0|^4.0",
1717
"jobcloud/php-kafka-schema-registry-client": "^1.0",
1818
"kriswallsmith/buzz": "^1.2",
1919
"nyholm/psr7": "^1.4",
2020
"pimple/pimple": "^3.2",
21-
"symfony/console": "^4.3|^5.1|^6.0"
21+
"symfony/console": "^5.1|^6.0"
2222
},
2323
"require-dev": {
2424
"infection/infection": "^0.26",
25-
"phpstan/phpstan": "^0.12",
25+
"phpstan/phpstan": "^1.9",
2626
"phpunit/phpunit": "^9.5",
2727
"rregeer/phpunit-coverage-check": "^0.3.1",
2828
"squizlabs/php_codesniffer": "^3.6"

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.4-cli-alpine3.16
1+
FROM php:8.0-cli-alpine3.16
22

33
ARG HOST_USER_ID
44

src/Command/CheckAllSchemaTemplatesDefaultTypeCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private function checkSchemas(array $avroFiles, array &$failed = []): bool
8888

8989
/**
9090
* @param string $localSchema
91-
* @return array<string, mixed>
91+
* @return array<int|string, mixed>
9292
*/
9393
private function checkDefaultType(string $localSchema): array
9494
{
@@ -103,7 +103,7 @@ private function checkDefaultType(string $localSchema): array
103103
/**
104104
* @param mixed $decodedSchema
105105
* @param array<mixed, mixed> $defaultFields
106-
* @return array<string, mixed>
106+
* @return array<int|string, mixed>
107107
*/
108108
private function checkAllFields($decodedSchema, array $defaultFields = []): array
109109
{
@@ -132,7 +132,7 @@ private function checkAllFields($decodedSchema, array $defaultFields = []): arra
132132
* @param mixed $fieldType
133133
* @param mixed $field
134134
* @param array<mixed, mixed> $defaultFields
135-
* @return array<string, mixed>
135+
* @return array<int|string, mixed>
136136
*/
137137
private function checkSingleField($fieldType, $field, array $defaultFields): array
138138
{

src/Command/ListAllSchemasCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
3030
$schemas = $this->schemaRegistryApi->getSubjects();
3131

3232
foreach ($schemas as $schema) {
33-
$output->writeln($schema);
33+
$output->writeln((string) $schema);
3434
}
3535

3636
return 0;

src/Command/ListVersionsForSchemaCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
3535
$schemaVersions = $this->schemaRegistryApi->getAllSubjectVersions($schemaName);
3636

3737
foreach ($schemaVersions as $schemaVersion) {
38-
$output->writeln($schemaVersion);
38+
$output->writeln((string) $schemaVersion);
3939
}
4040

4141
return 0;

src/Command/RegisterChangedSchemasCommand.php

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

55
use AvroSchema;
66
use AvroSchemaParseException;
7-
use Jobcloud\Kafka\SchemaRegistryClient\Exception\SubjectNotFoundException;
87
use Jobcloud\Kafka\SchemaRegistryClient\KafkaSchemaRegistryApiClientInterface;
98
use Jobcloud\SchemaConsole\Helper\SchemaFileHelper;
109
use Symfony\Component\Console\Input\InputArgument;
@@ -134,7 +133,7 @@ private function registerFiles(
134133

135134
try {
136135
$latestVersion = $this->schemaRegistryApi->getLatestSubjectVersion($schemaName);
137-
} catch (SubjectNotFoundException $e) {
136+
} catch (\Throwable $e) {
138137
$latestVersion = null;
139138
}
140139

0 commit comments

Comments
 (0)