Skip to content

Commit f2b2f81

Browse files
committed
Merge branch '2.4-develop-php74' into MC-34039
2 parents f051379 + 45af4db commit f2b2f81

File tree

69 files changed

+355
-245
lines changed

Some content is hidden

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

69 files changed

+355
-245
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontClearCompareActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<waitForElementVisible selector="{{ModalConfirmationSection.OkButton}}" time="30" stepKey="waitForClearOk"/>
1919
<scrollTo selector="{{ModalConfirmationSection.OkButton}}" stepKey="scrollToClearOk"/>
2020
<click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickClearOk"/>
21-
<waitForElement selector="{{StorefrontMessagesSection.message('You cleared the comparison list.')}}" time="30" stepKey="AssertMessageCleared"/>
22-
<waitForElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" time="30" stepKey="assertNoItems"/>
21+
<waitForElementVisible selector="{{StorefrontMessagesSection.message('You cleared the comparison list.')}}" time="30" stepKey="assertMessageCleared"/>
22+
<waitForElementVisible selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" time="30" stepKey="assertNoItems"/>
2323
</actionGroup>
2424
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyComparedAtWebsiteLevelTest.xml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="StoreFrontRecentlyComparedAtWebsiteLevelTest">
1111
<annotations>
12+
<features value="Catalog"/>
1213
<stories value="Recently Compared Product"/>
1314
<title value="Recently Compared Product at website level"/>
1415
<description value="Recently Compared Products widget appears on a page immediately after adding product to compare"/>
15-
<useCaseId value="MC-32763"/>
16-
<testCaseId value="MC-33099"/>
1716
<severity value="MAJOR"/>
17+
<testCaseId value="MC-33099"/>
18+
<useCaseId value="MC-32763"/>
1819
<group value="catalog"/>
1920
<group value="widget"/>
2021
</annotations>
2122
<before>
23+
<!-- Set Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = Website -->
24+
<magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="setRecentlyViewedComparedProductsScopeToWebsite"/>
2225
<!--Create Simple Products and Category -->
2326
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
2427
<createData entity="SimpleProduct" stepKey="createSimpleProductToCompareFirst">
@@ -40,67 +43,63 @@
4043
<actionGroup ref="AdminCreateRecentlyProductsWidgetActionGroup" stepKey="createRecentlyComparedProductsWidget">
4144
<argument name="widget" value="RecentlyComparedProductsWidget"/>
4245
</actionGroup>
43-
<!-- Set Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = Website -->
44-
<magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="RecentlyViewedProductScopeWebsiteGroup"/>
4546
</before>
4647
<after>
47-
<!-- Customer Logout -->
48-
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutFromCustomer"/>
49-
<!-- Delete product widget -->
50-
<actionGroup ref="AdminDeleteWidgetActionGroup" stepKey="deleteRecentlyComparedProductsWidget">
51-
<argument name="widget" value="RecentlyComparedProductsWidget"/>
52-
</actionGroup>
53-
<!-- Logout Admin -->
54-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
5548
<!-- Reset Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = Website-->
56-
<magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="RecentlyViewedProductScopeWebsite"/>
49+
<magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="setRecentlyViewedComparedProductsScopeToDefault"/>
5750
<!-- Delete Products and Category -->
5851
<deleteData createDataKey="createSimpleProductToCompareFirst" stepKey="deleteSimpleProductToCompareFirst"/>
5952
<deleteData createDataKey="createSimpleProductToCompareSecond" stepKey="deleteSimpleProductToCompareSecond"/>
6053
<deleteData createDataKey="createSimpleProductNotVisibleFirst" stepKey="deleteSimpleProductNotVisibleFirst"/>
6154
<deleteData createDataKey="createSimpleProductNotVisibleSecond" stepKey="deleteSimpleProductNotVisibleSecond"/>
6255
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
56+
<!-- Customer Logout -->
57+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutFromCustomer"/>
6358
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
59+
<!-- Delete product widget -->
60+
<actionGroup ref="AdminDeleteWidgetActionGroup" stepKey="deleteRecentlyComparedProductsWidget">
61+
<argument name="widget" value="RecentlyComparedProductsWidget"/>
62+
</actionGroup>
63+
<!-- Logout Admin -->
64+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
6465
</after>
6566
<!--Login to storefront from customer-->
6667
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
67-
<argument name="Customer" value="$$createCustomer$$"/>
68+
<argument name="Customer" value="$createCustomer$"/>
6869
</actionGroup>
69-
<see userInput="Welcome, $$createCustomer.firstname$$ $$createCustomer.lastname$$!" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="checkWelcomeMessage"/>
70-
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="openCategoryPageAfterAddedProductToCart"/>
70+
<see userInput="Welcome, $createCustomer.firstname$ $createCustomer.lastname$!" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="checkWelcomeMessage"/>
71+
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openCategoryPage"/>
7172
<!--Add to compare Simple Product and Simple Product 2-->
7273
<actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="addSimpleProduct1ToCompare" >
73-
<argument name="productVar" value="$$createSimpleProductToCompareFirst$$"/>
74+
<argument name="productVar" value="$createSimpleProductToCompareFirst$"/>
7475
</actionGroup>
7576
<actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="addSimpleProduct2ToCompare" >
76-
<argument name="productVar" value="$$createSimpleProductToCompareSecond$$"/>
77+
<argument name="productVar" value="$createSimpleProductToCompareSecond$"/>
7778
</actionGroup>
7879
<!--The Compare Products widget displays Simple Product 1 and Simple Product 2-->
7980
<actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="checkSimpleProduct1InCompareSidebar">
80-
<argument name="productVar" value="$$createSimpleProductToCompareFirst$$"/>
81+
<argument name="productVar" value="$createSimpleProductToCompareFirst$"/>
8182
</actionGroup>
8283
<actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="checkSimpleProduct2InCompareSidebar">
83-
<argument name="productVar" value="$$createSimpleProductToCompareSecond$$"/>
84+
<argument name="productVar" value="$createSimpleProductToCompareSecond$"/>
8485
</actionGroup>
8586

