Skip to content

Commit 62e258a

Browse files
committed
Merge branch '2.4-develop' of github.com:magento-commerce/magento2ce into platform-health
2 parents 5812ec7 + 6063639 commit 62e258a

File tree

44 files changed

+1828
-117
lines changed

Some content is hidden

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

44 files changed

+1828
-117
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the
3333
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
3434
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3535
3. Create and test your work.
36-
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#pull_request).
36+
4. Follow the [Forks And Pull Requests Instructions](https://devdocs.magento.com/contributor-guide/contributing.html#forks-and-pull-requests) to fork the Magento 2 repository and send us a pull request.
3737
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3838

3939
## Code of Conduct
@@ -43,6 +43,6 @@ The full text is available in the repository [Wiki](https://github.com/magento/m
4343

4444
## Connecting with Community!
4545

46-
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/messages/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
46+
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/archives/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
4747

4848
Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,4 +1432,18 @@
14321432
<data key="name" unique="suffix">ProductWithSku24MB06-</data>
14331433
<data key="sku" unique="suffix">24 MB06 </data>
14341434
</entity>
1435+
<entity name="SimpleProduct50" type="product">
1436+
<data key="name" unique="suffix">Simple Product </data>
1437+
<data key="sku" unique="suffix">SimpleProduct</data>
1438+
<data key="urlKey" unique="suffix">simple-product-</data>
1439+
<data key="type_id">simple</data>
1440+
<data key="attribute_set_id">4</data>
1441+
<data key="price">50.00</data>
1442+
<data key="visibility">4</data>
1443+
<data key="status">1</data>
1444+
<data key="quantity">1000</data>
1445+
<data key="weight">1</data>
1446+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
1447+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
1448+
</entity>
14351449
</entities>

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3019,7 +3019,7 @@ protected function getUrlKey($rowData)
30193019
{
30203020
if (!empty($rowData[self::URL_KEY])) {
30213021
$urlKey = (string) $rowData[self::URL_KEY];
3022-
return trim(strtolower($urlKey));
3022+
return $this->productUrl->formatUrlKey($urlKey);
30233023
}
30243024

30253025
if (!empty($rowData[self::COL_NAME])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontProceedToCheckoutButtonDisabledActionGroup">
12+
<seeElement selector="{{CheckoutCartSummarySection.proceedToCheckoutDisabled}}" stepKey="assertCheckoutBtnDisabled"/>
13+
</actionGroup>
14+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
<element name="shippingPrice" type="text" selector="#co-shipping-method-form span .price"/>
3838
<element name="shippingMethodElementId" type="radio" selector="#s_method_{{carrierCode}}_{{methodCode}}" parameterized="true" timeout="30"/>
3939
<element name="estimateShippingAndTaxForm" type="block" selector="#shipping-zip-form"/>
40+
<element name="proceedToCheckoutDisabled" type="button" selector=".action.primary.checkout.disabled" timeout="60"/>
4041
</section>
4142
</sections>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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="StorefrontCheckoutWithEnabledMinimumOrderAmountOptionTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Order Placement With Enabled Minimum Order Amount Option"/>
15+
<title value="Minimum Order Amount Option Enabled for Checkout"/>
16+
<description value="Customer should not be able to place an order with if minimum order amount was not reached"/>
17+
<severity value="MAJOR"/>
18+
<group value="checkout"/>
19+
</annotations>
20+
<before>
21+
<magentoCLI command="config:set {{EnableMinimumOrderAmountConfigData.path}} {{EnableMinimumOrderAmountConfigData.value}}" stepKey="enableMinimumOrderAmount"/>
22+
<magentoCLI command="config:set {{SetMinimumOrderAmount100ConfigData.path}} {{SetMinimumOrderAmount100ConfigData.value}}" stepKey="setMinimumOrderAmount100"/>
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
24+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
25+
<createData entity="SimpleProduct50" stepKey="createProduct">
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
29+
<argument name="tags" value="config full_page"/>
30+
</actionGroup>
31+
</before>
32+
<after>
33+
<magentoCLI command="config:set {{DisableMinimumOrderAmountConfigData.path}} {{DisableMinimumOrderAmountConfigData.value}}" stepKey="disableMinimumOrderAmount"/>
34+
<magentoCLI command="config:set {{SetDefaultMinimumOrderAmountConfigData.path}} {{SetDefaultMinimumOrderAmountConfigData.value}}" stepKey="setMinimumOrderAmountDefaultValue"/>
35+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
36+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
37+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
38+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
39+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
40+
<argument name="tags" value="config full_page"/>
41+
</actionGroup>
42+
</after>
43+
44+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
45+
<argument name="Customer" value="$createCustomer$"/>
46+
</actionGroup>
47+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory">
48+
<argument name="category" value="$createCategory$"/>
49+
<argument name="product" value="$createProduct$"/>
50+
</actionGroup>
51+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addProductToTheCart">
52+
<argument name="productQty" value="1"/>
53+
</actionGroup>
54+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateToCartPage"/>
55+
<actionGroup ref="AssertMessageCustomerChangeAccountInfoActionGroup" stepKey="assertMessage">
56+
<argument name="message" value="Minimum order amount is $100.00"/>
57+
<argument name="messageType" value="notice"/>
58+
</actionGroup>
59+
<actionGroup ref="AssertStorefrontProceedToCheckoutButtonDisabledActionGroup" stepKey="assertCheckoutBtnDisabled"/>
60+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="navigateToProductPage">
61+
<argument name="category" value="$createCategory$"/>
62+
<argument name="product" value="$createProduct$"/>
63+
</actionGroup>
64+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addSecondProductToTheCart">
65+
<argument name="productQty" value="1"/>
66+
</actionGroup>
67+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
68+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/>
69+
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
70+
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/>
71+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
72+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder">
73+
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
74+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
75+
</actionGroup>
76+
</test>
77+
</tests>

app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
4848
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
4949
<dd>
5050
<?php if (isset($_formatedOptionValue['full_view'])) :?>
51-
<?= $block->escapeHtml($_formatedOptionValue['full_view']) ?>
51+
<?= $block->escapeHtml($_formatedOptionValue['full_view'], ['span', 'a']) ?>
5252
<?php else :?>
5353
<?= $block->escapeHtml($_formatedOptionValue['value'], ['span', 'a']) ?>
5454
<?php endif; ?>

app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public function uploadFile($targetPath, $type = null)
574574
}
575575

576576
// create thumbnail
577-
$this->resizeFile($targetPath . '/' . ltrim($uploader->getUploadedFileName(), '/'), true);
577+
$this->resizeFile(rtrim($targetPath, '/') . '/' . ltrim($uploader->getUploadedFileName(), '/'), true);
578578

579579
return $result;
580580
}

app/code/Magento/GraphQlCache/Model/Plugin/Integration/Api/UserTokenIssuer.php renamed to app/code/Magento/GraphQlCache/Model/Plugin/Auth/TokenIssuer.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQlCache\Model\Plugin\Integration\Api;
8+
namespace Magento\GraphQlCache\Model\Plugin\Auth;
99

1010
use Magento\Authorization\Model\UserContextInterface;
11-
use Magento\Framework\App\ResponseInterface;
1211
use Magento\GraphQl\Model\Query\ContextFactoryInterface;
1312
use Magento\Integration\Api\UserTokenIssuerInterface;
1413

1514
/**
16-
* Load the shared UserContext with data for the user used to generate the token
15+
* Load the shared UserContext with data for the new user after a token is generated
1716
*/
18-
class UserTokenIssuer
17+
class TokenIssuer
1918
{
2019
/**
2120
* @var ContextFactoryInterface
@@ -36,7 +35,7 @@ public function __construct(ContextFactoryInterface $contextFactory)
3635
* @param UserTokenIssuerInterface $issuer
3736
* @param string $result
3837
* @param UserContextInterface $userContext
39-
* @return ResponseInterface
38+
* @return string
4039
*
4140
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
4241
*/
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\GraphQlCache\Model\Plugin\Auth;
9+
10+
use Magento\Authorization\Model\UserContextInterface;
11+
use Magento\GraphQl\Model\Query\ContextFactoryInterface;
12+
use Magento\Integration\Api\UserTokenRevokerInterface;
13+
use Magento\Integration\Model\CustomUserContext;
14+
15+
/**
16+
* Load the shared UserContext with data for guest after a token is revoked
17+
*/
18+
class TokenRevoker
19+
{
20+
/**
21+
* @var ContextFactoryInterface
22+
*/
23+
private $contextFactory;
24+
25+
/**
26+
* @param ContextFactoryInterface $contextFactory
27+
*/
28+
public function __construct(ContextFactoryInterface $contextFactory)
29+
{
30+
$this->contextFactory = $contextFactory;
31+
}
32+
33+
/**
34+
* Reset the shared user context to guest after a token is revoked
35+
*
36+
* @param UserTokenRevokerInterface $revoker
37+
* @return void
38+
*
39+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
40+
*/
41+
public function afterRevokeFor(UserTokenRevokerInterface $revoker): void
42+
{
43+
$this->contextFactory->create(new CustomUserContext(0, UserContextInterface::USER_TYPE_GUEST));
44+
}
45+
}

0 commit comments

Comments
 (0)