diff --git a/src/N98/Magento/Command/Developer/Module/DetectComposerDependenciesCommand.php b/src/N98/Magento/Command/Developer/Module/DetectComposerDependenciesCommand.php index 6e1c85ba..b0843888 100644 --- a/src/N98/Magento/Command/Developer/Module/DetectComposerDependenciesCommand.php +++ b/src/N98/Magento/Command/Developer/Module/DetectComposerDependenciesCommand.php @@ -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; }