Skip to content

Commit c224526

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - #22258: Use proper variables for tooltip styles on tablet devices (by @vovayatsyuk) - #22239: Spelling Correction (by @ansari-krish) - #22117: Previous scrolling to invalid form element is not being canceled on h� (by @yvechirko) - #22210: Typography_change (by @krnshah) - #22207: Translate comment tag in DHL config settings (by @yogeshsuhagiya) - #22205: Translated exception message (by @yogeshsuhagiya) - #22201: Correct spelling (by @ravi-chandra3197) - #22195: 22166: updated README to follow-up the switch from Bugcrowd to hackerone (by @mautz-et-tong) - #22184: Removing incorrect less selector '.abs-cleafix', it has a typo + it i� (by @hostep) - #22171: unregister phar only when appropriate (by @adaudenthun) - #21821: Aligning tooltip action on dashboard (by @rafaelstz) - #22151: Update PatchApplierTest.php - Corrected Spelling (by @ryantfowler) - #22128: Fixes issue - #21824. "save_parameters_in_session" set to true for admin user grid (by @jayankaghosh) - #22091: Fixed assignment of the guest customer to the guest group when 'Automatic Assignment by VAT ID' is enabled (by @vovayatsyuk) - #22046: FIX for issue #21916 - Elasticsearch6 generation does not exist (by @phoenix128) Fixed GitHub Issues: - #21715: Previous scrolling to invalid form element is not being canceled on hitting submit multiple times (reported by @lukeromanowicz) has been fixed in #22117 by @yvechirko in 2.3-develop branch Related commits: 1. 3e0836e - #22166: Information and link in README.md file related to Security issue reporting should be updated (reported by @sdzhepa) has been fixed in #22195 by @mautz-et-tong in 2.3-develop branch Related commits: 1. 34bd8bd - #21973: Why phar stream is being unregistered? (reported by @kassner) has been fixed in #22171 by @adaudenthun in 2.3-develop branch Related commits: 1. 191fc7c - #21824: Filter in admin users grid in backend isn't being remembered (reported by @ihor-sviziev) has been fixed in #22128 by @jayankaghosh in 2.3-develop branch Related commits: 1. a56b987 - #21916: Elasticsearch6 generation does not exist (reported by @wclshashank) has been fixed in #22046 by @phoenix128 in 2.3-develop branch Related commits: 1. fa079c9 2. 75684ca 3. b8ab61b 4. 6d87330 - #21976: Magento doesn't work after upgrade from 2.3.0 to 2.3.1 (reported by @dweerd) has been fixed in #22046 by @phoenix128 in 2.3-develop branch Related commits: 1. fa079c9 2. 75684ca 3. b8ab61b 4. 6d87330
2 parents 0d2b026 + 84972d7 commit c224526

File tree

18 files changed

+206
-56
lines changed

18 files changed

+206
-56
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4136,7 +4136,7 @@ Tests:
41364136
* Moved Multishipping functionality to newly created module Multishipping
41374137
* Extracted Product duplication behavior from Product model to Product\Copier model
41384138
* Replaced event "catalog_model_product_duplicate" with composite Product\Copier model
4139-
* Replaced event "catalog_product_prepare_save" with controller product initialization helper that can be customozed via plugins
4139+
* Replaced event "catalog_product_prepare_save" with controller product initialization helper that can be customized via plugins
41404140
* Consolidated Authorize.Net functionality in single module Authorizenet
41414141
* Eliminated dependency of Sales module on Shipping and Usa modules
41424142
* Eliminated dependency of Shipping module on Customer module

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Please review the [Code Contributions guide](https://devdocs.magento.com/guides/
4545

4646
## Reporting Security Issues
4747

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).
48+
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up your issue.
4949

5050
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

app/bootstrap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Environment initialization
99
*/
1010
error_reporting(E_ALL);
11-
stream_wrapper_unregister('phar');
11+
if (in_array('phar', \stream_get_wrappers())) {
12+
stream_wrapper_unregister('phar');
13+
}
1214
#ini_set('display_errors', 1);
1315

1416
/* PHP version validation */

app/code/Magento/Braintree/Controller/Paypal/PlaceOrder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function execute()
7575
$this->logger->critical($e);
7676
$this->messageManager->addExceptionMessage(
7777
$e,
78-
'The order #' . $quote->getReservedOrderId() . ' cannot be processed.'
78+
__('The order #%1 cannot be processed.', $quote->getReservedOrderId())
7979
);
8080
}
8181

