Skip to content

Commit 10f900e

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #21272: Fixed address book display horizontal scroll in responsive view (by @mage2pratik) - #20617: 14882 product types xml doesn t allow numbers in model instance (by @lisovyievhenii) - #20308: Small PHPDocs fixes [Backend module] (by @SikailoISM) Fixed GitHub Issues: - #21271: Address book display horizontal scroll in responsive view (reported by @mage2pratik) has been fixed in #21272 by @mage2pratik in 2.3-develop branch Related commits: 1. 9c4554c - #14882: product_types.xml doesn't allow numbers in modelInstance (reported by @domeglic) has been fixed in #20617 by @lisovyievhenii in 2.3-develop branch Related commits: 1. eb0653c 2. 9948dfe 3. 3746524
2 parents 192e28a + 619ff9b commit 10f900e

File tree

15 files changed

+76
-44
lines changed

15 files changed

+76
-44
lines changed

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @api
2020
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2223
* @since 100.0.2
2324
*/
2425
class Context extends \Magento\Framework\View\Element\Template\Context
@@ -174,7 +175,7 @@ public function getAuthorization()
174175
}
175176

176177
/**
177-
* Get Backend Session
178+
* Get backend session instance.
178179
*
179180
* @return \Magento\Backend\Model\Session
180181
*/
@@ -184,7 +185,7 @@ public function getBackendSession()
184185
}
185186

186187
/**
187-
* Get Math Random
188+
* Get math random instance.
188189
*
189190
* @return \Magento\Framework\Math\Random
190191
*/
@@ -194,7 +195,7 @@ public function getMathRandom()
194195
}
195196

196197
/**
197-
* Get Form Key
198+
* Get form key instance.
198199
*
199200
* @return \Magento\Framework\Data\Form\FormKey
200201
*/
@@ -204,7 +205,7 @@ public function getFormKey()
204205
}
205206

206207
/**
207-
* Get Class Name Builder
208+
* Get name builder instance.
208209
*
209210
* @return \Magento\Framework\Code\NameBuilder
210211
*/

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
2828
protected $_column;
2929

3030
/**
31+
* Set column for renderer.
32+
*
3133
* @param Column $column
3234
* @return $this
3335
*/
@@ -38,6 +40,8 @@ public function setColumn($column)
3840
}
3941

4042
/**
43+
* Returns row associated with the renderer.
44+
*
4145
* @return Column
4246
*/
4347
public function getColumn()
@@ -48,7 +52,7 @@ public function getColumn()
4852
/**
4953
* Renders grid column
5054
*
51-
* @param Object $row
55+
* @param DataObject $row
5256
* @return string
5357
*/
5458
public function render(DataObject $row)
@@ -66,7 +70,7 @@ public function render(DataObject $row)
6670
/**
6771
* Render column for export
6872
*
69-
* @param Object $row
73+
* @param DataObject $row
7074
* @return string
7175
*/
7276
public function renderExport(DataObject $row)
@@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
7579
}
7680

7781
/**
78-
* @param Object $row
82+
* Returns value of the row.
83+
*
84+
* @param DataObject $row
7985
* @return mixed
8086
*/
8187
protected function _getValue(DataObject $row)
@@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
9298
}
9399

94100
/**
95-
* @param Object $row
101+
* Get pre-rendered input element.
102+
*
103+
* @param DataObject $row
96104
* @return string
97105
*/
98106
public function _getInputValueElement(DataObject $row)
@@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
108116
}
109117

110118
/**
111-
* @param Object $row
119+
* Get input value by row.
120+
*
121+
* @param DataObject $row
112122
* @return mixed
113123
*/
114124
protected function _getInputValue(DataObject $row)
@@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
117127
}
118128

119129
/**
130+
* Renders header of the column,
131+
*
120132
* @return string
121133
*/
122134
public function renderHeader()
@@ -148,6 +160,8 @@ public function renderHeader()
148160
}
149161

150162
/**
163+
* Render HTML properties.
164+
*
151165
* @return string
152166
*/
153167
public function renderProperty()
@@ -172,6 +186,8 @@ public function renderProperty()
172186
}
173187

