From a78ca675b33d47d80ad9d236dae5aec04acdee1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 31 Jan 2026 23:36:09 +0100 Subject: [PATCH] Install dev dependencies when updating a debug mode instance Otherwise we run into an error message that web profiler does not exist --- src/Services/System/UpdateExecutor.php | 29 +++++++++++++++++++------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/Services/System/UpdateExecutor.php b/src/Services/System/UpdateExecutor.php index 837cde4c..a34e620b 100644 --- a/src/Services/System/UpdateExecutor.php +++ b/src/Services/System/UpdateExecutor.php @@ -53,7 +53,10 @@ class UpdateExecutor private readonly LoggerInterface $logger, private readonly Filesystem $filesystem, private readonly InstallationTypeDetector $installationTypeDetector, private readonly VersionManagerInterface $versionManager, - private readonly EntityManagerInterface $entityManager) + private readonly EntityManagerInterface $entityManager, + #[Autowire(param: 'app.debug_mode')] + private readonly bool $debugMode = false + ) { } @@ -361,13 +364,23 @@ class UpdateExecutor // Step 7: Install dependencies $stepStart = microtime(true); - $this->runCommand([ - 'composer', 'install', - '--no-dev', - '--optimize-autoloader', - '--no-interaction', - '--no-progress', - ], 'Install dependencies', 600); + if ($this->debugMode) { + $this->runCommand([ //Install with dev dependencies in debug mode + 'composer', + 'install', + '--no-interaction', + '--no-progress', + ], 'Install dependencies', 600); + } else { + $this->runCommand([ + 'composer', + 'install', + '--no-dev', + '--optimize-autoloader', + '--no-interaction', + '--no-progress', + ], 'Install dependencies', 600); + } $log('composer', 'Installed/updated dependencies', true, microtime(true) - $stepStart); // Step 8: Run database migrations