app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Attributes;
8+
79
/**
8-
* Bundle Extended Attribures Block
10+
* Bundle Extended Attribures Block.
911
*
10-
* @author Magento Core Team <[email protected]>
12+
* @author Magento Core Team <[email protected]>
1113
*/
12-
namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Attributes;
13-
1414
class Extend extends \Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset\Element
1515
{
1616
/**
@@ -75,7 +75,7 @@ public function getElementHtml()
7575
}
7676

7777
/**
78-
* Execute method getElementHtml from parrent class
78+
* Execute method getElementHtml from parent class
7979
*
8080
* @return string
8181
*/
@@ -85,6 +85,8 @@ public function getParentElementHtml()
8585
}
8686

8787
/**
88+
* Get options.
89+
*
8890
* @return array
8991
*/
9092
public function getOptions()
@@ -106,6 +108,8 @@ public function getOptions()
106108
}
107109

108110
/**
111+
* Is disabled field.
112+
*
109113
* @return bool
110114
*/
111115
public function isDisabledField()
@@ -118,6 +122,8 @@ public function isDisabledField()
118122
}
119123

120124
/**
125+
* Get product.
126+
*
121127
* @return mixed
122128
*/
123129
public function getProduct()
@@ -129,6 +135,8 @@ public function getProduct()
129135
}
130136

