Skip to content

Commit

Permalink
Enhancement: Sort packages by name
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and ondrejmirtes committed Dec 17, 2019
1 parent 6f88be1 commit a8d465a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public function process(Event $event): void
$installedPackages[$package->getName()] = true;
}

ksort($data);
ksort($installedPackages);
ksort($notInstalledPackages);

$generatedConfigFileContents = sprintf(self::$generatedFileTemplate, var_export($data, true), var_export($notInstalledPackages, true));
file_put_contents($generatedConfigFilePath, $generatedConfigFileContents);
$io->write('<info>phpstan/extension-installer:</info> Extensions installed');
Expand Down

0 comments on commit a8d465a

Please sign in to comment.