Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
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
  • Loading branch information
magento-engcom-team authored Feb 20, 2019
2 parents 192e28a + 619ff9b commit 10f900e
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 44 deletions.
9 changes: 5 additions & 4 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @api
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @since 100.0.2
*/
class Context extends \Magento\Framework\View\Element\Template\Context
Expand Down Expand Up @@ -174,7 +175,7 @@ public function getAuthorization()
}

/**
* Get Backend Session
* Get backend session instance.
*
* @return \Magento\Backend\Model\Session
*/
Expand All @@ -184,7 +185,7 @@ public function getBackendSession()
}

/**
* Get Math Random
* Get math random instance.
*
* @return \Magento\Framework\Math\Random
*/
Expand All @@ -194,7 +195,7 @@ public function getMathRandom()
}

/**
* Get Form Key
* Get form key instance.
*
* @return \Magento\Framework\Data\Form\FormKey
*/
Expand All @@ -204,7 +205,7 @@ public function getFormKey()
}

/**
* Get Class Name Builder
* Get name builder instance.
*
* @return \Magento\Framework\Code\NameBuilder
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
protected $_column;

/**
* Set column for renderer.
*
* @param Column $column
* @return $this
*/
Expand All @@ -38,6 +40,8 @@ public function setColumn($column)
}

/**
* Returns row associated with the renderer.
*
* @return Column
*/
public function getColumn()
Expand All @@ -48,7 +52,7 @@ public function getColumn()
/**
* Renders grid column
*
* @param Object $row
* @param DataObject $row
* @return string
*/
public function render(DataObject $row)
Expand All @@ -66,7 +70,7 @@ public function render(DataObject $row)
/**
* Render column for export
*
* @param Object $row
* @param DataObject $row
* @return string
*/
public function renderExport(DataObject $row)
Expand All @@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
}

/**
* @param Object $row
* Returns value of the row.
*
* @param DataObject $row
* @return mixed
*/
protected function _getValue(DataObject $row)
Expand All @@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
}

/**
* @param Object $row
* Get pre-rendered input element.
*
* @param DataObject $row
* @return string
*/
public function _getInputValueElement(DataObject $row)
Expand All @@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
}

/**
* @param Object $row
* Get input value by row.
*
* @param DataObject $row
* @return mixed
*/
protected function _getInputValue(DataObject $row)
Expand All @@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
}

/**
* Renders header of the column,
*
* @return string
*/
public function renderHeader()
Expand Down Expand Up @@ -148,6 +160,8 @@ public function renderHeader()
}

/**
* Render HTML properties.
*
* @return string
*/
public function renderProperty()
Expand All @@ -172,6 +186,8 @@ public function renderProperty()
}

/**
* Returns HTML for CSS.
*
* @return string
*/
public function renderCss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
*/
namespace Magento\Backend\Controller\Adminhtml\Dashboard;

class ProductsViewed extends AjaxBlock
use Magento\Framework\App\Action\HttpGetActionInterface;

