Skip to content

Commit e45dd6e

Browse files
committed
Merge remote-tracking branch 'upstream/2.4-develop' into 2.4-develop
2 parents fb839e7 + 4dfb6da commit e45dd6e

File tree

83 files changed

+650
-256
lines changed

Some content is hidden

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

83 files changed

+650
-256
lines changed

app/code/Magento/Bundle/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function getAllowedSelectionTypes()
3838
{
3939
$configData = $this->config->getType(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE);
4040

41-
return isset($configData['allowed_selection_types']) ? $configData['allowed_selection_types'] : [];
41+
return $configData['allowed_selection_types'] ?? [];
4242
}
4343
}

app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee"/>
7171
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct1.sku$$" stepKey="seeRelatedProduct"/>
7272

73+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
74+
7375
<!--See related product in storefront-->
7476
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
7577
<waitForPageLoad stepKey="waitForStorefront"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
</actionGroup>
4545
<actionGroup ref="logout" stepKey="logoutAsAdmin"/>
4646

47-
<!-- Run reindex -->
48-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
47+
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
4948
</before>
5049
<after>
5150
<deleteData createDataKey="createBundleProductCreateBundleProduct" stepKey="deleteDynamicBundleProduct"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
2323
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
2424
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
25+
26+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
2527
</before>
2628
<after>
2729
<!-- Delete the bundled product -->
@@ -89,6 +91,10 @@
8991

9092
<!-- Save product and go to storefront -->
9193
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
94+
95+
<wait stepKey="waitBeforeIndexerAfterBundle" time="60"/>
96+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexerAfterBundle"/>
97+
9298
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
9399
<waitForPageLoad stepKey="waitForStorefront"/>
94100
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
<click stepKey="saveProductBundle" selector="{{AdminProductFormActionSection.saveButton}}"/>
6666
<see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/>
6767

68+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
69+
6870
<!-- Go to the storefront bundled product page -->
6971
<amOnPage url="/{{BundleProduct.urlKey}}.html" stepKey="visitStoreFrontBundle"/>
7072
<waitForPageLoad stepKey="waitForStorefront"/>

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Group/AbstractGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function getCustomerGroups($groupId = null)
212212
}
213213

214214
if ($groupId !== null) {
215-
return isset($this->_customerGroups[$groupId]) ? $this->_customerGroups[$groupId] : [];
215+
return $this->_customerGroups[$groupId] ?? [];
216216
}
217217

218218
return $this->_customerGroups;

app/code/Magento/Catalog/Model/Product/Attribute/Source/Status.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public function getVisibleStatusIds()
3737
}
3838

3939
/**
40-
* Retrieve Saleable Status Ids
41-
* Default Product Enable status
40+
* Retrieve Saleable Status Ids, default Product Enable status
4241
*
4342
* @return int[]
4443
*/
@@ -51,6 +50,7 @@ public function getSaleableStatusIds()
5150
* Retrieve option array
5251
*
5352
* @return string[]
53+
* phpcs:disable Magento2.Functions.StaticFunction
5454
*/
5555
public static function getOptionArray()
5656
{
@@ -83,7 +83,7 @@ public function getOptionText($optionId)
8383
{
8484
$options = self::getOptionArray();
8585

86-
return isset($options[$optionId]) ? $options[$optionId] : null;
86+
return $options[$optionId] ?? null;
8787
}
8888

8989
/**

app/code/Magento/Catalog/Model/Product/Gallery/EntryResolver.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
use Magento\Catalog\Model\Product;
1111

12+
/**
13+
* Manage entryes
14+
*/
1215
class EntryResolver
1316
{
1417
/**
@@ -27,7 +30,7 @@ public function getEntryFilePathById(Product $product, $entryId)
2730

2831
foreach ($mediaGalleryData['images'] as $image) {
2932
if (isset($image['value_id']) && $image['value_id'] == $entryId) {
30-
return isset($image['file']) ? $image['file'] : null;
33+
return $image['file'] ?? null;
3134
}
3235
}
3336
return null;
@@ -49,7 +52,7 @@ public function getEntryIdByFilePath(Product $product, $filePath)
4952

5053
foreach ($mediaGalleryData['images'] as $image) {
5154
if (isset($image['file']) && $image['file'] == $filePath) {
52-
return isset($image['value_id']) ? $image['value_id'] : null;
55+
return $image['value_id'] ?? null;
5356
}
5457
}
5558
return null;

app/code/Magento/Catalog/Model/Product/Visibility.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static function getAllOptions()
133133
public static function getOptionText($optionId)
134134
{
135135
$options = self::getOptionArray();
136-
return isset($options[$optionId]) ? $options[$optionId] : null;
136+
return $options[$optionId] ?? null;
137137
}
138138
//phpcs:enable Magento2.Functions.StaticFunction
139139

app/code/Magento/Catalog/Model/ProductLink/Converter/ConverterPool.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Magento\Catalog\Model\ProductLink\Converter;
88

9+
/**
10+
* Return converter by link type
11+
*/
912
class ConverterPool
1013
{
1114
/**
@@ -34,8 +37,6 @@ public function __construct(array $converters)
3437
*/
3538
public function getConverter($linkType)
3639
{
37-
return isset($this->converters[$linkType])
38-
? $this->converters[$linkType]
39-
: $this->converters[$this->defaultConverterCode];
40+
return $this->converters[$linkType] ?? $this->converters[$this->defaultConverterCode];
4041
}
4142
}

app/code/Magento/Catalog/Model/ProductLink/Link.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\Catalog\Model\ProductLink;
88

99
/**
10+
* @inheritdoc
11+
*
1012
* @codeCoverageIgnore
1113
*/
1214
class Link extends \Magento\Framework\Model\AbstractExtensibleModel implements
@@ -30,17 +32,19 @@ class Link extends \Magento\Framework\Model\AbstractExtensibleModel implements
3032
*/
3133
protected function _get($key)
3234
{
33-
return isset($this->_data[$key]) ? $this->_data[$key] : null;
35+
return $this->_data[$key] ?? null;
3436
}
3537

3638
/**
3739
* Return Data Object data in array format.
3840
*
3941
* @return array
4042
* @todo refactor with converter for AbstractExtensibleModel
43+
* phpcs:disable
4144
*/
4245
public function __toArray()
4346
{
47+
//phpcs:enable
4448
$data = $this->_data;
4549
$hasToArray = function ($model) {
4650
return is_object($model) && method_exists($model, '__toArray') && is_callable([$model, '__toArray']);
@@ -169,7 +173,7 @@ public function setPosition($position)
169173
}
170174

171175
/**
172-
* {@inheritdoc}
176+
* @inheritdoc
173177
*
174178
* @return \Magento\Catalog\Api\Data\ProductLinkExtensionInterface|null
175179
*/
@@ -184,7 +188,7 @@ public function getExtensionAttributes()
184188
}
185189

186190
/**
187-
* {@inheritdoc}
191+
* @inheritdoc
188192
*
189193
* @param \Magento\Catalog\Api\Data\ProductLinkExtensionInterface $extensionAttributes
190194
* @return $this

0 commit comments

Comments
 (0)