Skip to content

Commit 1773f41

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #19198: [2.3] Made logo clickable on home page (by @gwharton) - #19696: Add EngCom Slack info to README and formatting (by @lorikrell) - #19493: Fix issue 19492 - Catalog Product - Customizable Options label alignment issue (by @speedy008) - #19684: Correct spelling (by @ravi-chandra3197) - #19673: fix: immediately return value (by @DanielRuf) - #19633: Issue resolved #19607. Page Not Found when deleting Attribute Set #19614 (by @cedcommerce) - #19640: Fixed icon alignment: Frontend Component theme sort by arrow icon vertical alignment issue. #19639 (by @suryakant-krish) - #18124: Clean code (by @hryvinskyi) - #19038: #18990: Shipping address is not validated in checkout… (by @StasKozar) Fixed GitHub Issues: - #19142: Home page store loge should be clickable to reload page (reported by @tomekjordan) has been fixed in #19198 by @gwharton in 2.3-develop branch Related commits: 1. f6a6d11 2. 99c4d00 - #19492: Catalog Product - Customizable Options label alignment issue (reported by @speedy008) has been fixed in #19493 by @speedy008 in 2.3-develop branch Related commits: 1. f63ed89 - #19607: Magento 2.3. Page Not Found when deleting Attribute Set (reported by @Rjgoolsby) has been fixed in #19633 by @cedcommerce in 2.3-develop branch Related commits: 1. 144b028 2. 21f7afa - #19639: Frontend Component theme sort by arrow icon vertical alignment issue. (reported by @suryakant-krish) has been fixed in #19640 by @suryakant-krish in 2.3-develop branch Related commits: 1. e567510 - #18990: Shipping address is not validated in checkout when proceeding step as logged in user with default shipping address (reported by @DanieliMi) has been fixed in #19038 by @StasKozar in 2.3-develop branch Related commits: 1. 43e2c4d 2. b545997 3. 66c1155
2 parents 3ff0161 + dcffbd8 commit 1773f41

File tree

92 files changed

+486
-244
lines changed

Some content is hidden

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

92 files changed

+486
-244
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ Magento is thankful for any contribution that can improve our code base, documen
3939
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
4040
</a>
4141

42-
<h3>Labels applied by the Magento team</h3>
43-
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
44-
Please review the <a href="https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
42+
### Labels applied by the Magento team
43+
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
44+
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.
4545

46-
<h2>Reporting security issues</h2>
46+
## Reporting security issues
4747

48-
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
48+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
4949

50-
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
50+
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5151

52-
<h2>License</h2>
52+
## License
5353

5454
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license.
5555

@@ -59,3 +59,13 @@ Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LI
5959
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
6060
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise.
6161

62+
## Community Engineering Slack
63+
64+
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us request at [[email protected]](mailto:[email protected]) or [self signup](https://tinyurl.com/engcom-slack).
65+
66+
67+
We have channels for each project. These channels are recommended for new members:
68+
69+
- [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions
70+
- [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes
71+
- [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\AdminNotification\Model\ResourceModel;
77

88
/**
9+
* Inbox resource model
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -77,8 +79,7 @@ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object)
7779
'is_read=?',
7880
0
7981
);
80-
$return = $connection->fetchPairs($select);
81-
return $return;
82+
return $connection->fetchPairs($select);
8283
}
8384

8485
/**

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set;
77

88
/**
9-
* Adminhtml Catalog Attribute Set Main Block
10-
*
119
* @author Magento Core Team <[email protected]>
1210
*/
1311
use Magento\Catalog\Model\Entity\Product\Attribute\Group\AttributeMapperInterface;
1412

1513
/**
14+
* Adminhtml Catalog Attribute Set Main Block.
15+
*
1616
* @api
1717
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1818
* @since 100.0.2
@@ -140,7 +140,7 @@ protected function _prepareLayout()
140140
) . '\', \'' . $this->getUrl(
141141
'catalog/*/delete',
142142
['id' => $setId]
143-
) . '\')',
143+
) . '\',{data: {}})',
144144
'class' => 'delete'
145145
]
146146
);

app/code/Magento/Catalog/Cron/DeleteOutdatedPriceValues.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Magento\Store\Model\Store;
1313

