private function checkComposerJson($content)
    {
        $tempFile = $this->getTensideDataDir() . '/composer.json.tmp';
        file_put_contents($tempFile, $content);

        $validator = new ConfigValidator(new BufferIO());

        list($errors, $publishErrors, $warnings) = $validator->validate($tempFile);
        unlink($tempFile);

        $errors = array_merge($errors, $publishErrors);

        $errors   = str_replace(dirname($tempFile), '', $errors);
        $warnings = str_replace(dirname($tempFile), '', $warnings);

        $lineMapper = function ($str) {
            if (preg_match('#Parse error on line (\d+)#', $str, $match)) {
                return ['line' => $match[1], 'msg' => $str];
            }
            return ['line' => 0, 'msg' => $str];
        };

        return [
            'errors'   => array_map($lineMapper, $errors),
            'warnings' => array_map($lineMapper, $warnings),
        ];
    }