Skip to content

Commit

Permalink
Revert "Support relative paths in the generated config (#17)"
Browse files Browse the repository at this point in the history
This reverts commit 66c7adc.
  • Loading branch information
ondrejmirtes committed Dec 13, 2020
1 parent 7418efb commit 0848024
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Composer\Script\ScriptEvents;
use Composer\Util\Filesystem;
use function array_keys;
use function file_exists;
use function file_put_contents;
Expand Down Expand Up @@ -95,7 +94,6 @@ public function process(Event $event): void
$installedPackages = [];

$data = [];
$fs = new Filesystem();
foreach ($composer->getRepositoryManager()->getLocalRepository()->getPackages() as $package) {
if (
$package->getType() !== 'phpstan-extension'
Expand All @@ -114,10 +112,8 @@ public function process(Event $event): void
}
continue;
}
$absoluteInstallPath = $installationManager->getInstallPath($package);
$data[$package->getName()] = [
'install_path' => $absoluteInstallPath,
'relative_install_path' => $fs->findShortestPath(dirname($generatedConfigFilePath), $absoluteInstallPath, true),
'install_path' => $installationManager->getInstallPath($package),
'extra' => $package->getExtra()['phpstan'] ?? null,
'version' => $package->getFullPrettyVersion(),
];
Expand Down

0 comments on commit 0848024

Please sign in to comment.