Skip to content
Snippets Groups Projects
Commit a43a00aa authored by Sergii Kovalenko's avatar Sergii Kovalenko
Browse files

MAGETWO-56989: Deployment process can't be executed on separate machine

-move deploy static command
parent 5f2167de
Branches
No related merge requests found
......@@ -39,8 +39,8 @@ class Db
Config $config,
\Magento\Cron\Model\Config\Converter\Db $converter
) {
$this->_converter = $converter;
$this->config = $config;
$this->_converter = $converter;
}
/**
......
......@@ -23,7 +23,6 @@
<type name="Magento\Framework\Console\CommandListInterface">
<arguments>
<argument name="commands" xsi:type="array">
<item name="staticContentDeployCommand" xsi:type="object">Magento\Deploy\Console\Command\DeployStaticContentCommand</item>
<item name="setModeCommand" xsi:type="object">Magento\Deploy\Console\Command\SetModeCommand</item>
<item name="showModeCommand" xsi:type="object">Magento\Deploy\Console\Command\ShowModeCommand</item>
<item name="dumpApplicationCommand" xsi:type="object">\Magento\Deploy\Console\Command\App\ApplicationDumpCommand</item>
......
......@@ -135,7 +135,7 @@ class Cli extends SymfonyApplication
$commands = array_merge($commands, $setupCommandList->getCommands());
}
if (count($objectManager->get(\Magento\Framework\App\DeploymentConfig::class)->get('modules'))) {
if ($objectManager->get(\Magento\Framework\App\DeploymentConfig::class)->isAvailable()) {
/** @var \Magento\Framework\Console\CommandListInterface */
$commandList = $objectManager->create(\Magento\Framework\Console\CommandListInterface::class);
$commands = array_merge($commands, $commandList->getCommands());
......
......@@ -3,15 +3,15 @@
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Deploy\Console\Command;
namespace Magento\Setup\Console\Command;
use Magento\Framework\App\Utility\Files;
use Magento\Setup\Model\ObjectManagerProvider;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Magento\Framework\App\ObjectManagerFactory;
use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\Validator\Locale;
use Magento\Framework\Exception\LocalizedException;
......@@ -64,13 +64,6 @@ class DeployStaticContentCommand extends Command
*/
private $validator;
/**
* Factory to get object manager
*
* @var ObjectManagerFactory
*/
private $objectManagerFactory;
/**
* object manager to create various objects
*
......@@ -85,19 +78,16 @@ class DeployStaticContentCommand extends Command
/**
* Inject dependencies
*
* @param ObjectManagerFactory $objectManagerFactory
* @param Locale $validator
* @param ObjectManagerInterface $objectManager
* @param ObjectManagerProvider $objectManagerProvider
* @throws \LogicException When the command name is empty
*/
public function __construct(
ObjectManagerFactory $objectManagerFactory,
Locale $validator,
ObjectManagerInterface $objectManager
ObjectManagerProvider $objectManagerProvider
) {
$this->objectManagerFactory = $objectManagerFactory;
$this->validator = $validator;
$this->objectManager = $objectManager;
$this->objectManager = $objectManagerProvider->get();
parent::__construct();
}
......
......@@ -72,6 +72,7 @@ class CommandList
\Magento\Setup\Console\Command\RollbackCommand::class,
\Magento\Setup\Console\Command\UpgradeCommand::class,
\Magento\Setup\Console\Command\UninstallCommand::class,
\Magento\Setup\Console\Command\DeployStaticContentCommand::class
];
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment