Skip to content

Commit 07a5957

Browse files
committed
Merge remote-tracking branch 'origin/AC-9499' into Hammer_PlatForm_Health_247Beta3_03Jan23
2 parents 804d6be + 34626d9 commit 07a5957

File tree

15 files changed

+651
-334
lines changed

15 files changed

+651
-334
lines changed

app/code/Magento/Deploy/Console/ConsoleLogger.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class ConsoleLogger extends AbstractLogger
2222
/**
2323
* Type for informational message
2424
*/
25-
const INFO = 'info';
25+
public const INFO = 'info';
2626

2727
/**
2828
* Type for error message
2929
*/
30-
const ERROR = 'error';
30+
public const ERROR = 'error';
3131

3232
/**
3333
* Public static files directory read interface
@@ -217,7 +217,7 @@ private function refresh(OutputInterface $output)
217217
* @param array $process
218218
* @return void
219219
*/
220-
private function updateProcessInfo($deployedPackagePath, array & $process)
220+
private function updateProcessInfo($deployedPackagePath, array &$process)
221221
{
222222
$packageDeploymentInfo = $this->getPackageDeploymentInfo($deployedPackagePath . '/info.json');
223223
if ($packageDeploymentInfo) {
@@ -291,7 +291,7 @@ private function renderBar(OutputInterface $output, array $process)
291291
$display = str_repeat('=', $completeBars);
292292
if ($completeBars < 28) {
293293
$emptyBars = 28 - $completeBars
294-
- $this->formatterHelper->strlenWithoutDecoration($output->getFormatter(), '>');
294+
- FormatterHelper::width($this->formatterHelper->removeDecoration($output->getFormatter(), '>'));
295295
$display .= '>' . str_repeat('-', $emptyBars);
296296
}
297297
return $display;

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ public function testRegenerateStatic(): void
149149
$this->shell
150150
->expects($this->exactly(4))
151151
->method('execute')
152-
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd]);
152+
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd])
153+
->willReturn("Compilation complete");
153154

154155
$this->output
155156
->method('writeln')
@@ -176,9 +177,18 @@ public function testGenerateStaticForNotAllowedStoreViewLocale(): void
176177
$this->expectExceptionMessage(
177178
';echo argument has invalid value, run info:language:list for list of available locales'
178179
);
180+
$setupDiCompileCmd = $this->cmdPrefix . 'setup:di:compile';
179181
$storeLocales = ['fr_FR', 'de_DE', ';echo'];
180182
$this->storeView->method('retrieveLocales')
181183
->willReturn($storeLocales);
184+
$cacheFlushCmd = $this->cmdPrefix . 'cache:flush';
185+
$staticContentDeployCmd = $this->cmdPrefix . 'setup:static-content:deploy -f '
186+
. implode(' ', $storeLocales);
187+
$this->shell
188+
->expects($this->exactly(3))
189+
->method('execute')
190+
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd])
191+
->willReturn("Compilation complete");
182192

183193
$this->initAdminLocaleMock('en_US');
184194

@@ -196,9 +206,18 @@ public function testGenerateStaticForNotAllowedAdminLocale(): void
196206
$this->expectExceptionMessage(
197207
';echo argument has invalid value, run info:language:list for list of available locales'
198208
);
209+
$setupDiCompileCmd = $this->cmdPrefix . 'setup:di:compile';
199210
$storeLocales = ['fr_FR', 'de_DE', 'en_US'];
211+
$cacheFlushCmd = $this->cmdPrefix . 'cache:flush';
212+
$staticContentDeployCmd = $this->cmdPrefix . 'setup:static-content:deploy -f '
213+
. implode(' ', $storeLocales);
200214
$this->storeView->method('retrieveLocales')
201215
->willReturn($storeLocales);
216+
$this->shell
217+
->expects($this->exactly(3))
218+
->method('execute')
219+
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd])
220+
->willReturn("Compilation complete");
202221

203222
$this->initAdminLocaleMock(';echo');
204223

app/code/Magento/Developer/Console/Command/GeneratePatchCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
183183
$fileWriter->writeFile($patchFile, $patchTemplateData);
184184

185185
$outputPatchFile = str_replace($this->directoryList->getRoot() . '/', '', $patchDir . '/' . $patchFile);
186-
$output->writeln(__('Patch %1 has been successfully generated.', $outputPatchFile));
186+
$output->writeln(sprintf('Patch 1% has been successfully generated.', $outputPatchFile));
187187

188188
return Cli::RETURN_SUCCESS;
189189
}

app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Magento\Framework\Indexer\StateInterface;
1818
use Magento\Indexer\Model\Processor\MakeSharedIndexValid;
1919
use Psr\Log\LoggerInterface;
20+
use Symfony\Component\Console\Helper\HelperSet;
2021
use Symfony\Component\Console\Input\InputInterface;
2122
use Symfony\Component\Console\Output\OutputInterface;
2223

