public function setComposerAutoload(string $packageName, array $autoload): self
    {
        $this->reset();

        if (isset($autoload['psr-0'])) {
            $this->addPsr0($packageName, (array) $autoload['psr-0']);
        }

        if (isset($autoload['psr-4'])) {
            $this->addPsr4($packageName, (array) $autoload['psr-4']);
        }

        if (isset($autoload['classmap'])) {
            $this->addClassmap($packageName, (array) $autoload['classmap']);
        }

        if (isset($autoload['exclude-from-classmap'])) {
            $this->setExcludes((array) $autoload['exclude-from-classmap']);
        }

        return $this;
    }