Install dev dependencies when updating a debug mode instance

Otherwise we run into an error message that web profiler does not exist
This commit is contained in:
Jan Böhmer 2026-01-31 23:36:09 +01:00
parent 6ac7a42cca
commit a78ca675b3

View file

@ -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