1414
/**
15+
* Cron job for removing outdated prices.
16+
*
1517
* Cron operation is responsible for deleting all product prices on WEBSITE level
1618
* in case 'Catalog Price Scope' configuration parameter is set to GLOBAL.
1719
*/
@@ -76,7 +78,7 @@ public function execute()
7678
/**
7779
* Checks if price scope config option explicitly equal to global value.
7880
*
79-
* Such strict comparision is required to prevent price deleting when
81+
* Such strict comparison is required to prevent price deleting when
8082
* price scope config option is null for some reason.
8183
*
8284
* @return bool

app/code/Magento/Catalog/Ui/Component/ColumnFactory.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\Catalog\Ui\Component;
77

88
/**
9+
* Column Factory
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -47,10 +49,14 @@ public function __construct(\Magento\Framework\View\Element\UiComponentFactory $
4749
}
4850

4951
/**
52+
* Create Factory
53+
*
5054
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
5155
* @param \Magento\Framework\View\Element\UiComponent\ContextInterface $context
5256
* @param array $config
57+
*
5358
* @return \Magento\Ui\Component\Listing\Columns\ColumnInterface
59+
* @throws \Magento\Framework\Exception\LocalizedException
5460
*/
5561
public function create($attribute, $context, array $config = [])
5662
{
@@ -82,7 +88,10 @@ public function create($attribute, $context, array $config = [])
8288
}
8389

8490
/**
91+
* Get Js Component
92+
*
8593
* @param string $dataType
94+
*
8695
* @return string
8796
*/
8897
protected function getJsComponent($dataType)
@@ -91,14 +100,15 @@ protected function getJsComponent($dataType)
91100
}
92101

93102
/**
103+
* Get Data Type
104+
*
94105
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
106+
*
95107
* @return string
96108
*/
97109
protected function getDataType($attribute)
98110
{
99-
return isset($this->dataTypeMap[$attribute->getFrontendInput()])
100-
? $this->dataTypeMap[$attribute->getFrontendInput()]
101-
: $this->dataTypeMap['default'];
111+
return $this->dataTypeMap[$attribute->getFrontendInput()] ?? $this->dataTypeMap['default'];
102112
}
103113

104114
/**
@@ -111,6 +121,6 @@ protected function getFilterType($frontendInput)
111121
{
112122
$filtersMap = ['date' => 'dateRange'];
113123
$result = array_replace_recursive($this->dataTypeMap, $filtersMap);
114-
return isset($result[$frontendInput]) ? $result[$frontendInput] : $result['default'];
124+
return $result[$frontendInput] ?? $result['default'];
115125
}
116126
}

app/code/Magento/Catalog/Ui/Component/Listing/Columns/Thumbnail.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Magento\Framework\View\Element\UiComponent\ContextInterface;
1010

1111
/**
12+
* Class Thumbnail
13+
*
1214
* @api
1315
* @since 100.0.2
1416
*/
@@ -67,13 +69,15 @@ public function prepareDataSource(array $dataSource)
6769
}
6870

6971
/**
72+
* Get Alt
73+
*
7074
* @param array $row
7175
*
7276
* @return null|string
7377
*/
7478
protected function getAlt($row)
7579
{
7680
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
77-
return isset($row[$altField]) ? $row[$altField] : null;
81+
return $row[$altField] ?? null;
7882
}
7983
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
try {
249249
response = JSON.parse(transport.responseText);
250250
} catch (e) {
251-
console.warn('An error occured while parsing response');
251+
console.warn('An error occurred while parsing response');
252252
}
253253

