Allow for disabling autoloader on Installer
parent
b23a3cd368
commit
5896f283be
|
@ -105,6 +105,7 @@ class Installer
|
|||
protected $dryRun = false;
|
||||
protected $verbose = false;
|
||||
protected $update = false;
|
||||
protected $runAutoloader = true;
|
||||
protected $runScripts = true;
|
||||
protected $ignorePlatformReqs = false;
|
||||
/**
|
||||
|
@ -311,6 +312,7 @@ class Installer
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->runAutoloader) {
|
||||
// write autoloader
|
||||
if ($this->optimizeAutoloader) {
|
||||
$this->io->write('<info>Generating optimized autoload files</info>');
|
||||
|
@ -320,6 +322,7 @@ class Installer
|
|||
|
||||
$this->autoloadGenerator->setDevMode($this->devMode);
|
||||
$this->autoloadGenerator->dump($this->config, $localRepo, $this->package, $this->installationManager, 'composer', $this->optimizeAutoloader);
|
||||
}
|
||||
|
||||
if ($this->runScripts) {
|
||||
// dispatch post event
|
||||
|
@ -1152,6 +1155,21 @@ class Installer
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set whether to run autoloader or not
|
||||
*
|
||||
* @param boolean $runAutoloader
|
||||
* @return Installer
|
||||
*/
|
||||
public function setRunAutoloader($runAutoloader = true)
|
||||
{
|
||||
$this->runAutoloader = (boolean) $runAutoloader;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set whether to run scripts or not
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue