Skip to content

Commit 051c1ce

Browse files
author
Bryant Luk
committed
Merge branch 'MAGETWO-35264-Failed-SOAP-Service-Request' into MAGETWO-35266-Update-fails-trying-to-recreate-tables
2 parents 6ebf9a8 + 4437ef2 commit 051c1ce

File tree

129 files changed

+637
-11340
lines changed

Some content is hidden

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

129 files changed

+637
-11340
lines changed

Gruntfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ module.exports = function (grunt) {
6060
'less:luma',
6161
'less:backend'
6262
],
63-
63+
/**
64+
* Styles for backend theme
65+
*/
66+
backend: [
67+
'less:backend',
68+
'replace:escapeCalc',
69+
'less:override'
70+
],
6471
/**
6572
* Documentation
6673
*/

app/code/Magento/Eav/Model/EavCustomAttributeTypeLocator.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Framework\Exception\NoSuchEntityException;
1111
use Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface;
1212

13+
/**
14+
* Class to locate types for Eav custom attributes
15+
*/
1316
class EavCustomAttributeTypeLocator implements CustomAttributeTypeLocatorInterface
1417
{
1518
/**
@@ -32,7 +35,22 @@ class EavCustomAttributeTypeLocator implements CustomAttributeTypeLocatorInterfa
3235
*
3336
* @param AttributeRepositoryInterface $attributeRepository
3437
* @param array $serviceEntityTypeMap
38+
* <pre>
39+
* [
40+
* 'ServiceInterfaceA' => 'EavEntityType1',
41+
* 'ServiceInterfaceB' => 'EavEntityType2'
42+
* ]
43+
* </pre>
3544
* @param array $serviceBackendModelDataInterfaceMap
45+
* <pre>
46+
* [
47+
* 'ServiceInterfaceA' => ['BackendType1' => 'ServiceDataInterface1'],
48+
* 'ServiceInterfaceB' => [
49+
* 'BackendType2' => 'ServiceDataInterface2',
50+
* 'BackendType3' => 'ServiceDataInterface3'
51+
* ]
52+
* ]
53+
* </pre>
3654
*/
3755
public function __construct(
3856
AttributeRepositoryInterface $attributeRepository,
@@ -69,4 +87,22 @@ public function getType($attributeCode, $serviceClass)
6987

7088
return $dataInterface;
7189
}
90+
91+
/**
92+
* {@inheritdoc}
93+
*/
94+
public function getAllServiceDataInterfaces()
95+
{
96+
$dataInterfaceArray = [];
97+
if (!$this->serviceBackendModelDataInterfaceMap) {
98+
return [];
99+
} else {
100+
foreach ($this->serviceBackendModelDataInterfaceMap as $serviceArray) {
101+
foreach ($serviceArray as $dataInterface) {
102+
$dataInterfaceArray[] = $dataInterface;
103+
}
104+
}
105+
}
106+
return $dataInterfaceArray;
107+
}
72108
}

app/code/Magento/Eav/Test/Unit/Model/EavCustomAttributeTypeLocatorTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,26 @@ public function getTypeDataProvider()
147147
]
148148
];
149149
}
150+
151+
public function testGetAllServiceDataInterfaceEmpty()
152+
{
153+
$this->eavCustomAttributeTypeLocator = new EavCustomAttributeTypeLocator($this->attributeRepository);
154+
$this->assertEmpty($this->eavCustomAttributeTypeLocator->getAllServiceDataInterfaces());
155+
}
156+
157+
public function testGetAllServiceDataInterface()
158+
{
159+
$serviceBackendModelDataInterfaceMapData = [
160+
'ServiceA' => ['BackendA' => 'ServiceDataInterfaceA'],
161+
'ServiceB' => ['BackendB' => 'ServiceDataInterfaceB', 'BackendC' => 'ServiceDataInterfaceC'],
162+
'ServiceC' => ['BackendD' => 'ServiceDataInterfaceD']
163+
];
164+
$this->eavCustomAttributeTypeLocator = new EavCustomAttributeTypeLocator(
165+
$this->attributeRepository, [], $serviceBackendModelDataInterfaceMapData
166+
);
167+
$this->assertEquals(
168+
['ServiceDataInterfaceA', 'ServiceDataInterfaceB', 'ServiceDataInterfaceC', 'ServiceDataInterfaceD'],
169+
$this->eavCustomAttributeTypeLocator->getAllServiceDataInterfaces()
170+
);
171+
}
150172
}

app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<div class="entry-edit">
10+
<div class="entry-edit form-inline">
1111
<?php echo $block->getFormHtml() ?>
1212
</div>
1313
<?php echo $block->getChildHtml('form_after');?>

app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
/* @var $block \Magento\Tax\Block\Adminhtml\Rate\Form */
77
?>
8-
<div id="<?php echo $block->getNameInLayout() ?>" style="display:none">
8+
<div class="form-inline" id="<?php echo $block->getNameInLayout() ?>" style="display:none">
99
<?php echo $block->getFormHtml();?>
1010
<?php echo $block->getChildHtml('form_after');?>
1111
</div>

