Skip to content

Commit

Permalink
Remove patch level in recommended version
Browse files Browse the repository at this point in the history
Related to netz98#1358
  • Loading branch information
cmuench committed Apr 27, 2024
1 parent bcf01bc commit b2a4082
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,13 @@ private function formatOutput(array $dependencies): string
$output = '"require": { ' . "\n";

foreach ($dependencies as $name => $version) {

/**
* remove patch level (e.g. -p5) from version
* @link https://github.com/netz98/n98-magerun2/issues/1358
*/
$version = preg_replace('/-p[0-9]+$/', '', $version);

if ($name === self::COMPOSER_FILE_NOT_FOUND) {
$composerFileNotFound .= 'file: ' . $version;
}
Expand Down

0 comments on commit b2a4082

Please sign in to comment.