private function isPackageRequired(string $packageName): bool
    {
        foreach ($this->composer->getPackage()->getRequires() as $require) {
            if ($require->getTarget() === $packageName) {
                return true;
            }
        }

        return false;
    }