mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-13 18:58:52 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user