diff --git a/composer.json b/composer.json index eb712e9..d55e2dc 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ }, "scripts": { "phpmd": "./vendor/bin/phpmd ./src,./tests ansi ruleset.xml", - "test": "./vendor/bin/phpunit --debug --testsuite=Unit", + "test": "./vendor/bin/phpunit --testsuite=Unit", "test-integration": "./vendor/bin/phpunit --testsuite=Integration", "phpstan": "./vendor/bin/phpstan", "lint": "./vendor/bin/php-cs-fixer fix" diff --git a/src/Commands/UnlinkCommand.php b/src/Commands/UnlinkCommand.php index 3161dab..0dab206 100644 --- a/src/Commands/UnlinkCommand.php +++ b/src/Commands/UnlinkCommand.php @@ -36,10 +36,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $paths = $this->getPaths($input); foreach ($paths as $path) { - $linkedPackage = $this->plugin->getPackageFactory()->fromPath($path->getNormalizedPath()); - $repository = $this->plugin->getRepository(); - $linkedPackage = $repository->findByPath($linkedPackage->getPath()); + $linkedPackage = $repository->findByPath($path->getNormalizedPath()); if ($linkedPackage === null) { continue;