public function isInstalled($name)
{
$installed = $this->paths['path.packages'] . '/composer/installed.json';
$installed = file_exists($installed) ? json_decode(file_get_contents($installed), true) : [];
$installed = array_map(function ($pkg) {
return $pkg['name'];
}, $installed);
return array_search($name, $installed) !== false;
}