'Release file not found'], Response::HTTP_NOT_FOUND); } $content = file_get_contents(self::RELEASE_FILE); $lines = array_filter(explode("\n", trim($content))); $versions = []; foreach ($lines as $line) { if (!str_contains($line, ':')) { continue; } [$key, $value] = explode(':', $line, 2); $versions[trim($key)] = trim($value); } return new JsonResponse($versions); } }