131137
/**
138+
* Get extended element.
139+
*
132140
* @param string $switchAttributeCode
133141
* @return \Magento\Framework\Data\Form\Element\Select
134142
* @throws \Magento\Framework\Exception\LocalizedException

app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function __construct(
6969

7070
/**
7171
* Overloaded method for getting list of bundle options
72+
*
7273
* Caches result in quote item, because it can be used in cart 'recent view' and on same page in cart checkout
7374
*
7475
* @return array
@@ -88,7 +89,7 @@ public function getMessages()
8889
$messages = [];
8990
$quoteItem = $this->getItem();
9091

91-
// Add basic messages occuring during this page load
92+
// Add basic messages occurring during this page load
9293
$baseMessages = $quoteItem->getMessage(false);
9394
if ($baseMessages) {
9495
foreach ($baseMessages as $message) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<field id="account" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
3232
<label>Account Number</label>
3333
</field>
34-
<field id="content_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
34+
<field id="content_type" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
3535
<label>Content Type (Non Domestic)</label>
3636
<comment>Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)</comment>
3737
<source_model>Magento\Dhl\Model\Source\Contenttype</source_model>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Title,Title
6161
Password,Password
6262
"Account Number","Account Number"
6363
"Content Type","Content Type"
64+
"Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)","Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)"
6465
"Calculate Handling Fee","Calculate Handling Fee"
6566
"Handling Applied","Handling Applied"
6667
"""Per Order"" allows a single handling fee for the entire order. ""Per Package"" allows an individual handling fee for each package.","""Per Order"" allows a single handling fee for the entire order. ""Per Package"" allows an individual handling fee for each package."

app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
use Magento\Framework\Event\ObserverInterface;
99

10+
/**
11+
* Handle customer VAT number on collect_totals_before event of quote address.
12+
*
13+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
14+
*/
1015
class CollectTotalsObserver implements ObserverInterface
1116
{
1217
/**
@@ -124,7 +129,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
124129
);
125130
}
126131

127-
if ($groupId) {
132+
if ($groupId !== null) {
128133
$address->setPrevQuoteCustomerGroupId($quote->getCustomerGroupId());
129134
$quote->setCustomerGroupId($groupId);
130135
$this->customerSession->setCustomerGroupId($groupId);

app/code/Magento/Quote/Test/Unit/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGrou
199199
->method('getNotLoggedInGroup')
200200
->will($this->returnValue($this->groupInterfaceMock));
201201
$this->groupInterfaceMock->expects($this->once())
202-
->method('getId')->will($this->returnValue(0));
202+
->method('getId')->will($this->returnValue(null));
203203
$this->vatValidatorMock->expects($this->once())
204204
->method('isEnabled')
205205
->with($this->quoteAddressMock, $this->storeId)
@@ -220,9 +220,6 @@ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGrou
220220
$this->returnValue(false)
221221
);
222222

223-
$groupMock = $this->getMockBuilder(\Magento\Customer\Api\Data\GroupInterface::class)
224-
->disableOriginalConstructor()
225-
->getMock();
226223
$this->customerMock->expects($this->once())->method('getId')->will($this->returnValue(null));
227224

228225
/** Assertions */

app/code/Magento/User/view/adminhtml/layout/adminhtml_user_grid_block.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<argument name="default_sort" xsi:type="string">username</argument>
1717
<argument name="default_dir" xsi:type="string">asc</argument>
1818
<argument name="grid_url" xsi:type="url" path="*/*/roleGrid"/>
19+
<argument name="save_parameters_in_session" xsi:type="boolean">true</argument>
1920
</arguments>
2021
<block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="permission.user.grid.columnSet">
2122
<arguments>

app/design/adminhtml/Magento/backend/web/css/source/forms/_temp.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,6 @@ label.mage-error {
470470
}
471471

472472
.admin__data-grid-header-row {
473-
&:extend(.abs-cleafix);
474-
475473
.action-select-multiselect {
476474
-webkit-appearance: menulist-button;
477475
appearance: menulist-button;

app/design/adminhtml/Magento/backend/web/css/source/forms/fields/_field-tooltips.less

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@field-tooltip-content__width: 32rem;
2323
@field-tooltip-content__z-index: 1;
2424

25-
@field-tooltip-action__margin-left: 2rem;
25+
@field-tooltip-action__margin-left: 0;
2626

2727
//
2828
// Form Fields

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@
173173
width: 0;
174174
}
175175
.field-tooltip .field-tooltip-content::before {
176-
border-bottom-color: @color-gray40;
176+
.lib-css(border-bottom-color, @checkout-tooltip-content__border-color);
177177
}
178178
.field-tooltip .field-tooltip-content::after {
179-
border-bottom-color: @color-gray-light01;
179+
.lib-css(border-bottom-color, @checkout-tooltip-content__background-color);
180180
top: 1px;
181181
}
182182
}

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
use Magento\Framework\Code\Generator\DefinedClasses;
99
use Magento\Framework\Code\Generator\EntityAbstract;
1010
use Magento\Framework\Code\Generator\Io;
11+
use Magento\Framework\ObjectManager\ConfigInterface;
1112
use Magento\Framework\ObjectManagerInterface;
1213
use Magento\Framework\Phrase;
1314
use Magento\Framework\Filesystem\Driver\File;
1415
use Psr\Log\LoggerInterface;
1516

17+
/**
18+
* Class code generator.
19+
*/
1620
class Generator
1721
{
1822
const GENERATION_SUCCESS = 'success';
@@ -232,7 +236,21 @@ protected function shouldSkipGeneration($resultEntityType, $sourceClassName, $re
232236
{
233237
if (!$resultEntityType || !$sourceClassName) {
234238
return self::GENERATION_ERROR;
235-
} elseif ($this->definedClasses->isClassLoadableFromDisk($resultClass)) {
239+
}
240+
241+
/** @var ConfigInterface $omConfig */
242+
$omConfig = $this->objectManager->get(ConfigInterface::class);
243+
$virtualTypes = $omConfig->getVirtualTypes();
244+
245+
/**
246+
* Do not try to autogenerate virtual types
247+
* For example virtual types with names overlapping autogenerated suffixes
248+
*/
249+
if (isset($virtualTypes[$resultClass])) {
250+
return self::GENERATION_SKIP;
251+
}
252+
253+
if ($this->definedClasses->isClassLoadableFromDisk($resultClass)) {
236254
$generatedFileName = $this->_ioObject->generateResultFileName($resultClass);
237255
/**
238256
* Must handle two edge cases: a competing process has generated the class and written it to disc already,
@@ -244,9 +262,12 @@ protected function shouldSkipGeneration($resultEntityType, $sourceClassName, $re
244262
$this->_ioObject->includeFile($generatedFileName);
245263
}
246264
return self::GENERATION_SKIP;
247-
} elseif (!isset($this->_generatedEntities[$resultEntityType])) {
265+
}
266+
267+
if (!isset($this->_generatedEntities[$resultEntityType])) {
248268
throw new \InvalidArgumentException('Unknown generation entity.');
249269
}
270+
250271
return false;
251272
}
252273
}

0 commit comments

Comments
 (0)