From 0305fc26f0b1cbad43e2b0277cd07a9be790374f Mon Sep 17 00:00:00 2001 From: Simon Sprankel Date: Mon, 17 Jan 2022 21:07:32 +0100 Subject: [PATCH] Fix Magento version detection, fixes #2905 (#2906) --- recipe/magento2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/magento2.php b/recipe/magento2.php index 984e08bb..3629bec2 100644 --- a/recipe/magento2.php +++ b/recipe/magento2.php @@ -59,8 +59,8 @@ set('clear_paths', [ set('magento_version', function () { // detect version $versionOutput = run('{{bin/php}} {{release_or_current_path}}/bin/magento --version'); - preg_match('/(\d+\.?)+$/', $versionOutput, $matches); - return $matches[0] ?? "2.0"; + preg_match('/(\d+\.?)+(-p\d+)?$/', $versionOutput, $matches); + return $matches[0] ?? '2.0'; }); set('maintenance_mode_status_active', function () {