/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Composer/ComposerFactory.php
50 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2016 Adobe * All Rights Reserved. */ namespace Magento\Framework\Composer; use Composer\IO\BufferIO; use Magento\Framework\App\Filesystem\DirectoryList; class ComposerFactory { /** * @var DirectoryList */ private $directoryList; /** * @var ComposerJsonFinder */ private $composerJsonFinder; /** * @param DirectoryList $directoryList * @param ComposerJsonFinder $composerJsonFinder */ public function __construct( DirectoryList $directoryList, ComposerJsonFinder $composerJsonFinder ) { $this->directoryList = $directoryList; $this->composerJsonFinder = $composerJsonFinder; } /** * Create \Composer\Composer * * @return \Composer\Composer * @throws \Exception */ public function create() { putenv('COMPOSER_HOME=' . $this->directoryList->getPath(DirectoryList::COMPOSER_HOME)); return \Composer\Factory::create( new BufferIO(), $this->composerJsonFinder->findComposerJson() ); } }