Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MagentoComposerApplicationFactory.php
Go to the documentation of this file.
1 <?php
8 
13 
15 {
16 
20  private $pathToComposerHome;
21 
25  private $pathToComposerJson;
26 
33  public function __construct(ComposerJsonFinder $composerJsonFinder, DirectoryList $directoryList)
34  {
35  $this->pathToComposerJson = $composerJsonFinder->findComposerJson();
36  $this->pathToComposerHome = $directoryList->getPath(DirectoryList::COMPOSER_HOME);
37  }
38 
44  public function create()
45  {
46  return new MagentoComposerApplication($this->pathToComposerHome, $this->pathToComposerJson);
47  }
48 
54  public function createInfoCommand()
55  {
56  return new InfoCommand($this->create());
57  }
58 
65  {
66  return new RequireUpdateDryRunCommand($this->create(), $this->createInfoCommand());
67  }
68 }
__construct(ComposerJsonFinder $composerJsonFinder, DirectoryList $directoryList)