1
0
Fork 0

Accessing to option 'optimize-autoloder' inside 'post-autoload-dump' script event.

pull/3327/head
Artur Eshenbrener 2014-10-03 18:28:16 +04:00
parent 1e4229e22a
commit ad1d0be420
1 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,9 @@ class AutoloadGenerator
public function dump(Config $config, InstalledRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsr0Packages = false, $suffix = '') public function dump(Config $config, InstalledRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsr0Packages = false, $suffix = '')
{ {
$this->eventDispatcher->dispatchScript(ScriptEvents::PRE_AUTOLOAD_DUMP, $this->devMode); $this->eventDispatcher->dispatchScript(ScriptEvents::PRE_AUTOLOAD_DUMP, $this->devMode, array(
'optimize' => (bool) $scanPsr0Packages
));
$filesystem = new Filesystem(); $filesystem = new Filesystem();
$filesystem->ensureDirectoryExists($config->get('vendor-dir')); $filesystem->ensureDirectoryExists($config->get('vendor-dir'));
@ -235,7 +237,9 @@ EOF;
fclose($targetLoader); fclose($targetLoader);
unset($sourceLoader, $targetLoader); unset($sourceLoader, $targetLoader);
$this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode); $this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, [
'optimize' => (bool) $scanPsr0Packages,
]);
} }
public function buildPackageMap(InstallationManager $installationManager, PackageInterface $mainPackage, array $packages) public function buildPackageMap(InstallationManager $installationManager, PackageInterface $mainPackage, array $packages)