@@ -92,7 +93,7 @@ protected function configure()
9293
/**
9394
* @inheritdoc
9495
*/
95-
protected function execute(InputInterface $input, OutputInterface $output)
96+
protected function execute(InputInterface $input, OutputInterface $output):int
9697
{
9798
$returnValue = Cli::RETURN_SUCCESS;
9899
foreach ($this->getIndexers($input) as $indexer) {

app/code/Magento/Indexer/Console/Command/IndexerSetDimensionsModeCommand/ModeInputArgument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(string $name, int $mode = null, callable $callableDe
3636
/**
3737
* @inheritDoc
3838
*/
39-
public function getDescription()
39+
public function getDescription():string
4040
{
4141
if (null !== $this->callableDescription) {
4242
$description = ($this->callableDescription)();

app/code/Magento/MessageQueue/Console/ConsumerListCommand.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\MessageQueue\Console;
77

8+
use Symfony\Component\Console\Application;
89
use Symfony\Component\Console\Command\Command;
910
use Magento\Framework\MessageQueue\ConfigInterface as QueueConfig;
1011
use Symfony\Component\Console\Input\InputInterface;
@@ -16,7 +17,7 @@
1617
*/
1718
class ConsumerListCommand extends Command
1819
{
19-
const COMMAND_QUEUE_CONSUMERS_LIST = 'queue:consumers:list';
20+
public const COMMAND_QUEUE_CONSUMERS_LIST = 'queue:consumers:list';
2021

2122
/**
2223
* @var ConsumerConfig
@@ -37,7 +38,7 @@ public function __construct(QueueConfig $queueConfig, $name = null)
3738
}
3839

3940
/**
40-
* {@inheritdoc}
41+
* @inheritdoc
4142
*/
4243
protected function execute(InputInterface $input, OutputInterface $output)
4344
{
@@ -47,7 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4748
}
4849

4950
/**
50-
* {@inheritdoc}
51+
* @inheritdoc
5152
*/
5253
protected function configure()
5354
{
@@ -62,6 +63,8 @@ protected function configure()
6263
}
6364

6465
/**
66+
* Get Consumers
67+
*
6568
* @return string[]
6669
*/
6770
private function getConsumers()
@@ -79,6 +82,7 @@ private function getConsumers()
7982
* @return ConsumerConfig
8083
*
8184
* @deprecated 100.2.0
85+
* @see MAGETWO-71174
8286
*/
8387
private function getConsumerConfig()
8488
{

app/code/Magento/Store/Console/Command/StoreListCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class StoreListCommand extends Command
2424
private $storeManager;
2525

2626
/**
27+
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
2728
*/
2829
public function __construct(
2930
\Magento\Store\Model\StoreManagerInterface $storeManager
@@ -33,7 +34,7 @@ public function __construct(
3334
}
3435

3536
/**
36-
* {@inheritdoc}
37+
* @inheritdoc
3738
*/
3839
protected function configure()
3940
{
@@ -44,7 +45,7 @@ protected function configure()
4445
}
4546

4647
/**
47-
* {@inheritdoc}
48+
* @inheritdoc
4849
*/
4950
protected function execute(InputInterface $input, OutputInterface $output)
5051
{

app/code/Magento/Translation/Test/Unit/Console/Command/UninstallLanguageCommandTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public function testExecute()
9898
->method('create')
9999
->willReturn($backupRollback);
100100

101-
$this->remove->expects($this->once())->method('remove');
101+
$this->remove->expects($this->once())->method('remove')
102+
->willReturn('vendor/language-ua_ua');
102103
$this->cache->expects($this->once())->method('clean');
103104

104105
$this->tester->execute(['package' => ['vendor/language-ua_ua'], '--backup-code' => true]);
@@ -122,7 +123,8 @@ public function testExecuteNoBackupOption()
122123
);
123124

124125
$this->backupRollbackFactory->expects($this->never())->method('create');
125-
$this->remove->expects($this->once())->method('remove');
126+
$this->remove->expects($this->once())->method('remove')
127+
->willReturn('vendor/language-ua_ua');
126128
$this->cache->expects($this->once())->method('clean');
127129

128130
$this->tester->execute(['package' => ['vendor/language-ua_ua']]);

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@
8181
"phpseclib/mcrypt_compat": "^2.0",
8282
"phpseclib/phpseclib": "^3.0",
8383
"ramsey/uuid": "^4.2",
84-
"symfony/console": "^5.4",
85-
"symfony/intl": "^5.4",
86-
"symfony/process": "<=5.4.23",
87-
"symfony/string": "^5.4",
84+
"symfony/console": "^6.4",
85+
"symfony/intl": "^6.4",
86+
"symfony/process": "^6.4",
87+
"symfony/string": "^6.4",
8888
"tedivm/jshrink": "^1.4",
8989
"tubalmartin/cssmin": "^4.1",
9090
"web-token/jwt-framework": "^3.1",
@@ -98,13 +98,13 @@
9898
"friendsofphp/php-cs-fixer": "^3.22",
9999
"lusitanian/oauth": "^0.8",
100100
"magento/magento-coding-standard": "*",
101-
"magento/magento2-functional-testing-framework": "^4.6",
101+
"magento/magento2-functional-testing-framework": "^4.7",
102102
"pdepend/pdepend": "^2.10",
103103
"phpmd/phpmd": "^2.12",
104-
"phpstan/phpstan": "^1.9",
104+
"phpstan/phpstan": "^1.9, <1.10.29",
105105
"phpunit/phpunit": "^9.5",
106106
"sebastian/phpcpd": "^6.0",
107-
"symfony/finder": "^5.4"
107+
"symfony/finder": "^6.4"
108108
},
109109
"suggest": {
110110
"ext-pcntl": "Need for run processes in parallel mode"

0 commit comments

Comments
 (0)