Does this error have anything to do with the Firebase version? If not, how do I solve this issue?
private static function fromJsonFile(string $filePath): self
{
try {
$file = new \SplFileObject($filePath);
$json = (string) $file->fread($file->getSize());
} catch (Throwable $e) {
throw new InvalidArgumentException("{$filePath} can not be read: {$e->getMessage()}");
}
try {
$serviceAccount = self::fromJson($json);
} catch (Throwable $e) {
throw new InvalidArgumentException(\sprintf('%s could not be parsed to a Service Account: %s', $filePath, $e->getMessage()));
}
return $serviceAccount;
}