8687
<!--Click Clear all in the Compare Products widget-->
8788
<actionGroup ref="StorefrontClearCompareActionGroup" stepKey="clearCompareList"/>
8889
<!--The Recently Compared widget displays Simple Product 1 and Simple Product 2-->
89-
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="openCategoryPageToCheckProductsInRecentlyComparedSidebar"/>
90+
<waitForPageLoad stepKey="waitForRecentlyComparedWidgetLoad"/>
9091
<actionGroup ref="StorefrontAssertProductInRecentlyComparedWidgetActionGroup" stepKey="checkSimpleProduct1ExistInRecentlyComparedWidget">
91-
<argument name="product" value="$$createSimpleProductToCompareFirst$$"/>
92+
<argument name="product" value="$createSimpleProductToCompareFirst$"/>
9293
</actionGroup>
9394
<actionGroup ref="StorefrontAssertProductInRecentlyComparedWidgetActionGroup" stepKey="checkSimpleProduct2ExistInRecentlyComparedWidget">
94-
<argument name="product" value="$$createSimpleProductToCompareSecond$$"/>
95+
<argument name="product" value="$createSimpleProductToCompareSecond$"/>
9596
</actionGroup>
9697
<!--The Recently Compared widget not displays Simple Product 3 and Simple Product 4-->
9798
<actionGroup ref="StorefrontAssertNotExistProductInRecentlyComparedWidgetActionGroup" stepKey="checkSimpleProduct3NotExistInRecentlyComparedWidget">
98-
<argument name="product" value="$$createSimpleProductNotVisibleFirst$$"/>
99+
<argument name="product" value="$createSimpleProductNotVisibleFirst$"/>
99100
</actionGroup>
100101
<actionGroup ref="StorefrontAssertNotExistProductInRecentlyComparedWidgetActionGroup" stepKey="checkSimpleProduct4NotExistInRecentlyComparedWidget">
101-
<argument name="product" value="$$createSimpleProductNotVisibleSecond$$"/>
102+
<argument name="product" value="$createSimpleProductNotVisibleSecond$"/>
102103
</actionGroup>
103-
<amOnPage url="customer/account/logout/" stepKey="logoutCustomer"/>
104-
<waitForPageLoad time="30" stepKey="waitForPageLoad2"/>
105104
</test>
106105
</tests>

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -672,14 +672,6 @@
672672
<item name="store" xsi:type="string">Magento\Store\Model\StoreScopeProvider</item>
673673
</item>
674674
</item>
675-
<item name="Magento\Catalog\Api\Data\CategoryTreeInterface" xsi:type="array">
676-
<item name="entityTableName" xsi:type="string">catalog_category_entity</item>
677-
<item name="eavEntityType" xsi:type="string">catalog_category</item>
678-
<item name="identifierField" xsi:type="string">entity_id</item>
679-
<item name="entityContext" xsi:type="array">
680-
<item name="store" xsi:type="string">Magento\Store\Model\StoreScopeProvider</item>
681-
</item>
682-
</item>
683675
<item name="Magento\Catalog\Api\Data\CategoryLinkInterface" xsi:type="array">
684676
<item name="entityTableName" xsi:type="string">catalog_category_product</item>
685677
<item name="identifierField" xsi:type="string">entity_id</item>
@@ -847,11 +839,6 @@
847839
<item name="store" xsi:type="string">Magento\Store\Model\DefaultStoreScopeProvider</item>
848840
</item>
849841
</item>
850-
<item name="Magento\Catalog\Api\Data\CategoryTreeInterface" xsi:type="array">
851-
<item name="entityContext" xsi:type="array">
852-
<item name="store" xsi:type="string">Magento\Store\Model\DefaultStoreScopeProvider</item>
853-
</item>
854-
</item>
855842
</argument>
856843
</arguments>
857844
</virtualType>
@@ -878,10 +865,6 @@
878865
<arguments>
879866
<argument name="extensionActions" xsi:type="array">
880867
<item name="eav" xsi:type="array">
881-
<item name="Magento\Catalog\Api\Data\CategoryTreeInterface" xsi:type="array">
882-
<item name="create" xsi:type="string">Magento\Catalog\Model\ResourceModel\CreateHandler</item>
883-
<item name="update" xsi:type="string">Magento\Catalog\Model\ResourceModel\UpdateHandler</item>
884-
</item>
885868
<item name="Magento\Catalog\Api\Data\CategoryInterface" xsi:type="array">
886869
<item name="create" xsi:type="string">Magento\Catalog\Model\ResourceModel\CreateHandler</item>
887870
<item name="update" xsi:type="string">Magento\Catalog\Model\ResourceModel\UpdateHandler</item>
@@ -903,7 +886,6 @@
903886
<arguments>
904887
<argument name="hydrators" xsi:type="array">
905888
<item name="Magento\Catalog\Api\Data\CategoryInterface" xsi:type="string">Magento\Framework\EntityManager\AbstractModelHydrator</item>
906-
<item name="Magento\Catalog\Api\Data\CategoryTreeInterface" xsi:type="string">Magento\Framework\EntityManager\AbstractModelHydrator</item>
907889
<item name="Magento\Catalog\Api\Data\ProductInterface" xsi:type="string">Magento\Catalog\Model\Product\Hydrator</item>
908890
</argument>
909891
</arguments>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,29 @@
154154
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickToAddProductToOrder"/>
155155
<waitForPageLoad stepKey="waitForNewOrderPageLoad"/>
156156
<see userInput="This product is out of stock." stepKey="seeTheErrorMessageDisplayed"/>
157+
158+
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="createNewOrderThirdTime">
159+
<argument name="customer" value="$createCustomer$"/>
160+
</actionGroup>
161+
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addThirdChildProductToOrder">
162+
<argument name="product" value="$createConfigChildProduct3$"/>
163+
<argument name="productQty" value="1"/>
164+
</actionGroup>
165+
<actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertNoticeAbsent">
166+
<argument name="productName" value="$createConfigChildProduct3.name$"/>
167+
<argument name="messageType" value="notice"/>
168+
</actionGroup>
169+
<actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertErrorAbsent">
170+
<argument name="productName" value="$createConfigChildProduct3.name$"/>
171+
<argument name="messageType" value="error"/>
172+
</actionGroup>
157173
<!-- Select shipping method -->
158174
<comment userInput="Select shipping method" stepKey="selectShippingMethod"/>
159175
<click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
160176
<waitForPageLoad stepKey="waitForShippingMethods"/>
161177
<click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
162178
<waitForPageLoad stepKey="waitForShippingMethodLoad"/>
163179
<click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder"/>
164-
<waitForPageLoad stepKey="waitForError"/>
165-
<!-- Check that error remains -->
166-
<actionGroup ref="AssertAdminItemOrderedErrorActionGroup" stepKey="assertProductErrorRemains">
167-
<argument name="productName" value="$createConfigChildProduct2.name$"/>
168-
<argument name="messageType" value="error"/>
169-
<argument name="message" value="This product is out of stock."/>
170-
</actionGroup>
180+
<actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="checkOrderSuccessfullyCreated"/>
171181
</test>
172182
</tests>

