Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Installer.php
Go to the documentation of this file.
1 <?php
7 
8 use Composer\Repository\InstalledRepositoryInterface;
9 use Composer\IO\IOInterface;
10 use Composer\Composer;
11 use Composer\Factory;
12 use Composer\Json\JsonFile;
13 use Composer\Json\JsonManipulator;
14 use Composer\Installer\LibraryInstaller;
15 use Composer\Installer\InstallerInterface;
16 use Composer\Package\PackageInterface;
18 
22 class Installer extends LibraryInstaller implements InstallerInterface
23 {
29  protected $magentoRootDir = null;
30 
36  protected $defaultMagentoRootDir = './';
37 
43  protected $modmanRootDir = null;
44 
50  protected $isForced = false;
51 
57  protected $_source_dir;
58 
62  protected $_deployStrategy = "copy";
63 
64  const MAGENTO_REMOVE_DEV_FLAG = 'magento-remove-dev';
65  const MAGENTO_MAINTANANCE_FLAG = 'maintenance.flag';
66  const MAGENTO_CACHE_PATH = 'var/cache';
69 
70  protected $noMaintenanceMode = false;
71  protected $originalMagentoRootDir = null;
72  protected $backupMagentoRootDir = null;
73  protected $removeMagentoDev = false;
74  protected $keepMagentoCache = false;
75  protected $_magentoLocalXmlPath = 'app/etc/local.xml';
76  protected $_defaultEnvFilePaths = array(
77  'app/etc/local.xml'
78  );
79  protected $_magentoDevDir = 'dev';
80  protected $_magentoWritableDirs = array(
81  'app/etc',
82  'media',
83  'var'
84  );
85 
89  protected $deployManager;
90 
94  protected $config;
95 
101  protected $appendGitIgnore = false;
102 
107  protected $_pathMappingTranslations = array();
108 
117  public function __construct(IOInterface $io, Composer $composer, $type = 'magento-module')
118  {
119  parent::__construct($io, $composer, $type);
120  $this->initializeVendorDir();
121 
122  $this->annoy( $io );
123 
124  $extra = $composer->getPackage()->getExtra();
125 
126  if (isset($extra['magento-root-dir']) || $rootDirInput = $this->defaultMagentoRootDir) {
127 
128  if (isset($rootDirInput)) {
129  $extra['magento-root-dir'] = $rootDirInput;
130  }
131 
132  $dir = rtrim(trim($extra['magento-root-dir']), '/\\');
133  $this->magentoRootDir = new \SplFileInfo($dir);
134  if (!is_dir($dir) && $io->askConfirmation('magento root dir "' . $dir . '" missing! create now? [Y,n] ')) {
135  $this->initializeMagentoRootDir($dir);
136  $io->write('magento root dir "' . $dir . '" created');
137  }
138 
139  if (!is_dir($dir)) {
140  $dir = $this->vendorDir . "/$dir";
141  $this->magentoRootDir = new \SplFileInfo($dir);
142  }
143  }
144 
145  if (isset($extra['modman-root-dir'])) {
146 
147  $dir = rtrim(trim($extra['modman-root-dir']), '/\\');
148  if (!is_dir($dir)) {
149  $dir = $this->vendorDir . "/$dir";
150  }
151  if (!is_dir($dir)) {
152  throw new \ErrorException("modman root dir \"{$dir}\" is not valid");
153  }
154  $this->modmanRootDir = new \SplFileInfo($dir);
155  }
156 
157  if (isset($extra['magento-deploystrategy'])) {
158  $this->_deployStrategy = (string)$extra['magento-deploystrategy'];
159  if($this->_deployStrategy !== "copy"){
160  $io->write("<warning>Warning: Magento 2 is not tested with \"{$this->_deployStrategy}\" deployment strategy. It may not function properly.</warning>");
161  }
162  }
163 
164  if ((is_null($this->magentoRootDir) || false === $this->magentoRootDir->isDir())
165  && $this->_deployStrategy != 'none'
166  ) {
167  $dir = $this->magentoRootDir instanceof \SplFileInfo ? $this->magentoRootDir->getPathname() : '';
168  $io->write("<error>magento root dir \"{$dir}\" is not valid</error>", true);
169  $io->write('<comment>You need to set an existing path for "magento-root-dir" in your composer.json</comment>', true);
170  $io->write('<comment>For more information please read about the "Usage" in the README of the installer Package</comment>', true);
171  throw new \ErrorException("magento root dir \"{$dir}\" is not valid");
172  }
173 
174  if (isset($extra['magento-force'])) {
175  $this->isForced = (bool)$extra['magento-force'];
176  }
177 
178  if (false !== getenv('MAGENTO_CLOUD_PROJECT')) {
179  $this->setDeployStrategy('none');
180  }
181 
182  if (isset($extra['magento-deploystrategy'])) {
183  $this->setDeployStrategy((string)$extra['magento-deploystrategy']);
184  }
185 
186  if (!empty($extra['auto-append-gitignore'])) {
187  $this->appendGitIgnore = true;
188  }
189 
190  if (!empty($extra['path-mapping-translations'])) {
191  $this->_pathMappingTranslations = (array)$extra['path-mapping-translations'];
192  }
193  }
194 
195 
200  {
201  $this->deployManager = $deployManager;
202  }
203 
204 
205  public function setConfig( ProjectConfig $config )
206  {
207  $this->config = $config;
208  }
209 
213  public function getDeployManager()
214  {
215  return $this->deployManager;
216  }
217 
221  protected function initializeMagentoRootDir() {
222  if (!$this->magentoRootDir->isDir()) {
223  $magentoRootPath = $this->magentoRootDir->getPathname();
224  $pathParts = explode(DIRECTORY_SEPARATOR, $magentoRootPath);
225  $baseDir = explode(DIRECTORY_SEPARATOR, $this->vendorDir);
226  array_pop($baseDir);
227  $pathParts = array_merge($baseDir, $pathParts);
228  $directoryPath = '';
229  foreach ($pathParts as $pathPart) {
230  $directoryPath .= $pathPart . DIRECTORY_SEPARATOR;
231  $this->filesystem->ensureDirectoryExists($directoryPath);
232  }
233  }
234 
235  // $this->getSourceDir($package);
236  }
237 
238 
245  private function updateJsonExtra($extra, $io) {
246 
247  $file = Factory::getComposerFile();
248 
249  if (!file_exists($file) && !file_put_contents($file, "{\n}\n")) {
250  $io->write('<error>' . $file . ' could not be created.</error>');
251 
252  return 1;
253  }
254  if (!is_readable($file)) {
255  $io->write('<error>' . $file . ' is not readable.</error>');
256 
257  return 1;
258  }
259  if (!is_writable($file)) {
260  $io->write('<error>' . $file . ' is not writable.</error>');
261 
262  return 1;
263  }
264 
265  $json = new JsonFile($file);
266  $composer = $json->read();
267  $composerBackup = file_get_contents($json->getPath());
268  $extraKey = 'extra';
269  $baseExtra = array_key_exists($extraKey, $composer) ? $composer[$extraKey] : array();
270 
271  if (!$this->updateFileCleanly($json, $baseExtra, $extra, $extraKey)) {
272  foreach ($extra as $key => $value) {
273  $baseExtra[$key] = $value;
274  }
275 
276  $composer[$extraKey] = $baseExtra;
277  $json->write($composer);
278  }
279  }
280 
281  private function updateFileCleanly($json, array $base, array $new, $rootKey) {
282  $contents = file_get_contents($json->getPath());
283 
284  $manipulator = new JsonManipulator($contents);
285 
286  foreach ($new as $childKey => $childValue) {
287  if (!$manipulator->addLink($rootKey, $childKey, $childValue)) {
288  return false;
289  }
290  }
291 
292  file_put_contents($json->getPath(), $manipulator->getContents());
293 
294  return true;
295  }
296 
300  public function setDeployStrategy($strategy)
301  {
302  $this->_deployStrategy = $strategy;
303  }
304 
312  public function getDeployStrategy(PackageInterface $package, $strategy = null)
313  {
314  if (null === $strategy) {
315  $strategy = $this->_deployStrategy;
316  }
317  $extra = $this->composer->getPackage()->getExtra();
318  if( isset($extra['magento-deploystrategy-overwrite']) ){
319  $moduleSpecificDeployStrategys = $this->transformArrayKeysToLowerCase($extra['magento-deploystrategy-overwrite']);
320  if( isset($moduleSpecificDeployStrategys[$package->getName()]) ){
321  $strategy = $moduleSpecificDeployStrategys[$package->getName()];
322  }
323  }
324  $moduleSpecificDeployIgnores = array();
325  if( isset($extra['magento-deploy-ignore']) ){
326  $extra['magento-deploy-ignore'] = $this->transformArrayKeysToLowerCase($extra['magento-deploy-ignore']);
327  if( isset($extra['magento-deploy-ignore']["*"]) ){
328  $moduleSpecificDeployIgnores = $extra['magento-deploy-ignore']["*"];
329  }
330  if( isset($extra['magento-deploy-ignore'][$package->getName()]) ){
331  $moduleSpecificDeployIgnores = array_merge(
332  $moduleSpecificDeployIgnores,
333  $extra['magento-deploy-ignore'][$package->getName()]
334  );
335  }
336  }
337  if($package->getType() === 'magento-core'){
338  $strategy = 'copy';
339  }
340  $targetDir = $this->getTargetDir();
341  $sourceDir = $this->getSourceDir($package);
342  switch ($strategy) {
343  case 'symlink':
344  $impl = new \MagentoHackathon\Composer\Magento\Deploystrategy\Symlink($sourceDir, $targetDir);
345  break;
346  case 'link':
347  $impl = new \MagentoHackathon\Composer\Magento\Deploystrategy\Link($sourceDir, $targetDir);
348  break;
349  case 'none':
350  $impl = new \MagentoHackathon\Composer\Magento\Deploystrategy\None($sourceDir, $targetDir);
351  break;
352  case 'copy':
353  default:
354  $impl = new \MagentoHackathon\Composer\Magento\Deploystrategy\Copy($sourceDir, $targetDir);
355  }
356  // Inject isForced setting from extra config
357  $impl->setIsForced($this->isForced);
358  $impl->setIgnoredMappings($moduleSpecificDeployIgnores);
359  return $impl;
360  }
361 
368  public function supports($packageType)
369  {
370  return array_key_exists($packageType, PackageTypes::$packageTypes);
371  }
372 
379  protected function getSourceDir(PackageInterface $package)
380  {
381  $this->filesystem->ensureDirectoryExists($this->vendorDir);
382  return $this->getInstallPath($package);
383  }
384 
390  public function getTargetDir()
391  {
392  $targetDir = realpath($this->magentoRootDir->getPathname());
393  return $targetDir;
394  }
395 
402  public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
403  {
404 
405  if ($package->getType() === 'magento-core' && !$this->preInstallMagentoCore()) {
406  return;
407  }
408 
409  parent::install($repo, $package);
410 
411  // skip marshal and apply default behavior if extra->map does not exist
412  if (!$this->hasExtraMap($package)) {
413  return;
414  }
415 
416  $strategy = $this->getDeployStrategy($package);
417  $strategy->setMappings($this->getParser($package)->getMappings());
418  $deployManagerEntry = new Entry();
419  $deployManagerEntry->setPackageName($package->getName());
420  $deployManagerEntry->setDeployStrategy($strategy);
421  $this->deployManager->addPackage($deployManagerEntry);
422 
423  if ($this->appendGitIgnore) {
424  $this->appendGitIgnore($package, $this->getGitIgnoreFileLocation());
425  }
426  }
427 
433  public function getGitIgnoreFileLocation()
434  {
435  $ignoreFile = $this->magentoRootDir->getPathname() . '/.gitignore';
436 
437  return $ignoreFile;
438  }
439 
448  public function appendGitIgnore(PackageInterface $package, $ignoreFile)
449  {
450  $contents = array();
451  if(file_exists($ignoreFile)) {
452  $contents = file($ignoreFile, FILE_IGNORE_NEW_LINES);
453  }
454 
455  $additions = array();
456  foreach($this->getParser($package)->getMappings() as $map) {
457  $dest = $map[1];
458  $ignore = sprintf("/%s", $dest);
459  $ignore = str_replace('/./','/', $ignore);
460  $ignore = str_replace('//','/', $ignore);
461  $ignore = rtrim($ignore,'/');
462  if(!in_array($ignore, $contents)) {
463  $ignoredMappings = $this->getDeployStrategy($package)->getIgnoredMappings();
464  if( in_array($ignore, $ignoredMappings) ){
465  continue;
466  }
467 
468  $additions[] = $ignore;
469  }
470  }
471 
472  if(!empty($additions)) {
473  array_unshift($additions, '#' . $package->getName());
474  $contents = array_merge($contents, $additions);
475  file_put_contents($ignoreFile, implode("\n", $contents));
476  }
477 
478  if ($package->getType() === 'magento-core') {
479  $this->prepareMagentoCore();
480  }
481  }
482 
489  protected function preInstallMagentoCore() {
490  if (!$this->io->askConfirmation('<info>Are you sure you want to install the Magento core?</info><error>Attention: Your Magento root dir will be cleared in the process!</error> [<comment>Y,n</comment>] ', true)) {
491  $this->io->write('Skipping core installation...');
492  return false;
493  }
494  $this->clearRootDir();
495  return true;
496  }
497 
498  protected function clearRootDir() {
499  $this->filesystem->removeDirectory($this->magentoRootDir->getPathname());
500  $this->filesystem->ensureDirectoryExists($this->magentoRootDir->getPathname());
501  }
502 
503  public function prepareMagentoCore() {
504  $this->setMagentoPermissions();
505  $this->redeployProject();
506  }
507 
511  protected function setMagentoPermissions() {
512  foreach ($this->_magentoWritableDirs as $dir) {
513  if (!file_exists($this->getTargetDir() . DIRECTORY_SEPARATOR . $dir)) {
514  mkdir($this->getTargetDir() . DIRECTORY_SEPARATOR . $dir, 0777, true);
515  }
516  $this->setPermissions($this->getTargetDir() . DIRECTORY_SEPARATOR . $dir, 0777, 0666);
517  }
518  }
519 
527  protected function setPermissions($path, $dirmode, $filemode) {
528  if (is_dir($path)) {
529  if (!@chmod($path, $dirmode)) {
530  $this->io->write(
531  'Failed to set permissions "%s" for directory "%s"', decoct($dirmode), $path
532  );
533  }
534  $dh = opendir($path);
535  while (($file = readdir($dh)) !== false) {
536  if ($file != '.' && $file != '..') { // skip self and parent pointing directories
537  $fullpath = $path . '/' . $file;
538  $this->setPermissions($fullpath, $dirmode, $filemode);
539  }
540  }
541  closedir($dh);
542  } elseif (is_file($path)) {
543  if (false == !@chmod($path, $filemode)) {
544  $this->io->write(
545  'Failed to set permissions "%s" for file "%s"', decoct($filemode), $path
546  );
547  }
548  }
549  }
550 
551  protected function redeployProject() {
552  $ioInterface = $this->io;
553  // init repos
554  $composer = $this->composer;
555  $installedRepo = $composer->getRepositoryManager()->getLocalRepository();
556 
557  $dm = $composer->getDownloadManager();
558  $im = $composer->getInstallationManager();
559 
560  /*
561  * @var $moduleInstaller MagentoHackathon\Composer\Magento\Installer
562  */
563  $moduleInstaller = $im->getInstaller("magento-module");
564 
565  foreach ($installedRepo->getPackages() as $package) {
566 
567  if ($ioInterface->isVerbose()) {
568  $ioInterface->write($package->getName());
569  $ioInterface->write($package->getType());
570  }
571 
572  if ($package->getType() != "magento-module") {
573  continue;
574  }
575  if ($ioInterface->isVerbose()) {
576  $ioInterface->write("package {$package->getName()} recognized");
577  }
578 
579  $strategy = $moduleInstaller->getDeployStrategy($package);
580  if ($ioInterface->getOption('verbose')) {
581  $ioInterface->write("used " . get_class($strategy) . " as deploy strategy");
582  }
583  $strategy->setMappings($moduleInstaller->getParser($package)->getMappings());
584 
585  $strategy->deploy();
586  }
587 
588 
589  return;
590  }
591 
601  public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
602  {
603 
604  if ($target->getType() === 'magento-core' && !$this->preUpdateMagentoCore()) {
605  return;
606  }
607 
608  // cleanup marshaled files if extra->map exist
609  if ($this->hasExtraMap($initial)) {
610  $initialStrategy = $this->getDeployStrategy($initial);
611  $initialStrategy->setMappings($this->getParser($initial)->getMappings());
612  try {
613  $initialStrategy->clean();
614  } catch (\ErrorException $e) {
615  if ($this->io->isDebug()) {
616  $this->io->write($e->getMessage());
617  }
618  }
619  }
620 
621  parent::update($repo, $initial, $target);
622 
623  // marshal files for new package version if extra->map exist
624  if ($this->hasExtraMap($target)) {
625  $targetStrategy = $this->getDeployStrategy($target);
626  $targetStrategy->setMappings($this->getParser($target)->getMappings());
627  $deployManagerEntry = new Entry();
628  $deployManagerEntry->setPackageName($target->getName());
629  $deployManagerEntry->setDeployStrategy($targetStrategy);
630  $this->deployManager->addPackage($deployManagerEntry);
631  }
632 
633  if($this->appendGitIgnore) {
634  $this->appendGitIgnore($target, $this->getGitIgnoreFileLocation());
635  }
636 
637  if ($target->getType() === 'magento-core') {
638  $this->postUpdateMagentoCore();
639  }
640  }
641 
642 
643  protected function preUpdateMagentoCore() {
644  if (!$this->io->askConfirmation('<info>Are you sure you want to manipulate the Magento core installation</info> [<comment>Y,n</comment>]? ', true)) {
645  $this->io->write('Skipping core update...');
646  return false;
647  }
648  $tmpDir = $this->magentoRootDir->getPathname() . self::MAGENTO_ROOT_DIR_TMP_SUFFIX;
649  $this->filesystem->ensureDirectoryExists($tmpDir);
650  $this->originalMagentoRootDir = clone $this->magentoRootDir;
651  $this->magentoRootDir = new \SplFileInfo($tmpDir);
652  return true;
653  }
654 
655  protected function postUpdateMagentoCore() {
656  $tmpDir = $this->magentoRootDir->getPathname();
657  $backupDir = $this->originalMagentoRootDir->getPathname() . self::MAGENTO_ROOT_DIR_BACKUP_SUFFIX;
658  $this->backupMagentoRootDir = new \SplFileInfo($backupDir);
659 
660  $origRootDir = $this->originalMagentoRootDir->getPathName();
661  $this->filesystem->rename($origRootDir, $backupDir);
662  $this->filesystem->rename($tmpDir, $origRootDir);
663  $this->magentoRootDir = clone $this->originalMagentoRootDir;
664 
665  $this->prepareMagentoCore();
667  }
668 
669  protected function cleanupPostUpdateMagentoCore() {
670  $rootDir = $this->magentoRootDir->getPathname();
671  $backupDir = $this->backupMagentoRootDir->getPathname();
672  $persistentFolders = array('media', 'var');
673  copy($backupDir . DIRECTORY_SEPARATOR . $this->_magentoLocalXmlPath, $rootDir . DIRECTORY_SEPARATOR . $this->_magentoLocalXmlPath);
674  foreach ($persistentFolders as $folder) {
675  $this->filesystem->removeDirectory($rootDir . DIRECTORY_SEPARATOR . $folder);
676  $this->filesystem->rename($backupDir . DIRECTORY_SEPARATOR . $folder, $rootDir . DIRECTORY_SEPARATOR . $folder);
677  }
678  if ($this->io->ask('Remove root backup? [Y,n] ', true)) {
679  $this->filesystem->removeDirectory($backupDir);
680  $this->io->write('Removed root backup!', true);
681  } else {
682  $this->io->write('Skipping backup removal...', true);
683  }
684  $this->clearMagentoCache();
685  }
686 
687  public function toggleMagentoMaintenanceMode($active = false) {
688  if (($targetDir = $this->getTargetDir()) && !$this->noMaintenanceMode) {
689  $flagPath = $targetDir . DIRECTORY_SEPARATOR . self::MAGENTO_MAINTANANCE_FLAG;
690  if ($active) {
691  $this->io->write("Adding magento maintenance flag...");
692  file_put_contents($flagPath, '*');
693  } elseif (file_exists($flagPath)) {
694  $this->io->write("Removing magento maintenance flag...");
695  unlink($flagPath);
696  }
697  }
698  }
699 
700  public function clearMagentoCache() {
701  if (($targetDir = $this->getTargetDir()) && !$this->keepMagentoCache) {
702  $magentoCachePath = $targetDir . DIRECTORY_SEPARATOR . self::MAGENTO_CACHE_PATH;
703  if ($this->filesystem->removeDirectory($magentoCachePath)) {
704  $this->io->write('Magento cache cleared');
705  }
706  }
707  }
708 
715  public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
716  {
717  // skip marshal and apply default behavior if extra->map does not exist
718  if (!$this->hasExtraMap($package)) {
719  parent::uninstall($repo, $package);
720  return;
721  }
722 
723  $strategy = $this->getDeployStrategy($package);
724  $strategy->setMappings($this->getParser($package)->getMappings());
725  try {
726  $strategy->clean();
727  } catch (\ErrorException $e) {
728  if ($this->io->isDebug()) {
729  $this->io->write($e->getMessage());
730  }
731  }
732 
733  parent::uninstall($repo, $package);
734  }
735 
743  public function getParser(PackageInterface $package)
744  {
745  $extra = $package->getExtra();
746  $moduleSpecificMap = $this->composer->getPackage()->getExtra();
747  if( isset($moduleSpecificMap['magento-map-overwrite']) ){
748  $moduleSpecificMap = $this->transformArrayKeysToLowerCase($moduleSpecificMap['magento-map-overwrite']);
749  if( isset($moduleSpecificMap[$package->getName()]) ){
750  $map = $moduleSpecificMap[$package->getName()];
751  }
752  }
753  $suffix = PackageTypes::$packageTypes[$package->getType()];
754  if (isset($map)) {
755  $parser = new MapParser($map, $this->_pathMappingTranslations,$suffix);
756  return $parser;
757  } elseif (isset($extra['map'])) {
758  $parser = new MapParser($extra['map'], $this->_pathMappingTranslations, $suffix);
759  return $parser;
760  } elseif (isset($extra['package-xml'])) {
761  $parser = new PackageXmlParser($this->getSourceDir($package), $extra['package-xml'], $this->_pathMappingTranslations, $suffix);
762  return $parser;
763  } elseif (file_exists($this->getSourceDir($package) . '/modman')) {
764  $parser = new ModmanParser($this->getSourceDir($package), $this->_pathMappingTranslations, $suffix);
765  return $parser;
766  } else {
767  throw new \ErrorException('Unable to find deploy strategy for module: no known mapping');
768  }
769 
770  }
771 
775  public function getInstallPath(PackageInterface $package)
776  {
777 
778  if (!is_null($this->modmanRootDir) && true === $this->modmanRootDir->isDir()) {
779  $targetDir = $package->getTargetDir();
780  if (!$targetDir) {
781  list($vendor, $targetDir) = explode('/', $package->getPrettyName());
782  }
783  $installPath = $this->modmanRootDir . '/' . $targetDir;
784  } else {
785  $installPath = parent::getInstallPath($package);
786  }
787 
788  // Make install path absolute. This is needed in the symlink deploy strategies.
789  if (DIRECTORY_SEPARATOR !== $installPath[0] && $installPath[1] !== ':') {
790  $installPath = getcwd() . "/$installPath";
791  }
792 
793  return $installPath;
794  }
795 
796  public function transformArrayKeysToLowerCase($array)
797  {
798  $arrayNew = array();
799  foreach($array as $key=>$value){
800  $arrayNew[strtolower($key)] = $value;
801  }
802  return $arrayNew;
803  }
804 
812  public function annoy(IOInterface $io)
813  {
814 
818  /*
819  $io->write('<comment> time for voting about the future of the #magento #composer installer. </comment>', true);
820  $io->write('<comment> https://github.com/magento-hackathon/magento-composer-installer/blob/discussion-master/Milestone/2/index.md </comment>', true);
821  $io->write('<error> For the case you don\'t vote, I will ignore your problems till iam finished with the resulting release. </error>', true);
822  *
823  **/
824  }
825 
832  private function hasExtraMap(PackageInterface $package) {
833  $packageExtra = $package->getExtra();
834  if (isset($packageExtra['map'])) {
835  return true;
836  }
837 
838  return false;
839  }
840 }
$contents
Definition: website.php:14
setDeployManager(DeployManager $deployManager)
Definition: Installer.php:199
$suffix
Definition: name.phtml:27
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$baseDir
Definition: autoload.php:9
getSourceDir(PackageInterface $package)
Definition: Installer.php:379
$target
Definition: skip.phtml:8
getDeployStrategy(PackageInterface $package, $strategy=null)
Definition: Installer.php:312
$type
Definition: item.phtml:13
setPermissions($path, $dirmode, $filemode)
Definition: Installer.php:527
appendGitIgnore(PackageInterface $package, $ignoreFile)
Definition: Installer.php:448
Definition: Entry.php:12
$value
Definition: gender.phtml:16
uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
Definition: Installer.php:715
is_writable($path)
Definition: io.php:25
update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
Definition: Installer.php:601
getParser(PackageInterface $package)
Definition: Installer.php:743
$rootDir
Definition: website.php:12
mkdir($pathname, $mode=0777, $recursive=false, $context=null)
Definition: ioMock.php:25
__construct(IOInterface $io, Composer $composer, $type='magento-module')
Definition: Installer.php:117
install(InstalledRepositoryInterface $repo, PackageInterface $package)
Definition: Installer.php:402
getInstallPath(PackageInterface $package)
Definition: Installer.php:775
if( $_orders &&count( $_orders))( 'Orders') ?></caption >< thead >< tr >< th scopeforeach( $_orders as $_order)(__( 'Order #')) ?>" class $extra
Definition: history.phtml:32