app/code/Magento/Ui/view/base/web/templates/massaction.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
<button title="Actions" class="action-default scalable add" data-bind="click: onToggle('actionsVisible')">
99
<span data-bind="text: $t('Actions')"></span>
1010
</button>
11-
<button title="" class="action-toggle scalable add" data-toggle="dropdown" data-bind="click: onToggle('actionsVisible'), css: {active: actionsVisible}">
12-
<span>|</span>
11+
<button title="" class="action-toggle scalable add" data-toggle="dropdown" data-bind="click: onToggle('actionsVisible'), css: {active: actionsVisible}">
12+
<span data-bind="text: $t('Select')"></span>
1313
</button>
14-
1514
<ul class="dropdown-menu" data-bind="css: {'active': actionsVisible}, foreach: {data: actions, as: 'action'}">
1615
<li data-bind="click: $parent.setAction(action)"><span class="item" data-bind="text: label"></span></li>
1716
</ul>
18-
</div>
17+
</div>

app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ class Generator
5050
protected $storeManager;
5151

5252
/**
53-
* @var array
53+
* @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface
5454
*/
55-
protected $customAttributeMapArray = null;
55+
protected $customAttributeTypeLocator = null;
5656

5757
/**
5858
* Initialize dependencies.
@@ -62,22 +62,22 @@ class Generator
6262
* @param \Magento\Framework\App\Cache\Type\Webapi $cache
6363
* @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor
6464
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
65-
* @param \Magento\Framework\Object $customAttributeMap
65+
* @param \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
6666
*/
6767
public function __construct(
6868
\Magento\Webapi\Model\Soap\Config $apiConfig,
6969
WsdlFactory $wsdlFactory,
7070
\Magento\Framework\App\Cache\Type\Webapi $cache,
7171
\Magento\Framework\Reflection\TypeProcessor $typeProcessor,
7272
\Magento\Store\Model\StoreManagerInterface $storeManager,
73-
\Magento\Framework\Object $customAttributeMap
73+
\Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
7474
) {
7575
$this->_apiConfig = $apiConfig;
7676
$this->_wsdlFactory = $wsdlFactory;
7777
$this->_cache = $cache;
7878
$this->_typeProcessor = $typeProcessor;
7979
$this->storeManager = $storeManager;
80-
$this->customAttributeMapArray = array_values($customAttributeMap->getData());
80+
$this->customAttributeTypeLocator = $customAttributeTypeLocator;
8181
}
8282

8383
/**
@@ -178,7 +178,7 @@ protected function _generate($requestedServices, $endPointUrl)
178178
*/
179179
protected function addCustomAttributeTypes($wsdl)
180180
{
181-
foreach ($this->customAttributeMapArray as $customAttributeClass) {
181+
foreach ($this->customAttributeTypeLocator->getAllServiceDataInterfaces() as $customAttributeClass) {
182182
$typeName = $this->_typeProcessor->register($customAttributeClass);
183183
$wsdl->addComplexType($typeName);
184184
}

app/code/Magento/Webapi/Test/Unit/Model/Soap/Wsdl/GeneratorTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
1212
/** @var \Magento\Webapi\Model\Soap\Wsdl\Generator */
1313
protected $_wsdlGenerator;
1414

15-
/** @var \Magento\Framework\Object */
16-
protected $customAttributeMap;
15+
/**
16+
* @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
17+
*/
18+
protected $customAttributeTypeLocator = null;
1719

1820
/** @var \Magento\Webapi\Model\Soap\Config|\PHPUnit_Framework_MockObject_MockObject */
1921
protected $_soapConfigMock;
@@ -93,7 +95,9 @@ protected function setUp()
9395

9496
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
9597

96-
$this->customAttributeMap = $objectManager->getObject('Magento\Framework\Object');
98+
$this->customAttributeTypeLocator = $objectManager
99+
->getObject('Magento\Eav\Model\EavCustomAttributeTypeLocator');
100+
97101
$this->_wsdlGenerator = $objectManager->getObject(
98102
'Magento\Webapi\Model\Soap\Wsdl\Generator',
99103
[
@@ -102,7 +106,7 @@ protected function setUp()
102106
'cache' => $this->_cacheMock,
103107
'typeProcessor' => $this->_typeProcessor,
104108
'storeManagerMock' => $this->storeManagerMock,
105-
'customAttributeMap' => $this->customAttributeMap
109+
'customAttributeTypeLocator' => $this->customAttributeTypeLocator
106110
]
107111
);
108112

@@ -196,7 +200,7 @@ public function testHandleWithException()
196200
$this->_cacheMock,
197201
$this->_typeProcessor,
198202
$this->storeManagerMock,
199-
$this->customAttributeMap
203+
$this->customAttributeTypeLocator
200204
]
201205
)->getMock();
202206

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727
<argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Webapi</argument>
2828
</arguments>
2929
</type>
30-
<type name="Magento\Webapi\Model\Soap\Wsdl\Generator">
31-
<arguments>
32-
<argument name="customAttributeMap" xsi:type="object">CustomAttributeMap</argument>
33-
</arguments>
34-
</type>
3530
<type name="Magento\Integration\Model\ConfigBasedIntegrationManager">
3631
<plugin name="webapiSetup" type="Magento\Webapi\Model\Plugin\Manager" />
3732
</type>

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/_module.less

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
// Crosspage components
88
// _____________________________________________
99