app/code/Magento/Customer/Model/Customer/DataProviderWithDefaultAddresses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ private function prepareDefaultAddress($address): array
165165
if (isset($addressData['street']) && !\is_array($address['street'])) {
166166
$addressData['street'] = explode("\n", $addressData['street']);
167167
}
168-
$addressData['country'] = $this->countryFactory->create()
169-
->loadByCode($addressData['country_id'])->getName();
168+
$countryId = $addressData['country_id'] ?? null;
169+
$addressData['country'] = $this->countryFactory->create()->loadByCode($countryId)->getName();
170170
}
171171

172172
return $addressData;

app/code/Magento/Eav/Model/Entity/AbstractEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ public function getLinkField()
766766
if (!$this->linkIdField) {
767767
$indexList = $this->getConnection()->getIndexList($this->getEntityTable());
768768
$pkName = $this->getConnection()->getPrimaryKeyName($this->getEntityTable());
769-
$this->linkIdField = $indexList[$pkName]['COLUMNS_LIST'][0];
769+
$this->linkIdField = $indexList[$pkName]['COLUMNS_LIST'][0] ?? null;
770770
if (!$this->linkIdField) {
771771
$this->linkIdField = $this->getEntityIdField();
772772
}

app/code/Magento/ImportExport/Helper/Report.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ public function getReportAbsolutePath($fileName)
111111
* Retrieve report file size
112112
*
113113
* @param string $filename
114-
* @return int|mixed
114+
* @return int|null
115115
*/
116116
public function getReportSize($filename)
117117
{
118-
return $this->varDirectory->stat($this->getFilePath($filename))['size'];
118+
$statResult = $this->varDirectory->stat($this->getFilePath($filename));
119+
120+
return $statResult['size'] ?? null;
119121
}
120122

121123
/**

app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function setUp(): void
9393
$this->varDirectory->expects($this->any())->method('getRelativePath')->willReturn('path');
9494
$this->varDirectory->expects($this->any())->method('readFile')->willReturn('contents');
9595
$this->varDirectory->expects($this->any())->method('isFile')->willReturn(true);
96-
$this->varDirectory->expects($this->any())->method('stat')->willReturn(100);
96+
$this->varDirectory->expects($this->any())->method('stat')->willReturn(false);
9797
$this->filesystem->expects($this->any())->method('getDirectoryWrite')->willReturn($this->varDirectory);
9898
$this->objectManagerHelper = new ObjectManagerHelper($this);
9999
$this->report = $this->objectManagerHelper->getObject(

app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8383

8484
$startTime = microtime(true);
8585
$indexerConfig = $this->getConfig()->getIndexer($indexer->getId());
86-
$sharedIndex = $indexerConfig['shared_index'];
86+
$sharedIndex = $indexerConfig['shared_index'] ?? null;
8787

8888
// Skip indexers having shared index that was already complete
8989
if (!in_array($sharedIndex, $this->sharedIndexesComplete)) {

app/code/Magento/Indexer/Model/Processor.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public function reindexAllInvalid()
6868
$indexerConfig = $this->config->getIndexer($indexerId);
6969
if ($indexer->isInvalid()) {
7070
// Skip indexers having shared index that was already complete
71-
if (!in_array($indexerConfig['shared_index'], $sharedIndexesComplete)) {
71+
$sharedIndex = $indexerConfig['shared_index'] ?? null;
72+
if (!in_array($sharedIndex, $sharedIndexesComplete)) {
7273
$indexer->reindexAll();
7374
} else {
7475
/** @var \Magento\Indexer\Model\Indexer\State $state */
@@ -78,8 +79,8 @@ public function reindexAllInvalid()
7879
$state->setStatus(StateInterface::STATUS_VALID);
7980
$state->save();
8081
}
81-
if ($indexerConfig['shared_index']) {
82-
$sharedIndexesComplete[] = $indexerConfig['shared_index'];
82+
if ($sharedIndex) {
83+
$sharedIndexesComplete[] = $sharedIndex;
8384
}
8485
}
8586
}

0 commit comments

Comments
 (0)