/**
* Get most viewed products controller.
*/
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
{
/**
* Gets most viewed products list
*
* @return \Magento\Backend\Model\View\Result\Page
* @return \Magento\Framework\Controller\Result\Raw
*/
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
],
],
'renderer_attribute_with_invalid_value' => [
'<?xml version="1.0"?><config><option name="name_one" renderer="true12"><inputType name="name_one"/>' .
'<?xml version="1.0"?><config><option name="name_one" renderer="123true"><inputType name="name_one"/>' .
'</option></config>',
[
"Element 'option', attribute 'renderer': [facet 'pattern'] The value 'true12' is not accepted by the " .
"pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"Element 'option', attribute 'renderer': 'true12' is not a valid value of the atomic" .
"Element 'option', attribute 'renderer': [facet 'pattern'] The value '123true' is not accepted by the " .
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'option', attribute 'renderer': '123true' is not a valid value of the atomic" .
" type 'modelName'.\nLine: 1\n"
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'<?xml version="1.0"?><config><type name="some_name" modelInstance="123" /></config>',
[
"Element 'type', attribute 'modelInstance': [facet 'pattern'] The value '123' is not accepted by the" .
" pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
" pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand Down Expand Up @@ -57,7 +57,7 @@
'<?xml version="1.0"?><config><type name="some_name"><priceModel instance="123123" /></type></config>',
[
"Element 'priceModel', attribute 'instance': [facet 'pattern'] The value '123123' is not accepted " .
"by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -66,7 +66,7 @@
'<?xml version="1.0"?><config><type name="some_name"><indexerModel instance="123" /></type></config>',
[
"Element 'indexerModel', attribute 'instance': [facet 'pattern'] The value '123' is not accepted by " .
"the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -83,7 +83,7 @@
'<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel instance="1234"/></type></config>',
[
"Element 'stockIndexerModel', attribute 'instance': [facet 'pattern'] The value '1234' is not " .
"accepted by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n",
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " .
"type 'modelName'.\nLine: 1\n"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<stockIndexerModel instance="instance_name"/>
</type>
<type label="some_label" name="some_name2" modelInstance="model_name">
<allowedSelectionTypes>
<type name="some_name" />
</allowedSelectionTypes>
<priceModel instance="instance_name_with_digits_123" />
<indexerModel instance="instance_name_with_digits_123" />
<stockIndexerModel instance="instance_name_with_digits_123"/>
</type>
<type label="some_label" name="some_name3" modelInstance="model_name">
<allowedSelectionTypes>
<type name="some_name" />
</allowedSelectionTypes>
Expand All @@ -25,5 +33,6 @@
<composableTypes>
<type name="some_name"/>
<type name="some_name2"/>
<type name="some_name3"/>
</composableTypes>
</config>
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/product_options.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [a-zA-Z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/product_types_base.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [a-zA-Z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
'attributes_with_type_modelName_and_invalid_value' => [
'<?xml version="1.0"?><config><entity name="Name/one" model="model_one" '
. 'entityAttributeFilterType="model_one"/><entityType entity="Name/one" name="name_one" model="1"/>'
. ' <fileFormat name="name_one" model="model1"/></config>',
. ' <fileFormat name="name_one" model="1model"/></config>',
[
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1' is not accepted by the " .
"pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': '1' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value 'model1' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': 'model1' is not a valid " .
"Element 'fileFormat', attribute 'model': [facet 'pattern'] The value '1model' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'fileFormat', attribute 'model': '1model' is not a valid " .
"value of the atomic type 'modelName'.\nLine: 1\n"
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
["Element 'entity', attribute 'notallowed': The attribute 'notallowed' is not allowed.\nLine: 1\n"],
],
'entity_model_with_invalid_value' => [
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="afwer34" ' .
'<?xml version="1.0"?><config><entity name="test_name" label="test_label" model="34afwer" ' .
'behaviorModel="test" /></config>',
[
"Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" .
"Element 'entity', attribute 'model': [facet 'pattern'] The value '34afwer' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'model': '34afwer' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
Expand All @@ -40,7 +40,7 @@
'</config>',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '666' is not accepted by " .
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'<?xml version="1.0"?><config><entity name="some_name" model="12345"/></config>',
[
"Element 'entity', attribute 'model': [facet 'pattern'] The value '12345' is not accepted by " .
"the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -28,7 +28,7 @@
'<?xml version="1.0"?><config><entity name="some_name" behaviorModel="=--09"/></config>',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '=--09' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
Expand All @@ -46,11 +46,11 @@
["Element 'entityType': The attribute 'model' is required but missing.\nLine: 1\n"],
],
'entitytype_with_invalid_model_attribute_value' => [
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="test1"/></config>',
'<?xml version="1.0"?><config><entityType entity="entity_name" name="some_name" model="1test"/></config>',
[
"Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " .
"accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" .
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1test' is not " .
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': '1test' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/ImportExport/etc/export.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [A-Za-z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
4 changes: 2 additions & 2 deletions app/code/Magento/ImportExport/etc/import.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<xs:simpleType name="modelName">
<xs:annotation>
<xs:documentation>
Model name can contain only [A-Za-z_\\].
Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z_\\]+" />
<xs:pattern value="([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
.table-wrapper {
.lib-css(margin-bottom, @indent__base);
border-bottom: 1px solid @account-table-border-bottom-color;
overflow-x: auto;

&:last-child {
margin-bottom: 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Code/NameBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Magento\Framework\Code;

/**
* Name builder.
* Builds namespace with classname out of the parts.
*
* @api
*/
Expand Down

0 comments on commit 10f900e

Please sign in to comment.