174188
/**
189+
* Returns HTML for CSS.
190+
*
175191
* @return string
176192
*/
177193
public function renderCss()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class ProductsViewed extends AjaxBlock
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
/**
12+
* Get most viewed products controller.
13+
*/
14+
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
1015
{
1116
/**
1217
* Gets most viewed products list
1318
*
14-
* @return \Magento\Backend\Model\View\Result\Page
19+
* @return \Magento\Framework\Controller\Result\Raw
1520
*/
1621
public function execute()
1722
{

app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
],
3030
],
3131
'renderer_attribute_with_invalid_value' => [
32-
'<?xml version="1.0"?><config><option name="name_one" renderer="true12"><inputType name="name_one"/>' .
32+
'<?xml version="1.0"?><config><option name="name_one" renderer="123true"><inputType name="name_one"/>' .
3333
'</option></config>',
3434
[
35-
"Element 'option', attribute 'renderer': [facet 'pattern'] The value 'true12' is not accepted by the " .
36-
"pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
37-
"Element 'option', attribute 'renderer': 'true12' is not a valid value of the atomic" .
35+
"Element 'option', attribute 'renderer': [facet 'pattern'] The value '123true' is not accepted by the " .
36+
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
37+
"Element 'option', attribute 'renderer': '123true' is not a valid value of the atomic" .
3838
" type 'modelName'.\nLine: 1\n"
3939
],
4040
],

app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'<?xml version="1.0"?><config><type name="some_name" modelInstance="123" /></config>',
2424
[
2525
"Element 'type', attribute 'modelInstance': [facet 'pattern'] The value '123' is not accepted by the" .
26-
" pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
26+
" pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
2727
"Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" .
2828
" 'modelName'.\nLine: 1\n"
2929
],
@@ -57,7 +57,7 @@
5757
'<?xml version="1.0"?><config><type name="some_name"><priceModel instance="123123" /></type></config>',
5858
[
5959
"Element 'priceModel', attribute 'instance': [facet 'pattern'] The value '123123' is not accepted " .
60-
"by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
60+
"by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
6161
"Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" .
6262
" 'modelName'.\nLine: 1\n"
6363
],
@@ -66,7 +66,7 @@
6666
'<?xml version="1.0"?><config><type name="some_name"><indexerModel instance="123" /></type></config>',
6767
[
6868
"Element 'indexerModel', attribute 'instance': [facet 'pattern'] The value '123' is not accepted by " .
69-
"the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
69+
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
7070
"Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" .
7171
" 'modelName'.\nLine: 1\n"
7272
],
@@ -83,7 +83,7 @@
8383
'<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel instance="1234"/></type></config>',
8484
[
8585
"Element 'stockIndexerModel', attribute 'instance': [facet 'pattern'] The value '1234' is not " .
86-
"accepted by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
86+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
8787
"Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " .
8888
"type 'modelName'.\nLine: 1\n"
8989
],

app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/valid_product_types_merged.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
<stockIndexerModel instance="instance_name"/>
1616
</type>
1717
<type label="some_label" name="some_name2" modelInstance="model_name">
18+
<allowedSelectionTypes>
19+
<type name="some_name" />
20+
</allowedSelectionTypes>
21+
<priceModel instance="instance_name_with_digits_123" />
22+
<indexerModel instance="instance_name_with_digits_123" />
23+
<stockIndexerModel instance="instance_name_with_digits_123"/>
24+
</type>
25+
<type label="some_label" name="some_name3" modelInstance="model_name">
1826
<allowedSelectionTypes>
1927
<type name="some_name" />
2028
</allowedSelectionTypes>
@@ -25,5 +33,6 @@
2533
<composableTypes>
2634
<type name="some_name"/>
2735
<type name="some_name2"/>
36+
<type name="some_name3"/>
2837
</composableTypes>
2938
</config>

app/code/Magento/Catalog/etc/product_options.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
<xs:simpleType name="modelName">
6262
<xs:annotation>
6363
<xs:documentation>
64-
Model name can contain only [a-zA-Z_\\].
64+
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
6565
</xs:documentation>
6666
</xs:annotation>
6767
<xs:restriction base="xs:string">
68-
<xs:pattern value="[a-zA-Z_\\]+" />
68+
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
6969
</xs:restriction>
7070
</xs:simpleType>
7171
</xs:schema>

app/code/Magento/Catalog/etc/product_types_base.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@
9292
<xs:simpleType name="modelName">
9393
<xs:annotation>
9494
<xs:documentation>
95-
Model name can contain only [a-zA-Z_\\].
95+
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
9696
</xs:documentation>
9797
</xs:annotation>
9898
<xs:restriction base="xs:string">
99-
<xs:pattern value="[a-zA-Z_\\]+" />
99+
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
100100
</xs:restriction>
101101
</xs:simpleType>
102102
</xs:schema>

