diff --git a/composer.json b/composer.json index 7092ac5..5d253cc 100644 --- a/composer.json +++ b/composer.json @@ -34,5 +34,10 @@ "branch-alias": { "dev-main": "3.0-dev" } + }, + "config": { + "allow-plugins": { + "infection/extension-installer": true + } } } diff --git a/src/Registry/SchemaRegistry.php b/src/Registry/SchemaRegistry.php index e9c3aef..e961b56 100644 --- a/src/Registry/SchemaRegistry.php +++ b/src/Registry/SchemaRegistry.php @@ -135,7 +135,11 @@ private function registerSchemaFile(\SplFileInfo $fileInfo): void } $schemaData = json_decode($fileContent, true, JSON_THROW_ON_ERROR); - $namespace = $schemaData['namespace'] ?? ''; + $namespace = ''; + + if (true === isset($schemaData['namespace'])) { + $namespace = $schemaData['namespace']; + } if (null === $schemaData) { throw new SchemaRegistryException(sprintf(SchemaRegistryException::FILE_INVALID, $fileName));