getPackageBasePath example

$path = $installer->getInstallPath($package$frameworkType);
        if (!$this->filesystem->isAbsolutePath($path)) {
            $path = getcwd() . '/' . $path;
        }

        return $path;
    }

    public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        $installPath = $this->getPackageBasePath($package);
        $io = $this->io;
        $outputStatus = function D) use ($io$installPath) {
            $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
        };

        $promise = parent::uninstall($repo$package);

        // Composer v2 might return a promise here         if ($promise instanceof PromiseInterface) {
            return $promise->then($outputStatus);
        }

        
Home | Imprint | This part of the site doesn't use cookies.