public function toFile($file)
    {
        $composer = json_decode(file_get_contents($file), true);

        // Remove the zendframework/zendframework
        unset($composer['require']['zendframework/zendframework']);

        // Add all the found components
        foreach (array_keys($this->components) as $component) {
            $composer['require']['zendframework/' . $component] = $this->version;
        }

        file_put_contents($file, json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
    }