Skip to content

Commit b0e9433

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop latest changes
Accepted Community Pull Requests: - #24193: Use appropriate label for store switch (by @scottsb) - #23085: Minimize complexity for customer address import model (by @sankalpshekhar) - #20765: [Widgets] Mass-action delete for Widgets (by @vasilii-b) - #24187: #24186: CLI: cron:install. Break tasks to default and non-optional. (by @atwixfirster) - #24294: Resolve No validate number when create Website, Store View issue24293 (by @edenduong) - #23818: Standardize the array structure for the getAttributes result (by @thomas-kl1) - #24237: Resolved File type custom option value not showing properly in minicart (by @rani-webkul) - #24213: Resolve Virtual Quote shouldn't display "Shipping & Handling" total when Create New Order (by @edenduong) - #22810: Allow sending email to BCC address when not notifying user. (by @Hailong) Fixed GitHub Issues: - #20764: [Widgets] Bulk delete is not available (reported by @vasilii-b) has been fixed in #20765 by @vasilii-b in 2.3-develop branch Related commits: 1. 073121a 2. 4376b91 3. 7d92ade 4. 0de0857 5. 2fd6ef1 6. 8225526 7. 8746079 8. b56c3c4 - #10040: [2.2.0-RC1.1] cron:install issues (reported by @hostep) has been fixed in #24187 by @atwixfirster in 2.3-develop branch Related commits: 1. 6e16a8f 2. 64d4b37 - #24186: bin/magento cron:install adds extra cron job (reported by @atwixfirster) has been fixed in #24187 by @atwixfirster in 2.3-develop branch Related commits: 1. 6e16a8f 2. 64d4b37 - #24293: No validate number when create Website, Store View (reported by @edenduong) has been fixed in #24294 by @edenduong in 2.3-develop branch Related commits: 1. cd1a93c - #24236: File type custom option value not showing properly in minicart (reported by @rani-webkul) has been fixed in #24237 by @rani-webkul in 2.3-develop branch Related commits: 1. ed1df5f - #24212: Virtual Quote shouldn't display "Shipping & Handling" total when Create New Order (reported by @edenduong) has been fixed in #24213 by @edenduong in 2.3-develop branch Related commits: 1. d794928
2 parents 5c64428 + e8e4065 commit b0e9433

File tree

26 files changed

+495
-143
lines changed

26 files changed

+495
-143
lines changed

app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Backend\Block\System\Store\Edit\Form;
710