app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
'attributes_with_type_modelName_and_invalid_value' => [
2323
'<?xml version="1.0"?><config><entity name="Name/one" model="model_one" '
2424
. 'entityAttributeFilterType="model_one"/><entityType entity="Name/one" name="name_one" model="1"/>'
25-
. ' <fileFormat name="name_one" model="model1"/></config>',
25+
. ' <fileFormat name="name_one" model="1model"/></config>',
2626
[
2727
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1' is not accepted by the " .
28-
"pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
28+
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
2929
"Element 'entityType', attribute 'model': '1' is not a valid value of the atomic type" .
3030
" 'modelName'.\nLine: 1\n",
31-
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value 'model1' is not " .
32-
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
33-
"Element 'fileFormat', attribute 'model': 'model1' is not a valid " .
31+
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value '1model' is not " .
32+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
33+
"Element 'fileFormat', attribute 'model': '1model' is not a valid " .
3434
"value of the atomic type 'modelName'.\nLine: 1\n"
3535
],
3636
],

app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
["Element 'entity', attribute 'notallowed': The attribute 'notallowed' is not allowed.\nLine: 1\n"],
2727
],
2828
'entity_model_with_invalid_value' => [
29-
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="afwer34" ' .
29+
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="34afwer" ' .
3030
'behaviorModel="test" /></config>',
3131
[
32-
"Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " .
33-
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
34-
"Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" .
32+
"Element 'entity', attribute 'model': [facet 'pattern'] The value '34afwer' is not " .
33+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
34+
"Element 'entity', attribute 'model': '34afwer' is not a valid value of the atomic type" .
3535
" 'modelName'.\nLine: 1\n"
3636
],
3737
],
@@ -40,7 +40,7 @@
4040
'</config>',
4141
[
4242
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '666' is not accepted by " .
43-
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
43+
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
4444
"Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" .
4545
" 'modelName'.\nLine: 1\n"
4646
],

app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'<?xml version="1.0"?><config><entity name="some_name" model="12345"/></config>',
2020
[
2121
"Element 'entity', attribute 'model': [facet 'pattern'] The value '12345' is not accepted by " .
22-
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
22+
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
2323
"Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" .
2424
" 'modelName'.\nLine: 1\n"
2525
],
@@ -28,7 +28,7 @@
2828
'<?xml version="1.0"?><config><entity name="some_name" behaviorModel="=--09"/></config>',
2929
[
3030
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '=--09' is not " .
31-
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
31+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
3232
"Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" .
3333
" 'modelName'.\nLine: 1\n"
3434
],
@@ -46,11 +46,11 @@
4646
["Element 'entityType': The attribute 'model' is required but missing.\nLine: 1\n"],
4747
],
4848
'entitytype_with_invalid_model_attribute_value' => [
49-
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="test1"/></config>',
49+
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="1test"/></config>',
5050
[
51-
"Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " .
52-
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
53-
"Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" .
51+
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1test' is not " .
52+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
53+
"Element 'entityType', attribute 'model': '1test' is not a valid value of the atomic type" .
5454
" 'modelName'.\nLine: 1\n"
5555
],
5656
],

app/code/Magento/ImportExport/etc/export.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
<xs:simpleType name="modelName">
7272
<xs:annotation>
7373
<xs:documentation>
74-
Model name can contain only [A-Za-z_\\].
74+
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
7575
</xs:documentation>
7676
</xs:annotation>
7777
<xs:restriction base="xs:string">
78-
<xs:pattern value="[A-Za-z_\\]+" />
78+
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
7979
</xs:restriction>
8080
</xs:simpleType>
8181
</xs:schema>

app/code/Magento/ImportExport/etc/import.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
<xs:simpleType name="modelName">
6262
<xs:annotation>
6363
<xs:documentation>
64-
Model name can contain only [A-Za-z_\\].
64+
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
6565
</xs:documentation>
6666
</xs:annotation>
6767
<xs:restriction base="xs:string">
68-
<xs:pattern value="[A-Za-z_\\]+" />
68+
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
6969
</xs:restriction>
7070
</xs:simpleType>
7171
</xs:schema>

app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
.table-wrapper {
162162
.lib-css(margin-bottom, @indent__base);
163163
border-bottom: 1px solid @account-table-border-bottom-color;
164+
overflow-x: auto;
164165

165166
&:last-child {
166167
margin-bottom: 0;

lib/internal/Magento/Framework/Code/NameBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Framework\Code;
77

88
/**
9-
* Name builder.
9+
* Builds namespace with classname out of the parts.
1010
*
1111
* @api
1212
*/

0 commit comments

Comments
 (0)