254254
if (!response || !response['parameters']) {

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ if ($('is_required')) {
334334

335335
jQuery(function($) {
336336
bindAttributeInputType();
337-
// @todo: refactor collapsable component
337+
// @todo: refactor collapsible component
338338
$('.attribute-popup .collapse, [data-role="advanced_fieldset-content"]')
339339
.collapsable()
340340
.collapse('hide');

app/code/Magento/CatalogSearch/Model/Search/QueryChecker/FullTextSearchCheck.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FullTextSearchCheck
2525
* to join catalog_eav_attribute table to search query or not
2626
*
2727
* In case when the $query does not requires full text search
28-
* - we can skipp joining catalog_eav_attribute table because it becomes excessive
28+
* - we can skip joining catalog_eav_attribute table because it becomes excessive
2929
*
3030
* @param QueryInterface $query
3131
* @return bool
@@ -37,6 +37,8 @@ public function isRequiredForQuery(QueryInterface $query)
3737
}
3838

3939
/**
40+
* Process query
41+
*
4042
* @param QueryInterface $query
4143
* @return bool
4244
* @throws \InvalidArgumentException
@@ -62,6 +64,8 @@ private function processQuery(QueryInterface $query)
6264
}
6365

6466
/**
67+
* Process boolean query
68+
*
6569
* @param BoolExpression $query
6670
* @return bool
6771
* @throws \InvalidArgumentException
@@ -90,6 +94,8 @@ private function processBoolQuery(BoolExpression $query)
9094
}
9195

9296
/**
97+
* Process filter query
98+
*
9399
* @param Filter $query
94100
* @return bool
95101
* @throws \InvalidArgumentException

app/code/Magento/CatalogUrlRewrite/Model/ObjectRegistry.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\CatalogUrlRewrite\Model;
77

8+
/**
9+
* Class ObjectRegistry
10+
*/
811
class ObjectRegistry
912
{
1013
/**
@@ -26,15 +29,19 @@ public function __construct($entities)
2629
}
2730

2831
/**
32+
* Get Entity
33+
*
2934
* @param int $entityId
3035
* @return \Magento\Framework\DataObject|null
3136
*/
3237
public function get($entityId)
3338
{
34-
return isset($this->entitiesMap[$entityId]) ? $this->entitiesMap[$entityId] : null;
39+
return $this->entitiesMap[$entityId] ?? null;
3540
}
3641

3742
/**
43+
* List Entities
44+
*
3845
* @return \Magento\Framework\DataObject[]
3946
*/
4047
public function getList()

app/code/Magento/Checkout/Test/Mftf/Data/CountryData.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,26 @@
1313
<item>Bahamas</item>
1414
</array>
1515
</entity>
16+
<entity name="DefaultCountriesWithRequiredRegions" type="countryArray">
17+
<array key="country">
18+
<item>Australia</item>
19+
<item>Brazil</item>
20+
<item>Canada</item>
21+
<item>Croatia</item>
22+
<item>Estonia</item>
23+
<item>India</item>
24+
<item>Latvia</item>
25+
<item>Lithuania</item>
26+
<item>Romania</item>
27+
<item>Spain</item>
28+
<item>Switzerland</item>
29+
<item>United States</item>
30+
<item>Australia</item>
31+
</array>
32+
</entity>
33+
<entity name="CustomCountryWithRequiredRegion" type="countryArray">
34+
<array key="country">
35+
<item>United Kingdom</item>
36+
</array>
37+
</entity>
1638
</entities>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontCustomerCheckoutWithoutRegionTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Checkout via the Admin"/>
15+
<title value="Shipping address is not validated in checkout when proceeding step as logged in user with default shipping address"/>
16+
<description value="Shouldn't be able to place an order as a customer without state if it's required."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="#"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
23+
<createData entity="SimpleProduct" stepKey="createProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
<createData entity="Simple_GB_Customer" stepKey="createCustomer"/>
27+
<actionGroup stepKey="loginToAdminPanel" ref="LoginAsAdmin"/>
28+
<actionGroup ref="SelectCountriesWithRequiredRegion" stepKey="setCustomCountryWithRequiredRegion">
29+
<argument name="countries" value="CustomCountryWithRequiredRegion"/>
30+
</actionGroup>
31+
</before>
32+
<after>
33+
<actionGroup ref="SelectCountriesWithRequiredRegion" stepKey="setDefaultCountriesWithRequiredRegion">
34+
<argument name="countries" value="DefaultCountriesWithRequiredRegions"/>
35+
</actionGroup>
36+
<actionGroup ref="logout" stepKey="logout"/>
37+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
38+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
39+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
40+
</after>
41+
42+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
43+
<argument name="Customer" value="$$createCustomer$$" />
44+
</actionGroup>
45+
46+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart">
47+
<argument name="product" value="$$createProduct$$"/>
48+
</actionGroup>
49+
50+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckoutPage"/>
51+
52+
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNextButton"/>
53+
<see selector="{{StorefrontMessagesSection.error}}" userInput='Please specify a regionId in shipping address.' stepKey="seeErrorMessages"/>
54+
</test>
55+
</tests>

app/code/Magento/Checkout/view/frontend/web/js/view/form/element/email.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ define([
180180
},
181181

182182
/**
183-
* Resolves an initial sate of a login form.
183+
* Resolves an initial state of a login form.
184184
*
185185
* @returns {Boolean} - initial visibility state.
186186
*/

app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ define([
265265
addressData,
266266
loginFormSelector = 'form[data-role=email-with-possible-login]',
267267
emailValidationResult = customer.isLoggedIn(),
268-
field;
268+
field,
269+
country = registry.get(this.parentName + '.shippingAddress.shipping-address-fieldset.country_id'),
270+
countryIndexedOptions = country.indexedOptions,
271+
option = countryIndexedOptions[quote.shippingAddress().countryId],
272+
messageContainer = registry.get('checkout.errors').messageContainer;
269273

270274
if (!quote.shippingMethod()) {
271275
this.errorValidationMessage(
@@ -318,6 +322,16 @@ define([
318322
shippingAddress['save_in_address_book'] = 1;
319323
}
320324
selectShippingAddress(shippingAddress);
325+
} else if (customer.isLoggedIn() &&
326+
option &&
327+
option['is_region_required'] &&
328+
!quote.shippingAddress().region
329+
) {
330+
messageContainer.addErrorMessage({
331+
message: $t('Please specify a regionId in shipping address.')
332+
});
333+
334+
return false;
321335
}
322336

323337
if (!emailValidationResult) {

0 commit comments

Comments
 (0)