811
/**
@@ -129,6 +132,7 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
129132
'label' => __('Sort Order'),
130133
'value' => $storeModel->getSortOrder(),
131134
'required' => false,
135+
'class' => 'validate-number validate-zero-or-greater',
132136
'disabled' => $storeModel->isReadOnly()
133137
]
134138
);

app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Backend\Block\System\Store\Edit\Form;
710

811
/**
@@ -85,6 +88,7 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
8588
'label' => __('Sort Order'),
8689
'value' => $websiteModel->getSortOrder(),
8790
'required' => false,
91+
'class' => 'validate-number validate-zero-or-greater',
8892
'disabled' => $websiteModel->isReadOnly()
8993
]
9094
);

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Minute,Minute
258258
"To use this website you must first enable JavaScript in your browser.","To use this website you must first enable JavaScript in your browser."
259259
"This is only a demo store. You can browse and place orders, but nothing will be processed.","This is only a demo store. You can browse and place orders, but nothing will be processed."
260260
"Report an Issue","Report an Issue"
261-
"Store View:","Store View:"
261+
"Scope:","Scope:"
262262
"Stores Configuration","Stores Configuration"
263263
"Please confirm scope switching. All data that hasn't been saved will be lost.","Please confirm scope switching. All data that hasn't been saved will be lost."
264264
"Additional Cache Management","Additional Cache Management"

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<?php if ($websites = $block->getWebsites()) : ?>
1010

1111
<div class="store-switcher store-view">
12-
<span class="store-switcher-label"><?= $block->escapeHtml(__('Store View:')) ?></span>
12+
<span class="store-switcher-label"><?= $block->escapeHtml(__('Scope:')) ?></span>
1313
<div class="actions dropdown closable">
1414
<input type="hidden" name="store_switcher" id="store_switcher"
1515
data-role="store-view-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreVarName()) ?>"

app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@
4444
<!-- ko if: Array.isArray(option.value) -->
4545
<span data-bind="html: option.value.join('<br>')"></span>
4646
<!-- /ko -->
47-
<!-- ko ifnot: Array.isArray(option.value) -->
47+
<!-- ko if: (!Array.isArray(option.value) && option.option_type == 'file') -->
48+
<span data-bind="html: option.value"></span>
49+
<!-- /ko -->
50+
<!-- ko if: (!Array.isArray(option.value) && option.option_type != 'file') -->
4851
<span data-bind="text: option.value"></span>
4952
<!-- /ko -->
5053
</dd>

app/code/Magento/Cron/Console/Command/CronInstallCommand.php

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Cron\Console\Command;
79

810
use Magento\Framework\Crontab\CrontabManagerInterface;
@@ -19,6 +21,9 @@
1921
*/
2022
class CronInstallCommand extends Command
2123
{
24+
private const COMMAND_OPTION_FORCE = 'force';
25+
private const COMMAND_OPTION_NON_OPTIONAL = 'non-optional';
26+
2227
/**
2328
* @var CrontabManagerInterface
2429
*/
@@ -44,19 +49,27 @@ public function __construct(
4449
}
4550

4651
/**
47-
* {@inheritdoc}
52+
* @inheritdoc
4853
*/
4954
protected function configure()
5055
{
5156
$this->setName('cron:install')
5257
->setDescription('Generates and installs crontab for current user')
53-
->addOption('force', 'f', InputOption::VALUE_NONE, 'Force install tasks');
58+
->addOption(self::COMMAND_OPTION_FORCE, 'f', InputOption::VALUE_NONE, 'Force install tasks')
59+
// @codingStandardsIgnoreStart
60+
->addOption(self::COMMAND_OPTION_NON_OPTIONAL, 'd', InputOption::VALUE_NONE, 'Install only the non-optional (default) tasks');
61+
// @codingStandardsIgnoreEnd
5462

5563
parent::configure();
5664
}
5765

5866
/**
59-
* {@inheritdoc}
67+
* Executes "cron:install" command.
68+
*
69+
* @param InputInterface $input
70+
* @param OutputInterface $output
71+
* @return int|null
72+
* @throws LocalizedException
6073
*/
6174
protected function execute(InputInterface $input, OutputInterface $output)
6275
{
@@ -65,8 +78,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
6578
return Cli::RETURN_FAILURE;
6679
}
6780

81+
$tasks = $this->tasksProvider->getTasks();
82+
if ($input->getOption(self::COMMAND_OPTION_NON_OPTIONAL)) {
83+
$tasks = $this->extractNonOptionalTasks($tasks);
84+
}
85+
6886
try {
69-
$this->crontabManager->saveTasks($this->tasksProvider->getTasks());
87+
$this->crontabManager->saveTasks($tasks);
7088
} catch (LocalizedException $e) {
7189
$output->writeln('<error>' . $e->getMessage() . '</error>');
7290
return Cli::RETURN_FAILURE;
@@ -76,4 +94,23 @@ protected function execute(InputInterface $input, OutputInterface $output)
7694

7795
return Cli::RETURN_SUCCESS;
7896
}
97+
98+
/**
99+
* Returns an array of non-optional tasks
100+
*
101+
* @param array $tasks
102+
* @return array
103+
*/
104+
private function extractNonOptionalTasks(array $tasks = []): array
105+
{
106+
$defaultTasks = [];
107+
108+
foreach ($tasks as $taskCode => $taskParams) {
109+
if (!$taskParams['optional']) {
110+
$defaultTasks[$taskCode] = $taskParams;
111+
}
112+
}
113+
114+
return $defaultTasks;
115+
}
79116
}

app/code/Magento/Cron/etc/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@
6666
<argument name="tasks" xsi:type="array">
6767
<item name="cronMagento" xsi:type="array">
6868
<item name="command" xsi:type="string">{magentoRoot}bin/magento cron:run | grep -v "Ran jobs by schedule" >> {magentoLog}magento.cron.log</item>
69+
<item name="optional" xsi:type="boolean">false</item>
6970
</item>
7071
<item name="cronUpdate" xsi:type="array">
7172
<item name="command" xsi:type="string">{magentoRoot}update/cron.php >> {magentoLog}update.cron.log</item>
73+
<item name="optional" xsi:type="boolean">true</item>
7274
</item>
7375
<item name="cronSetup" xsi:type="array">
7476
<item name="command" xsi:type="string">{magentoRoot}bin/magento setup:cron:run >> {magentoLog}setup.cron.log</item>
77+
<item name="optional" xsi:type="boolean">true</item>
7578
</item>
7679
</argument>
7780
</arguments>

0 commit comments

Comments
 (0)