Skip to content

Commit c7271e8

Browse files
committed
MAGETWO-52660: Improve performance of static assets deployment
1 parent 333ca0d commit c7271e8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/code/Magento/Deploy/Model/DeployStrategyFactory.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Deploy\Model;
88

99
use Magento\Deploy\Model\Deploy\DeployInterface;
10+
use Magento\Framework\Exception\InputException;
1011
use Magento\Framework\ObjectManagerInterface;
1112

1213
class DeployStrategyFactory
@@ -33,7 +34,7 @@ public function __construct(ObjectManagerInterface $objectManager)
3334
* @param string $type
3435
* @param array $arguments
3536
* @return DeployInterface
36-
* @throws \InvalidArgumentException
37+
* @throws InputException
3738
*/
3839
public function create($type, array $arguments = [])
3940
{
@@ -43,7 +44,7 @@ public function create($type, array $arguments = [])
4344
];
4445

4546
if (!isset($strategyMap[$type])) {
46-
throw new \InvalidArgumentException('Wrong deploy strategy type: ' . $type);
47+
throw new InputException(__('Wrong deploy strategy type: %1', $type));
4748
}
4849

4950
return $this->objectManager->create($strategyMap[$type], $arguments);

app/code/Magento/Deploy/Model/ProcessManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private function createProcess(callable $handler)
8484
}
8585

8686
/**
87-
* Protect against zombie process§
87+
* Protect against zombie process
8888
* @return void
8989
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
9090
*/

app/code/Magento/Deploy/Test/Unit/Model/DeployStrategyFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function setUp()
3535
}
3636

3737
/**
38-
* @expectedException \InvalidArgumentException
38+
* @expectedException \Magento\Framework\Exception\InputException
3939
* @expectedExceptionMessage Wrong deploy strategy type: wrong-type
4040
*/
4141
public function testCreateWithWrongStrategyType()

0 commit comments

Comments
 (0)