Skip to content

Commit 7ba11b8

Browse files
committed
Merge branch '2.4-develop' of http://github.com/magento/magento2 into 2.3-developPR26345
2 parents 43f9e2b + a1fad2b commit 7ba11b8

File tree

788 files changed

+27685
-5838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

788 files changed

+27685
-5838
lines changed

app/code/Magento/AdvancedPricingImportExport/etc/module.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_AdvancedPricingImportExport" >
10-
</module>
9+
<module name="Magento_AdvancedPricingImportExport"/>
1110
</config>

app/code/Magento/Analytics/Model/Connector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
public function execute($commandName)
5454
{
5555
if (!array_key_exists($commandName, $this->commands)) {
56-
throw new NotFoundException(__('Command was not found.'));
56+
throw new NotFoundException(__('Command "%1" was not found.', $commandName));
5757
}
5858

5959
/** @var \Magento\Analytics\Model\Connector\CommandInterface $command */

app/code/Magento/Analytics/Test/Unit/Model/ConnectorTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ public function testExecute()
5757
}
5858

5959
/**
60+
* Executing non-existing command
61+
*
6062
* @expectedException \Magento\Framework\Exception\NotFoundException
63+
* @expectedExceptionMessage Command "register" was not found.
64+
* @return void
6165
*/
62-
public function testExecuteCommandNotFound()
66+
public function testExecuteCommandNotFound(): void
6367
{
6468
$commandName = 'register';
6569
$this->connector->execute($commandName);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"There was an error save new configuration value.","There was an error save new configuration value."
88
"Please select an industry.","Please select an industry."
99
"--Please Select--","--Please Select--"
10-
"Command was not found.","Command was not found."
10+
"Command "%1" was not found.","Command "%1" was not found."
1111
"Input data must be string or convertible into string.","Input data must be string or convertible into string."
1212
"Input data must be non-empty string.","Input data must be non-empty string."
1313
"Not valid cipher method.","Not valid cipher method."

app/code/Magento/Backend/Block/Dashboard/Graph.php

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
*/
1515
class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard
1616
{
17-
/**
18-
* Api URL
19-
*/
2017
const API_URL = 'https://image-charts.com/chart';
2118

2219
/**
@@ -190,8 +187,8 @@ public function getChartUrl($directUrl = true)
190187
$params = [
191188
'cht' => 'lc',
192189
'chls' => '7',
193-
'chf' => 'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0',
194-
'chm' => 'B,f4d4b2,0,0,0',
190+
'chf' => 'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0',
191+
'chm' => 'B,f4d4b2,0,0,0',
195192
'chco' => 'db4814',
196193
'chxs' => '0,0,11|1,0,11',
197194
'chma' => '15,15,15,15'
@@ -237,7 +234,7 @@ public function getChartUrl($directUrl = true)
237234
case '1y':
238235
case '2y':
239236
$d = $dateStart->format('Y-m');
240-
$dateStart->modify('+1 month');
237+
$dateStart->modify('first day of next month');
241238
break;
242239
default:
243240
$d = $dateStart->format('Y-m-d H:00');
@@ -300,20 +297,23 @@ public function getChartUrl($directUrl = true)
300297
$minvalue = min($localminvalue);
301298

302299
// default values
303-
$yLabels = [];
304300
$miny = 0;
305301
$maxy = 0;
306302
$yorigin = 0;
303+
$xAxis = 'x';
304+
$xAxisIndex = 0;
305+
$yAxisIndex = 1;
307306

308307
if ($minvalue >= 0 && $maxvalue >= 0) {
309308
if ($maxvalue > 10) {
310-
$p = pow(10, $this->_getPow((int) $maxvalue));
309+
$p = pow(10, $this->_getPow((int)$maxvalue));
311310
$maxy = ceil($maxvalue / $p) * $p;
312-
$yLabels = range($miny, $maxy, $p);
311+
$yRange = "$yAxisIndex,$miny,$maxy,$p";
313312
} else {
314313
$maxy = ceil($maxvalue + 1);
315-
$yLabels = range($miny, $maxy, 1);
314+
$yRange = "$yAxisIndex,$miny,$maxy,1";
316315
}
316+
$params['chxr'] = $yRange;
317317
$yorigin = 0;
318318
}
319319

@@ -341,22 +341,11 @@ public function getChartUrl($directUrl = true)
341341

342342
$params['chd'] .= $buffer;
343343

344-
$valueBuffer = [];
345-
346344
if (count($this->_axisLabels) > 0) {
347345
$params['chxt'] = implode(',', array_keys($this->_axisLabels));
348-
$indexid = 0;
349-
foreach ($this->_axisLabels as $idx => $labels) {
350-
if ($idx == 'x') {
351-
$this->formatAxisLabelDate((string) $idx, (string) $timezoneLocal);
352-
$tmpstring = implode('|', $this->_axisLabels[$idx]);
353-
$valueBuffer[] = $indexid . ":|" . $tmpstring;
354-
} elseif ($idx == 'y') {
355-
$valueBuffer[] = $indexid . ":|" . implode('|', $yLabels);
356-
}
357-
$indexid++;
358-
}
359-
$params['chxl'] = implode('|', $valueBuffer);
346+
$this->formatAxisLabelDate($xAxis, (string)$timezoneLocal);
347+
$customAxisLabels = $xAxisIndex . ":|" . implode('|', $this->_axisLabels[$xAxis]);
348+
$params['chxl'] = $customAxisLabels . $dataSetdelimiter;
360349
}
361350

362351
// chart size
@@ -368,7 +357,7 @@ public function getChartUrl($directUrl = true)
368357
foreach ($params as $name => $value) {
369358
$p[] = $name . '=' . urlencode($value);
370359
}
371-
return (string) self::API_URL . '?' . implode('&', $p);
360+
return (string)self::API_URL . '?' . implode('&', $p);
372361
}
373362
$gaData = urlencode(base64_encode(json_encode($params)));
374363
$gaHash = $this->_dashboardData->getChartDataHash($gaData);
@@ -392,7 +381,7 @@ private function formatAxisLabelDate($idx, $timezoneLocal)
392381
switch ($this->getDataHelper()->getParam('period')) {
393382
case '24h':
394383
$this->_axisLabels[$idx][$_index] = $this->_localeDate->formatDateTime(
395-
$period->setTime((int) $period->format('H'), 0, 0),
384+
$period->setTime((int)$period->format('H'), 0, 0),
396385
\IntlDateFormatter::NONE,
397386
\IntlDateFormatter::SHORT
398387
);

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\Framework\DataObject;
1010

1111
/**
12+
* Produce html output using the given data source.
13+
*
14+
* phpcs:disable Magento2.Classes.AbstractApi
1215
* Backend grid item abstract renderer
1316
* @api
1417
* @SuppressWarnings(PHPMD.NumberOfChildren)
@@ -53,7 +56,7 @@ public function getColumn()
5356
* Renders grid column
5457
*
5558
* @param DataObject $row
56-
* @return string
59+
* @return string
5760
*/
5861
public function render(DataObject $row)
5962
{
@@ -62,7 +65,7 @@ public function render(DataObject $row)
6265
$result .= $this->getColumn()->getEditOnly() ? ''
6366
: '<span class="admin__grid-control-value">' . $this->_getValue($row) . '</span>';
6467

65-
return $result . $this->_getInputValueElement($row) . '</div>' ;
68+
return $result . $this->_getInputValueElement($row) . '</div>';
6669
}
6770
return $this->_getValue($row);
6871
}
@@ -90,6 +93,7 @@ protected function _getValue(DataObject $row)
9093
if (is_string($getter)) {
9194
return $row->{$getter}();
9295
} elseif (is_callable($getter)) {
96+
//phpcs:ignore Magento2.Functions.DiscouragedFunction
9397
return call_user_func($getter, $row);
9498
}
9599
return '';
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSetStoreInformationConfigurationActionGroup">
12+
<annotations>
13+
<description>Set Store Information configurations</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="storeName" type="string" defaultValue="{{AdminGeneralSetStoreNameConfigData.value}}"/>
17+
<argument name="storeHoursOfOperation" type="string" defaultValue="{{AdminGeneralSetStoreHoursConfigData.value}}"/>
18+
<argument name="vatNumber" type="string" defaultValue="{{AdminGeneralSetVatNumberConfigData.value}}"/>
19+
<argument name="telephone" type="string" defaultValue="{{US_Address_TX.telephone}}"/>
20+
<argument name="country" type="string" defaultValue="{{US_Address_TX.country_id}}"/>
21+
<argument name="state" type="string" defaultValue="{{US_Address_TX.state}}"/>
22+
<argument name="city" type="string" defaultValue="{{US_Address_TX.city}}"/>
23+
<argument name="postcode" type="string" defaultValue="{{US_Address_TX.postcode}}"/>
24+
<argument name="street" type="string" defaultValue="{{US_Address_TX.street[0]}}"/>
25+
</arguments>
26+
<magentoCLI command="config:set {{AdminGeneralSetStoreNameConfigData.path}} '{{storeName}}'" stepKey="setStoreInformationName"/>
27+
<magentoCLI command="config:set {{AdminGeneralSetStorePhoneConfigData.path}} '{{telephone}}'" stepKey="setStoreInformationPhone"/>
28+
<magentoCLI command="config:set {{AdminGeneralSetStoreHoursConfigData.path}} '{{storeHoursOfOperation}}'" stepKey="setStoreHoursInformation"/>
29+
<magentoCLI command="config:set {{AdminGeneralSetCountryConfigData.path}} '{{country}}'" stepKey="setStoreInformationCountry"/>
30+
<magentoCLI command="config:set {{AdminGeneralSetStateConfigData.path}} '{{state}}'" stepKey="setStoreInformationState"/>
31+
<magentoCLI command="config:set {{AdminGeneralSetCityConfigData.path}} '{{city}}'" stepKey="setStoreInformationCity"/>
32+
<magentoCLI command="config:set {{AdminGeneralSetPostcodeConfigData.path}} '{{postcode}}'" stepKey="setStoreInformationPostcode"/>
33+
<magentoCLI command="config:set {{AdminGeneralSetStreetAddressConfigData.path}} '{{street}}'" stepKey="setStoreInformationStreetAddress"/>
34+
<magentoCLI command="config:set {{AdminGeneralSetVatNumberConfigData.path}} '{{vatNumber}}'" stepKey="setStoreInformationVatNumber"/>
35+
</actionGroup>
36+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="LoginActionGroup">
1212
<annotations>
13-
<description>Login to Backend Admin using ENV Admin credentials. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description>
13+
<description>DEPRECATED. Please use LoginAsAdmin instead.
14+
Login to Backend Admin using ENV Admin credentials. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description>
1415
</annotations>
1516

1617
<amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/>

app/code/Magento/Backend/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@
3030
<entity name="AdminGeneralSetStreetAddress2ConfigData">
3131
<data key="path">general/store_information/street_line2</data>
3232
</entity>
33+
<entity name="AdminGeneralSetStateConfigData">
34+
<data key="path">general/store_information/region_id</data>
35+
</entity>
36+
<entity name="AdminGeneralSetStoreHoursConfigData">
37+
<data key="path">general/store_information/hours</data>
38+
<data key="value">8AM-8PM</data>
39+
</entity>
3340
</entities>

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118-
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
118+
<field id="template_hints_storefront_show_with_parameter" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
119119
<label>Enable Hints for Storefront with URL Parameter</label>
120120
<depends>
121121
<field id="*/*/template_hints_storefront">1</field>
122122
</depends>
123123
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
124124
<comment>Use URL parameter to enable template path hints for Storefront</comment>
125125
</field>
126-
<field id="template_hints_parameter_value" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
126+
<field id="template_hints_parameter_value" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
127127
<label>Parameter Value</label>
128128
<depends>
129129
<field id="*/*/template_hints_storefront">1</field>

0 commit comments

Comments
 (0)