10-
@import 'module/_menu';
11-
@import 'module/_header';
12-
@import 'module/_footer';
13-
@import 'module/_main';
10+
@import 'module/_menu.less';
11+
@import 'module/_header.less';
12+
@import 'module/_footer.less';
13+
@import 'module/_main.less';
1414

1515
//
1616
// Pages
1717
// _____________________________________________
1818

19-
@import 'module/pages/_dashboard';
19+
@import 'module/pages/_dashboard.less';

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/_header.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// Components
1212
// ---------------------------------------------
1313

14-
@import 'header/_actions-group';
15-
@import 'header/_headings-group';
14+
@import 'header/_actions-group.less';
15+
@import 'header/_headings-group.less';
1616

1717
// Variables
1818
// ---------------------------------------------

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/_main.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
// Components
1212
// ---------------------------------------------
1313

14-
@import 'main/_actions-bar';
14+
@import 'main/_actions-bar.less';

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/_menu.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,14 @@
234234
.parent {
235235
margin-bottom: 4.5rem;
236236
// Section title
237-
// ToDo UI: Should be not a link, strong instead and have a classname
238-
> a {
237+
> a, // ToDo UI: Should be deleted after template changes a -> strong.submenu-group-title
238+
.submenu-group-title {
239239
color: @submenu-section-label__color;
240240
display: block;
241241
font-size: 1.6rem;
242242
font-weight: @font-weight__semibold;
243243
margin-bottom: .7rem;
244+
padding: 1.25rem @submenu__padding-horizontal;
244245
pointer-events: none;
245246
}
246247
}

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/_actions-group.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// Components
1212
// ---------------------------------------------
1313

14-
@import 'actions-group/_user';
15-
@import 'actions-group/_search';
16-
@import 'actions-group/_notifications';
14+
@import 'actions-group/_user.less';
15+
@import 'actions-group/_search.less';
16+
@import 'actions-group/_notifications.less';
1717

1818
//
1919
// Variables

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/_actions-bar.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// Components
1313
// ---------------------------------------------
1414

15-
@import 'actions_bar/_store-switcher';
15+
@import 'actions_bar/_store-switcher.less';
1616

1717
//
1818
// Variables

app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/module.less

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,32 @@
4949
}
5050

5151
.attribute-change-checkbox {
52+
background: #fff;
5253
display: block;
5354
margin-top: 5px;
5455
.label {
5556
float: none;
5657
padding: 0;
5758
width: auto;
5859
}
59-
.checkbox {
60-
margin-right: 5px;
61-
width: auto;
62-
}
6360
}
6461

6562
.field-price,
6663
.field-special_price,
6764
.field-gift_wrapping_price,
6865
.field-msrp,
66+
.field-cost,
6967
.field-gift_wrapping_price {
70-
.addon > input {
71-
padding-left: 23px;
72-
}
73-
.addafter {
74-
> strong {
75-
left: 5px;
76-
position: absolute;
77-
top: 3px;
68+
.control {
69+
.addon > input {
70+
padding-left: 23px;
71+
}
72+
.addafter {
73+
> strong {
74+
left: 5px;
75+
position: absolute;
76+
top: 3px;
77+
}
7878
}
7979
}
8080
}
@@ -108,31 +108,21 @@
108108
.addafter + .addafter {
109109
border-width: 1px 1px 1px 0;
110110
border-style: solid;
111-
height: 28px;
111+
height: 31px;
112112
right: 0;
113113
position: absolute;
114114
top: 0;
115115
}
116116
.addafter strong {
117-
line-height: 28px;
117+
line-height: 31px;
118118
}
119119
> input:focus + .addafter + .addafter {
120-
box-shadow: 0 0 8px rgba(82, 168, 236, .6);
120+
border-color: #007bdb;
121121
}
122122
}
123123
}
124124
}
125125

126-
.field-gift_message_available,
127-
.field-gift_wrapping_available {
128-
.addon {
129-
> input[type="checkbox"] {
130-
width: auto;
131-
margin-right: 5px;
132-
}
133-
}
134-
}
135-
136126
.fieldset > .addafter {
137127
display: none;
138128
}

app/design/adminhtml/Magento/backend/Magento_Theme/web/css/source/module.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ body {
5757
.page-content {
5858
&:extend(._layout-width all);
5959
.clearer();
60+
min-height: 20rem; // ToDo UI: delete if sticky footer
6061
}
6162

6263
.page-wrapper > .page-content {

0 commit comments

Comments
 (0)