mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-11 12:09:36 +00: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:
parent
6ac7a42cca
commit
a78ca675b3
1 changed files with 21 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue