Adobe Commerce Stored XSS Arbitrary code execution
Description
Adobe Commerce versions 2.4.3-p2 (and earlier), 2.3.7-p3 (and earlier) and 2.4.4 (and earlier) are affected by a stored Cross-Site Scripting (XSS) vulnerability that could be abused by an attacker to inject malicious scripts into vulnerable form fields. Malicious JavaScript may be executed in a victim’s browser when they browse to the page containing the vulnerable field.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Adobe Commerce versions before 2.4.3-p3, 2.3.7-p4, and 2.4.5 are vulnerable to stored XSS in form fields, enabling arbitrary JavaScript execution.
Vulnerability
Description The vulnerability is a stored Cross-Site Scripting (XSS) flaw in Adobe Commerce (both Magento Open Source and Adobe Commerce) affecting versions 2.4.3-p2 and earlier, 2.3.7-p3 and earlier, and 2.4.4 and earlier [1][2][3]. The issue lies in insufficient sanitization of user-supplied input in certain form fields, allowing an attacker to inject malicious scripts that are stored on the server [3].
Exploitation
Prerequisites An attacker with the ability to submit data to vulnerable form fields can exploit this flaw. The attacker does not need to be authenticated if the form is publicly accessible, but administrative forms may require prior access [3]. Once the malicious input is stored, any victim who views the affected page will have the script executed in their browser [3].
Impact
Successful exploitation leads to execution of arbitrary JavaScript in the victim's browser within the context of the Adobe Commerce site. This can result in session hijacking, data theft, defacement, or redirection to malicious sites [3].
Mitigation
Adobe has addressed this vulnerability in releases 2.4.3-p3, 2.3.7-p4, and 2.4.5, as confirmed by the commit diffs updating version numbers and adding usage data consent prompts [1][2]. Users are strongly advised to upgrade to the latest patched version immediately.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
magento/community-editionPackagist | >= 2.3.0, < 2.3.7-p4 | 2.3.7-p4 |
magento/community-editionPackagist | >= 2.4.4, < 2.4.5 | 2.4.5 |
magento/community-editionPackagist | >= 2.4.0, < 2.4.3-p3 | 2.4.3-p3 |
Affected products
3- osv-coords2 versions
>= 2.3.0, < 2.3.7+ 1 more
- (no CPE)range: >= 2.3.0, < 2.3.7
- (no CPE)range: >= 2.3.0, < 2.3.7-p4
- Adobe/Magento Commercev5Range: unspecified
Patches
3246d524b7586Magento Release 2.3.7-p4
300 files changed · +5785 −2678
app/code/Magento/AdminAnalytics/composer.json+19 −17 modified@@ -1,29 +1,31 @@ { "name": "magento/module-admin-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.3-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-release-notification": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-release-notification": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\AdminAnalytics\\": "" - } + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\AdminAnalytics\\": "" + } } } +
app/code/Magento/AdminAnalytics/i18n/en_US.csv+3 −0 added@@ -0,0 +1,3 @@ +"Allow Adobe to collect usage data to improve user experience and offer in-product guidance", "Allow Adobe to collect usage data to improve user experience and offer in-product guidance" +"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>" +
app/code/Magento/AdminAnalytics/view/adminhtml/layout/adminhtml_dashboard_index.xml+1 −1 modified@@ -19,4 +19,4 @@ </block> </referenceContainer> </body> -</page> \ No newline at end of file +</page>
app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml+2 −6 modified@@ -49,7 +49,7 @@ <state>true</state> <options> <option name="modalClass" xsi:type="string">admin-usage-notification</option> - <option name="title" xsi:type="string" translate="true">Allow admin usage data collection</option> + <option name="title" xsi:type="string" translate="true">Allow Adobe to collect usage data to improve user experience and offer in-product guidance</option> <option name="autoOpen" xsi:type="boolean">true</option> <option name="type" xsi:type="string">popup</option> <option name="clickableOverlay" xsi:type="boolean">false</option> @@ -82,11 +82,7 @@ <item name="config" xsi:type="array"> <item name="label" xsi:type="string"/> <item name="additionalClasses" xsi:type="string">release-notification-text</item> - <item name="text" xsi:type="string" translate="true"><![CDATA[ - <p>Help us improve Magento Admin by allowing us to collect usage data.</p> - <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin and related products and services.</p> - <p>You can learn more and opt out at any time by following the instructions in <a href="https://docs.magento.com/m2/ce/user_guide/stores/admin.html" target="_blank" tabindex="0">merchant documentation</a>.</p> -]]></item> + <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage">merchant documentation</a>.</p>]]></item> </item> </argument> </container>
app/code/Magento/AdminNotification/composer.json+13 −11 modified@@ -1,24 +1,25 @@ { "name": "magento/module-admin-notification", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-config": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/AdvancedPricingImportExport/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-advanced-pricing-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/AdvancedSearch/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-advanced-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-search": "*", - "magento/module-store": "*", + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-search": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-search": "101.0.*", + "magento/module-store": "101.0.*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Amqp/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-amqp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-message-queue": "*", + "magento/framework": "102.0.*", + "magento/framework-amqp": "100.3.*", + "magento/framework-message-queue": "100.3.*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/AmqpStore/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-amqp-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.2", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/module-store": "*", + "magento/framework": "102.0.*", + "magento/framework-amqp": "100.3.*", + "magento/module-store": "101.0.*", "php": "~7.3.0||~7.4.0" }, "suggest": { - "magento/module-asynchronous-operations": "*", - "magento/framework-message-queue": "*" + "magento/module-asynchronous-operations": "100.3.*", + "magento/framework-message-queue": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Analytics/composer.json+10 −8 modified@@ -1,19 +1,20 @@ { "name": "magento/module-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.7", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-integration": "100.3.*", + "magento/module-store": "101.0.*", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AsynchronousOperations/composer.json+13 −11 modified@@ -1,26 +1,27 @@ { "name": "magento/module-asynchronous-operations", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", + "magento/framework": "102.0.*", + "magento/framework-bulk": "100.3.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-ui": "101.1.*", "php": "~7.3.0||~7.4.0" }, "suggest": { - "magento/module-admin-notification": "*", + "magento/module-admin-notification": "100.3.*", "magento/module-logging": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/Authorization/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-authorization", "description": "Authorization module provides access to Magento ACL functionality.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AuthorizenetAcceptjs/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-authorizenet-acceptjs", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-config": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-store": "*", - "magento/module-quote": "*" + "magento/framework": "102.0.*", + "magento/module-payment": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-config": "101.1.*", + "magento/module-backend": "101.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-quote": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/AuthorizenetCardinal/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-authorizenet-cardinal", "description": "Provides a possibility to enable 3-D Secure 2.0 support for Authorize.Net Acceptjs.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-authorizenet-acceptjs": "*", - "magento/framework": "*", - "magento/module-cardinal-commerce": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-store": "*" + "magento/module-authorizenet-acceptjs": "100.3.*", + "magento/framework": "102.0.*", + "magento/module-cardinal-commerce": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-checkout": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Authorizenet/composer.json+16 −14 modified@@ -1,28 +1,29 @@ { "name": "magento/module-authorizenet", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/AuthorizenetGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-authorizenet-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-quote-graph-ql": "*" + "magento/framework": "102.0.*", + "magento/module-quote-graph-ql": "100.3.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Backend/composer.json+26 −24 modified@@ -1,37 +1,38 @@ { "name": "magento/module-backend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7", "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backup": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-developer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-sales": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-backup": "100.3.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-developer": "100.3.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-reports": "100.3.*", + "magento/module-require-js": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-security": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-translation": "100.3.*", + "magento/module-ui": "101.1.*", + "magento/module-user": "101.1.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/Backup/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-backup", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-cron": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Backup/Model/Fs/Collection.php+10 −3 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Backup\Model\Fs; use Magento\Framework\App\Filesystem\DirectoryList; @@ -45,6 +47,7 @@ class Collection extends \Magento\Framework\Data\Collection\Filesystem * @param \Magento\Backup\Helper\Data $backupData * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Backup\Model\Backup $backup + * @throws \Magento\Framework\Exception\FileSystemException */ public function __construct( \Magento\Framework\Data\Collection\EntityFactory $entityFactory, @@ -55,7 +58,6 @@ public function __construct( $this->_backupData = $backupData; parent::__construct($entityFactory); - $this->_filesystem = $filesystem; $this->_backup = $backup; $this->_varDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); @@ -87,12 +89,17 @@ public function __construct( * Create .htaccess file and deny backups directory access from web * * @return void + * @throws \Magento\Framework\Exception\FileSystemException */ protected function _hideBackupsForApache() { $filename = '.htaccess'; - if (!$this->_varDirectory->isFile($filename)) { - $this->_varDirectory->writeFile($filename, 'deny from all'); + $driver = $this->_varDirectory->getDriver(); + $absolutePath = $driver->getAbsolutePath($this->_varDirectory->getAbsolutePath(), $filename); + if (!$driver->isFile($absolutePath)) { + $resource = $driver->fileOpen($absolutePath, 'w+'); + $driver->fileWrite($resource, 'deny from all'); + $driver->fileClose($resource); } }
app/code/Magento/Backup/Test/Unit/Model/Fs/CollectionTest.php+7 −2 modified@@ -22,9 +22,14 @@ public function testConstructor() \Magento\Backup\Helper\Data::class )->disableOriginalConstructor()->getMock(); $backupData->expects($this->any())->method('getExtensions')->willReturn([]); - + $driver = $this->getMockBuilder( + \Magento\Framework\Filesystem\DriverInterface::class + )->disableOriginalConstructor() + ->getMock(); $directoryWrite->expects($this->any())->method('create')->with('backups'); - $directoryWrite->expects($this->any())->method('getAbsolutePath')->with('backups'); + $directoryWrite->expects($this->any())->method('getAbsolutePath')->willReturn(''); + $directoryWrite->expects($this->at(3))->method('getAbsolutePath')->with('backups'); + $directoryWrite->expects($this->any())->method('getDriver')->willReturn($driver); $classObject = $helper->getObject( \Magento\Backup\Model\Fs\Collection::class,
app/code/Magento/Braintree/composer.json+24 −22 modified@@ -1,38 +1,39 @@ { "name": "magento/module-braintree", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", "braintree/braintree_php": "3.35.0", - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-instant-purchase": "*", - "magento/module-payment": "*", - "magento/module-paypal": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-ui": "*", - "magento/module-vault": "*", - "magento/module-multishipping": "*", - "magento/module-theme": "*" + "magento/module-catalog": "103.0.*", + "magento/module-backend": "101.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-instant-purchase": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-paypal": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-ui": "101.1.*", + "magento/module-vault": "101.1.*", + "magento/module-multishipping": "100.3.*", + "magento/module-theme": "101.0.*" }, "suggest": { - "magento/module-checkout-agreements": "*" + "magento/module-checkout-agreements": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/Braintree/etc/csp_whitelist.xml+12 −0 modified@@ -21,5 +21,17 @@ <value id="paypal_analytics" type="host">t.paypal.com</value> </values> </policy> + <policy id="connect-src"> + <values> + <value id="payments_sandbox_braintree_api_com" type="host">payments.sandbox.braintree-api.com</value> + <value id="origin_analytics_sand_sandbox_braintree_api_com" type="host">origin-analytics-sand.sandbox.braintree-api.com</value> + <value id="assets_braintreegateway_com" type="host">assets.braintreegateway.com</value> + </values> + </policy> + <policy id="frame-src"> + <values> + <value id="assets_braintreegateway_com" type="host">assets.braintreegateway.com</value> + </values> + </policy> </policies> </csp_whitelist>
app/code/Magento/BraintreeGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-braintree-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-braintree": "*", - "magento/module-store": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*" + "magento/framework": "102.0.*", + "magento/module-braintree": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-quote": "101.1.*", + "magento/module-quote-graph-ql": "100.3.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Bundle/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-bundle", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-catalog-rule": "101.1.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-gift-message": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-webapi": "*", - "magento/module-bundle-sample-data": "*", - "magento/module-sales-rule": "*" + "magento/module-webapi": "100.3.*", + "magento/module-bundle-sample-data": "Sample Data version: 100.3.*", + "magento/module-sales-rule": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/BundleGraphQl/composer.json+12 −10 modified@@ -2,20 +2,21 @@ "name": "magento/module-bundle-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-catalog": "103.0.*", + "magento/module-bundle": "100.3.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-quote-graph-ql": "100.3.*", + "magento/module-store": "101.0.*", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/BundleImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-bundle-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-bundle": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*" + "magento/framework": "102.0.*", + "magento/module-bundle": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml+2 −0 modified@@ -23,6 +23,8 @@ <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> <click selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="clickCustomizeAndAddToCart"/> <waitForPageLoad time="30" stepKey="waitForPageLoad2"/> + <doubleClick selector="{{StorefrontBundleProductActionSection.quantityField}}" stepKey="doubleClickOnQtyInput"/> + <pressKey selector="{{StorefrontBundleProductActionSection.quantityField}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::DELETE]" stepKey="clearQty"/> <fillField selector="{{StorefrontBundleProductActionSection.quantityField}}" userInput="{{quantity}}" stepKey="fillBundleProductQuantity"/> <click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickAddBundleProductToCart"/> <waitForPageLoad time="30" stepKey="waitForPageLoad3"/>
app/code/Magento/CacheInvalidate/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-cache-invalidate", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-page-cache": "*" + "magento/framework": "102.0.*", + "magento/module-page-cache": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Captcha/composer.json+13 −11 modified@@ -1,26 +1,27 @@ { "name": "magento/module-captcha", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-authorization": "*", + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-authorization": "100.3.*", "laminas/laminas-captcha": "^2.7.1", "laminas/laminas-db": "^2.8.2", "laminas/laminas-session": "^2.7.3" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/CardinalCommerce/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cardinal-commerce", "description": "Provides a possibility to enable 3-D Secure 2.0 support for payment methods.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CatalogAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-catalog-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-analytics": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/CatalogCmsGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-catalog-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-cms-graph-ql": "100.3.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-graph-ql": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Catalog/composer.json+36 −34 modified@@ -1,48 +1,49 @@ { "name": "magento/module-catalog", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-checkout": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-indexer": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-product-alert": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-asynchronous-operations": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-catalog-rule": "101.1.*", + "magento/module-catalog-url-rewrite": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-indexer": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-msrp": "100.3.*", + "magento/module-page-cache": "100.3.*", + "magento/module-product-alert": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-url-rewrite": "101.1.*", + "magento/module-widget": "101.1.*", + "magento/module-wishlist": "101.1.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-catalog-sample-data": "*" + "magento/module-cookie": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-catalog-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -52,3 +53,4 @@ } } } +
app/code/Magento/CatalogCustomerGraphQl/composer.json+10 −8 modified@@ -2,18 +2,19 @@ "name": "magento/module-catalog-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-store": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/module-store": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Catalog/etc/config.xml+3 −0 modified@@ -64,6 +64,9 @@ <tmp_images_folder>tmp</tmp_images_folder> <catalog_product_images>media/catalog/product/cache/</catalog_product_images> <catalog_images_folder>catalog</catalog_images_folder> + <media_gallery_image_folders> + <category_image_folder>catalog/category</category_image_folder> + </media_gallery_image_folders> <product_custom_options_fodler>custom_options</product_custom_options_fodler> </allowed_resources> </media_storage_configuration>
app/code/Magento/CatalogGraphQl/composer.json+17 −15 modified@@ -2,26 +2,27 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-eav": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-catalog-search": "*", - "magento/framework": "*" + "magento/module-eav": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-search": "101.0.*", + "magento/module-store": "101.0.*", + "magento/module-eav-graph-ql": "100.3.*", + "magento/module-catalog-search": "101.0.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.3.*", + "magento/module-graph-ql-cache": "100.3.*", + "magento/module-store-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/CatalogImportExport/composer.json+18 −16 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7", "require": { "php": "~7.3.0||~7.4.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-authorization": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-catalog-url-rewrite": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-authorization": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogInventory/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ }, "abandoned": "magento/inventory-composer-metapackage" } +
app/code/Magento/CatalogInventoryGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-inventory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php+1 −1 modified@@ -120,7 +120,7 @@ public function initialize( /** * if option's qty was updates we also need to update quote item qty */ - $quoteItem->setData('qty', (int) $qty); + $quoteItem->setData('qty', (int) $result->getItemQty()); } if ($result->getMessage() !== null) { $option->setMessage($result->getMessage());
app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php+1 −1 modified@@ -179,7 +179,7 @@ public function validate(Observer $observer) * Check item for options */ if ($options) { - $qty = $product->getTypeInstance()->prepareQuoteItemQty($qty, $product); + $qty = $product->getTypeInstance()->prepareQuoteItemQty($quoteItem->getQty(), $product); $quoteItem->setData('qty', $qty); if ($stockStatus) { $this->checkOptionsQtyIncrements($quoteItem, $options);
app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php+5 −0 modified@@ -5,6 +5,9 @@ */ namespace Magento\CatalogInventory\Test\Unit\Model\Quote\Item\QuantityValidator\Initializer; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class OptionTest extends \PHPUnit\Framework\TestCase { /** @@ -79,6 +82,7 @@ protected function setUp(): void 'setBackorders', '__wakeup', ]; + $this->optionMock = $this->createPartialMock(\Magento\Quote\Model\Quote\Item\Option::class, $optionMethods); $store = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getWebsiteId', '__wakeup']); @@ -206,6 +210,7 @@ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQt $this->optionMock->expects($this->once())->method('setBackorders')->with('backorders'); $this->stockItemMock->expects($this->once())->method('unsIsChildItem'); + $this->resultMock->expects($this->once())->method('getItemQty')->willReturn($qty); $this->validator->initialize($this->optionMock, $this->quoteItemMock, $qty); }
app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFile.php+15 −5 modified@@ -3,15 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Catalog\Model\Product\Option\Type\File; use Magento\Catalog\Model\Product; -use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Catalog\Model\Product\Exception as ProductException; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Math\Random; -use Magento\Framework\App\ObjectManager; /** * Validator class. Represents logic for validation file given from product option @@ -179,9 +180,10 @@ public function validate($processingParams, $option) $filePath = $dispersion; $tmpDirectory = $this->filesystem->getDirectoryRead(DirectoryList::SYS_TMP); + // phpcs:ignore Magento2.Security.InsecureFunction $fileHash = md5($tmpDirectory->readFile($tmpDirectory->getRelativePath($fileInfo['tmp_name']))); $fileRandomName = $this->random->getRandomString(32); - $filePath .= '/' .$fileRandomName; + $filePath .= '/' . $fileRandomName; $fileFullPath = $this->mediaDirectory->getAbsolutePath($this->quotePath . $filePath); $upload->addFilter(new \Zend_Filter_File_Rename(['target' => $fileFullPath, 'overwrite' => true])); @@ -202,8 +204,10 @@ public function validate($processingParams, $option) $_height = 0; if ($tmpDirectory->isReadable($tmpDirectory->getRelativePath($fileInfo['tmp_name']))) { + // phpcs:ignore Magento2.Functions.DiscouragedFunction if (filesize($fileInfo['tmp_name'])) { if ($this->isImageValidator->isValid($fileInfo['tmp_name'])) { + // phpcs:ignore Magento2.Functions.DiscouragedFunction $imageSize = getimagesize($fileInfo['tmp_name']); } } else { @@ -255,8 +259,12 @@ protected function initFilesystem() // Directory listing and hotlink secure $path = $this->path . '/.htaccess'; - if (!$this->mediaDirectory->isFile($path)) { - $this->mediaDirectory->writeFile($path, "Order deny,allow\nDeny from all"); + $driver = $this->mediaDirectory->getDriver(); + $absolutePath = $driver->getAbsolutePath($this->mediaDirectory->getAbsolutePath(), $path); + if (!$driver->isFile($absolutePath)) { + $resource = $driver->fileOpen($absolutePath, 'w+'); + $driver->fileWrite($resource, "Order deny,allow\nDeny from all"); + $driver->fileClose($resource); } } @@ -265,9 +273,11 @@ protected function initFilesystem() * * @return bool * @todo need correctly name + * @SuppressWarnings(PHPMD.Superglobals) */ protected function validateContentLength() { + // phpcs:disable Magento2.Security.Superglobal return isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > $this->fileSize->getMaxFileSize(); } }
app/code/Magento/Catalog/Model/Product/Option/Type/File/ValidatorInfo.php+60 −20 modified@@ -6,13 +6,22 @@ namespace Magento\Catalog\Model\Product\Option\Type\File; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\File\Size; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Io\File as IoFile; +use Magento\MediaStorage\Helper\File\Storage\Database; +use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension; + /** * Validator for existing files. */ class ValidatorInfo extends Validator { /** - * @var \Magento\MediaStorage\Helper\File\Storage\Database + * @var Database */ protected $coreFileStorageDatabase; @@ -36,24 +45,39 @@ class ValidatorInfo extends Validator */ protected $fileRelativePath; + /** + * @var IoFile + */ + private $ioFile; + /** + * @var NotProtectedExtension + */ + private $fileValidator; + /** * Construct method * - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\Filesystem $filesystem - * @param \Magento\Framework\File\Size $fileSize - * @param \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDatabase + * @param ScopeConfigInterface $scopeConfig + * @param Filesystem $filesystem + * @param Size $fileSize + * @param Database $coreFileStorageDatabase * @param ValidateFactory $validateFactory + * @param NotProtectedExtension $fileValidator + * @param IoFile $ioFile */ public function __construct( - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\Filesystem $filesystem, - \Magento\Framework\File\Size $fileSize, - \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDatabase, - \Magento\Catalog\Model\Product\Option\Type\File\ValidateFactory $validateFactory + ScopeConfigInterface $scopeConfig, + Filesystem $filesystem, + Size $fileSize, + Database $coreFileStorageDatabase, + ValidateFactory $validateFactory, + NotProtectedExtension $fileValidator, + IoFile $ioFile ) { $this->coreFileStorageDatabase = $coreFileStorageDatabase; $this->validateFactory = $validateFactory; + $this->fileValidator = $fileValidator; + $this->ioFile = $ioFile; parent::__construct($scopeConfig, $filesystem, $fileSize); } @@ -94,27 +118,42 @@ public function validate($optionValue, $option) $validatorChain = $this->validateFactory->create(); try { $validatorChain = $this->buildImageValidator($validatorChain, $option, $this->fileFullPath); - } catch (\Magento\Framework\Exception\InputException $notImage) { + } catch (InputException $notImage) { return false; } - $result = false; - if ($validatorChain->isValid($this->fileFullPath, $optionValue['title'])) { - $result = $this->rootDirectory->isReadable($this->fileRelativePath) + if ($this->validatePath($optionValue) && $validatorChain->isValid($this->fileFullPath, $optionValue['title'])) { + return $this->rootDirectory->isReadable($this->fileRelativePath) && isset($optionValue['secret_key']) && $this->buildSecretKey($this->fileRelativePath) == $optionValue['secret_key']; - } elseif ($validatorChain->getErrors()) { + } else { $errors = $this->getValidatorErrors($validatorChain->getErrors(), $optionValue, $option); - if (count($errors) > 0) { - throw new \Magento\Framework\Exception\LocalizedException(__(implode("\n", $errors))); + throw new LocalizedException(__(implode("\n", $errors))); } - } else { - throw new \Magento\Framework\Exception\LocalizedException( + throw new LocalizedException( __("The product's required option(s) weren't entered. Make sure the options are entered and try again.") ); } - return $result; + } + + /** + * Validate quote_path and order_path. + * + * @param array $optionValuePath + * @return bool + */ + private function validatePath(array $optionValuePath): bool + { + foreach ([$optionValuePath['quote_path'], $optionValuePath['order_path']] as $path) { + $pathInfo = $this->ioFile->getPathInfo($path); + if (isset($pathInfo['extension'])) { + if (!$this->fileValidator->isValid($pathInfo['extension'])) { + return false; + } + } + } + return true; } /** @@ -125,6 +164,7 @@ public function validate($optionValue, $option) */ protected function buildSecretKey($fileRelativePath) { + // phpcs:ignore Magento2.Security.InsecureFunction return substr(md5($this->rootDirectory->readFile($fileRelativePath)), 0, 20); }
app/code/Magento/CatalogRule/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-rule": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-import-export": "*", - "magento/module-catalog-rule-sample-data": "*" + "magento/module-import-export": "100.3.*", + "magento/module-catalog-rule-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogRuleConfigurable/composer.json+12 −10 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-rule-configurable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-configurable-product": "*" + "magento/module-catalog": "103.0.*", + "magento/module-catalog-rule": "101.1.*", + "magento/module-configurable-product": "100.3.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/CatalogRuleGraphQl/composer.json+22 −20 modified@@ -1,24 +1,26 @@ { - "name": "magento/module-catalog-rule-graph-ql", - "description": "N/A", - "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, - "suggest": { - "magento/module-catalog-rule": "*" - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "autoload": { - "files": [ - "registration.php" + "name": "magento/module-catalog-rule-graph-ql", + "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" ], - "psr-4": { - "Magento\\CatalogRuleGraphQl\\": "" + "version": "100.3.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*" + }, + "suggest": { + "magento/module-catalog-rule": "101.1.*" + }, + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CatalogRuleGraphQl\\": "" + } } - } } +
app/code/Magento/CatalogSearch/composer.json+20 −18 modified@@ -1,32 +1,33 @@ { "name": "magento/module-catalog-search", "description": "Catalog search", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-indexer": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-indexer": "100.3.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-search": "101.0.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } +
app/code/Magento/Catalog/Test/Mftf/ActionGroup/CustomOptionsActionGroup.xml+1 −0 modified@@ -146,6 +146,7 @@ </actionGroup> <!-- Assumes we are on product edit page --> <actionGroup name="AdminAssertProductHasNoCustomOptions"> + <reloadPage stepKey="refreshPage"/> <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="expandContentTab"/> <waitForPageLoad time="10" stepKey="waitCustomizableOptionsTabOpened"/> <dontSeeElement selector="{{AdminProductCustomizableOptionsSection.customOption}}" stepKey="assertNoCustomOptions"/>
app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml+6 −2 modified@@ -75,8 +75,12 @@ <see selector="{{ProductShortDescriptionWYSIWYGToolbarSection.CancelBtn}}" userInput="Cancel" stepKey="seeCancelBtn2" /> <waitForElementVisible selector="{{ProductDescriptionWYSIWYGToolbarSection.CreateFolder}}" stepKey="waitForCreateFolderBtn2"/> <see selector="{{ProductShortDescriptionWYSIWYGToolbarSection.CreateFolder}}" userInput="Create Folder" stepKey="seeCreateFolderBtn2" /> - <see selector="{{ProductDescriptionWYSIWYGToolbarSection.FolderContainer}}" userInput="Storage Root" stepKey="seeFolderContainer" /> - <click userInput="Storage Root" stepKey="clickOnRootFolder" /> + <comment userInput="BIC workaround" stepKey="seeFolderContainer"/> + <comment userInput="BIC workaround" stepKey="clickOnRootFolder"/> + <conditionalClick selector="{{ProductDescriptionWYSIWYGToolbarSection.StorageRootArrow}}" dependentSelector="{{ProductDescriptionWYSIWYGToolbarSection.checkIfArrowExpand}}" stepKey="clickStorageRootArrowIfClosed2" visible="true"/> + <conditionalClick selector="{{ProductDescriptionWYSIWYGToolbarSection.WysiwygArrow}}" dependentSelector="{{ProductDescriptionWYSIWYGToolbarSection.checkIfWysiwygArrowExpand}}" stepKey="clickWysiwygArrowIfClosed2" visible="true"/> + <waitForText userInput="{{ImageFolder.name}}" stepKey="waitForNewFolder2" /> + <click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder2" /> <waitForLoadingMaskToDisappear stepKey="waitForLoading15"/> <dontSeeElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertFile}}" stepKey="dontSeeAddSelectedBtn3" /> <attachFile selector="{{ProductShortDescriptionWYSIWYGToolbarSection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage3"/>
app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php+7 −8 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types = 1); namespace Magento\Catalog\Test\Unit\Model\Category\Attribute\Backend; @@ -261,6 +262,7 @@ public function testBeforeSaveTemporaryAttribute() $model->setAttribute($this->attribute); $mediaDirectoryMock = $this->getMockForAbstractClass(WriteInterface::class); + $mediaDirectoryMock->method('getAbsolutePath')->willReturn('pub/media/temp/test123.jpg'); $this->filesystem->expects($this->once()) ->method('getDirectoryWrite') ->with(DirectoryList::MEDIA) @@ -318,15 +320,12 @@ private function setUpModelForTests() $objectManagerMock->expects($this->any()) ->method('get') ->willReturnCallback( - - function ($class, $params = []) use ($imageUploaderMock) { - if ($class == "\Magento\Catalog\CategoryImageUpload") { - return $imageUploaderMock; - } - - return $this->objectManager->get($class, $params); + function ($class, $params = []) use ($imageUploaderMock) { + if ($class == "\Magento\Catalog\CategoryImageUpload") { + return $imageUploaderMock; } - + return $this->objectManager->get($class, $params); + } ); $model = $this->objectManager->getObject(
app/code/Magento/CatalogUrlRewrite/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-url-rewrite": "101.1.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogUrlRewriteGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-catalog-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/framework": "*" + "magento/module-store": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*" + "magento/module-catalog-url-rewrite": "100.3.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/module-url-rewrite-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/CatalogWidget/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-catalog-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-rule": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-widget": "101.1.*", + "magento/module-wishlist": "101.1.*", + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/CheckoutAgreements/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-checkout-agreements", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/CheckoutAgreementsGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-checkout-agreements-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-checkout-agreements": "*" + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-checkout-agreements": "100.3.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Checkout/composer.json+29 −27 modified@@ -1,41 +1,42 @@ { "name": "magento/module-checkout", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-captcha": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-security": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-captcha": "100.3.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-msrp": "100.3.*", + "magento/module-page-cache": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-sales-rule": "101.1.*", + "magento/module-security": "100.3.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-cookie": "*" + "magento/module-cookie": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } +
app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php+14 −2 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Checkout\Controller\Sidebar; use Magento\Checkout\Model\Sidebar; @@ -12,8 +14,12 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Json\Helper\Data; use Psr\Log\LoggerInterface; +use Magento\Framework\App\Action\HttpPostActionInterface; -class UpdateItemQty extends Action +/** + * Class used to update item quantity. + */ +class UpdateItemQty extends Action implements HttpPostActionInterface { /** * @var Sidebar @@ -50,12 +56,18 @@ public function __construct( } /** + * Action for Quantity update + * * @return $this */ public function execute() { $itemId = (int)$this->getRequest()->getParam('item_id'); - $itemQty = $this->getRequest()->getParam('item_qty') * 1; + $itemQty = (int)$this->getRequest()->getParam('item_qty'); + + if ($itemQty <= 0) { + return $this->jsonResponse(__('Invalid Item Quantity Requested.')); + } try { $this->sidebar->checkQuoteItem($itemId);
app/code/Magento/Checkout/i18n/en_US.csv+2 −1 modified@@ -182,4 +182,5 @@ Payment,Payment "Items in Cart","Items in Cart" "Close","Close" "Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" -"You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>." \ No newline at end of file +"You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>." +"Invalid Item Quantity Requested.","Invalid Item Quantity Requested."
app/code/Magento/Checkout/Model/DefaultConfigProvider.php+18 −8 modified@@ -30,6 +30,7 @@ use Magento\Quote\Model\QuoteIdMaskFactory; use Magento\Store\Model\ScopeInterface; use Magento\Ui\Component\Form\Element\Multiline; +use Magento\Framework\Escaper; /** * Default Config Provider for checkout @@ -96,7 +97,7 @@ class DefaultConfigProvider implements ConfigProviderInterface private $configurationPool; /** - * @param QuoteIdMaskFactory + * @var QuoteIdMaskFactory */ protected $quoteIdMaskFactory; @@ -190,6 +191,11 @@ class DefaultConfigProvider implements ConfigProviderInterface */ private $configPostProcessor; + /** + * @var Escaper + */ + private $escaper; + /** * @param CheckoutHelper $checkoutHelper * @param Session $checkoutSession @@ -221,6 +227,7 @@ class DefaultConfigProvider implements ConfigProviderInterface * @param AddressMetadataInterface $addressMetadata * @param AttributeOptionManagementInterface $attributeOptionManager * @param CustomerAddressDataProvider|null $customerAddressData + * @param Escaper|null $escaper * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -254,7 +261,8 @@ public function __construct( CaptchaConfigPostProcessorInterface $configPostProcessor, AddressMetadataInterface $addressMetadata = null, AttributeOptionManagementInterface $attributeOptionManager = null, - CustomerAddressDataProvider $customerAddressData = null + CustomerAddressDataProvider $customerAddressData = null, + Escaper $escaper = null ) { $this->checkoutHelper = $checkoutHelper; $this->checkoutSession = $checkoutSession; @@ -288,6 +296,7 @@ public function __construct( $this->customerAddressData = $customerAddressData ?: ObjectManager::getInstance()->get(CustomerAddressDataProvider::class); $this->configPostProcessor = $configPostProcessor; + $this->escaper = $escaper ?? ObjectManager::getInstance()->get(Escaper::class); } /** @@ -340,17 +349,18 @@ public function getConfig() $output['imageData'] = $this->imageProvider->getImages($quoteId); $output['totalsData'] = $this->getTotalsData(); + + $policyContent = $this->scopeConfig->getValue( + 'shipping/shipping_policy/shipping_policy_content', + ScopeInterface::SCOPE_STORE + ); + $policyContent = $this->escaper->escapeHtml($policyContent); $output['shippingPolicy'] = [ 'isEnabled' => $this->scopeConfig->isSetFlag( 'shipping/shipping_policy/enable_shipping_policy', ScopeInterface::SCOPE_STORE ), - 'shippingPolicyContent' => nl2br( - $this->scopeConfig->getValue( - 'shipping/shipping_policy/shipping_policy_content', - ScopeInterface::SCOPE_STORE - ) - ) + 'shippingPolicyContent' => $policyContent ? nl2br($policyContent) : '' ]; $output['useQty'] = $this->scopeConfig->isSetFlag( 'checkout/cart_link/use_qty',
app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/UpdateItemQtyTest.php+37 −0 modified@@ -3,11 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Checkout\Test\Unit\Controller\Sidebar; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +/** + * Class used to execute test cases for update item quantity + */ class UpdateItemQtyTest extends \PHPUnit\Framework\TestCase { /** @var \Magento\Checkout\Controller\Sidebar\UpdateItemQty */ @@ -207,4 +212,36 @@ public function testExecuteWithException() $this->assertEquals('json represented', $this->updateItemQty->execute()); } + + /** + * @return void + */ + public function testExecuteWithInvalidItemQty(): void + { + $error = [ + 'success' => false, + 'error_message' => 'Invalid Item Quantity Requested.' + ]; + $jsonResult = json_encode($error); + $this->requestMock + ->method('getParam') + ->withConsecutive(['item_id', null], ['item_qty', null]) + ->willReturnOnConsecutiveCalls('1', '{{7+2}}'); + + $this->sidebarMock->expects($this->once()) + ->method('getResponseData') + ->with('Invalid Item Quantity Requested.') + ->willReturn($error); + + $this->jsonHelperMock->expects($this->once()) + ->method('jsonEncode') + ->with($error) + ->willReturn($jsonResult); + + $this->responseMock->expects($this->once()) + ->method('representJson') + ->willReturn($jsonResult); + + $this->assertEquals($jsonResult, $this->updateItemQty->execute()); + } }
app/code/Magento/Cms/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-cms", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-variable": "*", - "magento/module-widget": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-email": "101.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-variable": "100.3.*", + "magento/module-widget": "101.1.*" }, "suggest": { - "magento/module-cms-sample-data": "*" + "magento/module-cms-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Cms/Controller/Adminhtml/Page/PostDataProcessor.php+15 −2 modified@@ -10,6 +10,7 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\Config\Dom\ValidationException; use Magento\Framework\Config\Dom\ValidationSchemaException; +use Magento\Cms\Model\Page\CustomLayout\CustomLayoutValidator; /** * Controller helper for user input. @@ -36,23 +37,32 @@ class PostDataProcessor */ private $validationState; + /** + * @var CustomLayoutValidator + */ + private $customLayoutValidator; + /** * @param \Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\View\Model\Layout\Update\ValidatorFactory $validatorFactory - * @param DomValidationState $validationState + * @param DomValidationState|null $validationState + * @param CustomLayoutValidator|null $customLayoutValidator */ public function __construct( \Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\View\Model\Layout\Update\ValidatorFactory $validatorFactory, - DomValidationState $validationState = null + DomValidationState $validationState = null, + CustomLayoutValidator $customLayoutValidator = null ) { $this->dateFilter = $dateFilter; $this->messageManager = $messageManager; $this->validatorFactory = $validatorFactory; $this->validationState = $validationState ?: ObjectManager::getInstance()->get(DomValidationState::class); + $this->customLayoutValidator = $customLayoutValidator + ?: ObjectManager::getInstance()->get(CustomLayoutValidator::class); } /** @@ -146,6 +156,9 @@ private function validateData($data, $layoutXmlValidator) ) { return false; } + if (!$this->customLayoutValidator->validate($data)) { + return false; + } } catch (ValidationException $e) { return false; } catch (ValidationSchemaException $e) {
app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php+2 −3 modified@@ -61,7 +61,7 @@ public function __construct( public function execute() { $resultJson = $this->resultJsonFactory->create(); - + $result = []; if (!$this->getRequest()->isPost()) { $result = ['error' => true, 'message' => __('Wrong request.')]; /** @var \Magento\Framework\Controller\Result\Json $resultJson */ @@ -94,8 +94,7 @@ public function execute() // phpcs:ignore Magento2.Exceptions.ThrowCatch } catch (\Exception $e) { $result = ['error' => true, 'message' => $e->getMessage()]; - - return $resultJson->setData($result); } + return $resultJson->setData($result); } }
app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php+5 −6 modified@@ -66,17 +66,16 @@ public function __construct( */ public function execute() { + $result = []; try { $path = $this->getStorage()->getCmsWysiwygImages()->getCurrentPath(); $this->getStorage()->deleteDirectory($path); - - return $this->resultRawFactory->create(); } catch (\Exception $e) { $result = ['error' => true, 'message' => $e->getMessage()]; - /** @var Json $resultJson */ - $resultJson = $this->resultJsonFactory->create(); - - return $resultJson->setData($result); } + /** @var Json $resultJson */ + $resultJson = $this->resultJsonFactory->create(); + + return $resultJson->setData($result); } }
app/code/Magento/Cms/etc/config.xml+3 −1 modified@@ -30,7 +30,9 @@ <system> <media_storage_configuration> <allowed_resources> - <wysiwyg_image_folder>wysiwyg</wysiwyg_image_folder> + <media_gallery_image_folders> + <wysiwyg_image_folder>wysiwyg</wysiwyg_image_folder> + </media_gallery_image_folders> </allowed_resources> </media_storage_configuration> </system>
app/code/Magento/CmsGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-widget": "*" + "magento/framework": "102.0.*", + "magento/module-cms": "103.0.*", + "magento/module-widget": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.3.*", + "magento/module-graph-ql-cache": "100.3.*", + "magento/module-store-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cms/i18n/en_US.csv+4 −1 modified@@ -78,7 +78,7 @@ Pages,Pages "Please rename the folder using only letters, numbers, underscores and dashes.","Please rename the folder using only letters, numbers, underscores and dashes." "We found a directory with the same name. Please try another folder name.","We found a directory with the same name. Please try another folder name." "We cannot create a new directory.","We cannot create a new directory." -"We cannot delete directory %1.","We cannot delete directory %1." +"We cannot delete the selected directory.","We cannot delete the selected directory." "We can't upload the file right now.","We can't upload the file right now." "We can't delete root directory %1 right now.","We can't delete root directory %1 right now." "Directory %1 is not under storage root path.","Directory %1 is not under storage root path." @@ -156,3 +156,6 @@ Enable,Enable "Custom Theme","Custom Theme" "Custom Layout","Custom Layout" "Edit Page Design","Edit Page Design" +"We cannot create the folder under the selected directory.","We cannot create the folder under the selected directory." +"We can't delete the file right now.", "We can't delete the file right now." +"We can't upload the file to the current folder right now. Please try another folder.","We can't upload the file to the current folder right now. Please try another folder."
app/code/Magento/Cms/Model/Page/CustomLayout/CustomLayoutValidator.php+87 −0 added@@ -0,0 +1,87 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Cms\Model\Page\CustomLayout; + +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Message\ManagerInterface; +use Magento\Cms\Model\PageRepository; + +/** + * Class for layout update validation + */ +class CustomLayoutValidator +{ + /** + * @var PageRepository + */ + private $pageRepository; + + /** + * @var ManagerInterface + */ + private $messageManager; + + /** + * CustomLayoutValidator constructor. + * @param PageRepository $pageRepository + * @param ManagerInterface $messageManager + */ + public function __construct( + PageRepository $pageRepository, + ManagerInterface $messageManager + ) { + $this->pageRepository = $pageRepository; + $this->messageManager = $messageManager; + } + + /** + * Validates layout update and custom layout update for CMS page + * + * @param array $data + * @return bool + * @throws LocalizedException + */ + public function validate(array $data) : bool + { + [$layoutUpdate, $customLayoutUpdate, $oldLayoutUpdate, $oldCustomLayoutUpdate] = $this->getLayoutUpdates($data); + if (isset($data['page_id'])) { + if ($layoutUpdate && $oldLayoutUpdate !== $layoutUpdate + || $customLayoutUpdate && $oldCustomLayoutUpdate !== $customLayoutUpdate + ) { + throw new LocalizedException(__('Custom layout update text cannot be changed, only removed')); + } + } else { + if ($layoutUpdate || $customLayoutUpdate) { + throw new LocalizedException(__('Custom layout update text cannot be changed, only removed')); + } + } + return true; + } + + /** + * Gets page layout update values + * + * @param array $data + * @return array + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + private function getLayoutUpdates(array $data) : array + { + $layoutUpdate = $data['layout_update_xml'] ?? null; + $customLayoutUpdate = $data['custom_layout_update_xml'] ?? null; + $oldLayoutUpdate = null; + $oldCustomLayoutUpdate = null; + if (isset($data['page_id'])) { + $page = $this->pageRepository->getById($data['page_id']); + $oldLayoutUpdate = $page->getId() ? $page->getLayoutUpdateXml() : null; + $oldCustomLayoutUpdate = $page->getId() ? $page->getCustomLayoutUpdateXml() : null; + } + + return [$layoutUpdate, $customLayoutUpdate, $oldLayoutUpdate, $oldCustomLayoutUpdate]; + } +}
app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php+169 −26 modified@@ -9,8 +9,10 @@ namespace Magento\Cms\Model\Wysiwyg\Images; use Magento\Cms\Helper\Wysiwyg\Images; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Exception\LocalizedException; /** * Wysiwyg Images model. @@ -22,6 +24,7 @@ * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * * @api * @since 100.0.2 @@ -34,6 +37,9 @@ class Storage extends \Magento\Framework\DataObject const THUMB_PLACEHOLDER_PATH_SUFFIX = 'Magento_Cms::images/placeholder_thumbnail.jpg'; + private const MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH + = 'system/media_storage_configuration/allowed_resources/media_gallery_image_folders'; + /** * Config object * @@ -152,6 +158,21 @@ class Storage extends \Magento\Framework\DataObject */ private $ioFile; + /** + * @var ScopeConfigInterface + */ + private $coreConfig; + + /** + * @var string + */ + private $allowedPathPattern; + + /** + * @var array + */ + private $allowedDirs; + /** * Construct * @@ -174,6 +195,7 @@ class Storage extends \Magento\Framework\DataObject * @param \Magento\Framework\Filesystem\DriverInterface $file * @param \Magento\Framework\Filesystem\Io\File|null $ioFile * @param \Psr\Log\LoggerInterface|null $logger + * @param ScopeConfigInterface $coreConfig * * @throws \Magento\Framework\Exception\FileSystemException * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -197,7 +219,8 @@ public function __construct( array $data = [], \Magento\Framework\Filesystem\DriverInterface $file = null, \Magento\Framework\Filesystem\Io\File $ioFile = null, - \Psr\Log\LoggerInterface $logger = null + \Psr\Log\LoggerInterface $logger = null, + ScopeConfigInterface $coreConfig = null ) { $this->_session = $session; $this->_backendUrl = $backendUrl; @@ -217,7 +240,31 @@ public function __construct( $this->_dirs = $dirs; $this->file = $file ?: ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Driver\File::class); $this->ioFile = $ioFile ?: ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class); + $this->coreConfig = $coreConfig ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class); parent::__construct($data); + $this->initStorage(); + } + + /** + * Initialize storage by creating wysiwyg image folders + * + * @return void + */ + private function initStorage(): void + { + $imageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + foreach ($imageFolders as $folder) { + try { + $this->_directory->create($folder); + } catch (LocalizedException $e) { + $this->logger->error( + sprintf("Creating media gallery image folder %s caused error: %s", $folder, $e->getMessage()) + ); + } + } } /** @@ -245,6 +292,7 @@ protected function createSubDirectories($path) * Prepare and get conditions for exclude directories * * @return array + * @deprecated */ protected function getConditionsForExcludeDirs() { @@ -272,6 +320,7 @@ protected function getConditionsForExcludeDirs() * @param \Magento\Framework\Data\Collection\Filesystem $collection * @param array $conditions * @return \Magento\Framework\Data\Collection\Filesystem + * @deprecated */ protected function removeItemFromCollection($collection, $conditions) { @@ -309,9 +358,11 @@ public function getDirsCollection($path) ->setCollectRecursively(false) ->setOrder('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC); - $conditions = $this->getConditionsForExcludeDirs(); + if (!$this->isDirectoryAllowed($path)) { + $collection->setDirsFilter($this->getAllowedDirMask($path)); + } - return $this->removeItemFromCollection($collection, $conditions); + return $collection; } /** @@ -372,6 +423,7 @@ public function getFilesCollection($path, $type = null) } try { + // phpcs:ignore Magento2.Functions.DiscouragedFunction $size = getimagesize($item->getFilename()); if (is_array($size)) { @@ -428,12 +480,18 @@ public function createDirectory($name, $path) ); } - $relativePath = $this->_directory->getRelativePath($path); + if (!($this->isDirectoryAllowed(rtrim($path, '/') . '/' . $name))) { + throw new \Magento\Framework\Exception\LocalizedException( + __('We cannot create the folder under the selected directory.') + ); + } + + $relativePath = (string)$this->_directory->getRelativePath($path); if (!$this->_directory->isDirectory($relativePath) || !$this->_directory->isWritable($relativePath)) { $path = $this->_cmsWysiwygImages->getStorageRoot(); } - $newPath = $path . '/' . $name; + $newPath = rtrim($path, '/') . '/' . $name; $relativeNewPath = $this->_directory->getRelativePath($newPath); if ($this->_directory->isDirectory($relativeNewPath)) { throw new \Magento\Framework\Exception\LocalizedException( @@ -469,14 +527,16 @@ public function createDirectory($name, $path) */ public function deleteDirectory($path) { - if ($this->_coreFileStorageDb->checkDbUsage()) { - $this->_directoryDatabaseFactory->create()->deleteDirectory($path); - } - if (!$this->isPathAllowed($path, $this->getConditionsForExcludeDirs())) { + if (!$this->isDirectoryAllowed($this->file->getParentDirectory($path))) { throw new \Magento\Framework\Exception\LocalizedException( - __('We cannot delete directory %1.', $this->_getRelativePathToRoot($path)) + __('We cannot delete the selected directory.') ); } + + if ($this->_coreFileStorageDb->checkDbUsage()) { + $this->_directoryDatabaseFactory->create()->deleteDirectory($path); + } + try { $this->_deleteByPath($path); $path = $this->getThumbnailRoot() . $this->_getRelativePathToRoot($path); @@ -516,6 +576,11 @@ protected function _deleteByPath($path) */ public function deleteFile($target) { + if (!$this->isDirectoryAllowed($this->file->getParentDirectory($target))) { + throw new \Magento\Framework\Exception\LocalizedException( + __('We can\'t delete the file right now.') + ); + } $relativePath = $this->_directory->getRelativePath($target); if ($this->_directory->isFile($relativePath)) { $this->_directory->delete($relativePath); @@ -549,9 +614,9 @@ public function uploadFile($targetPath, $type = null) $targetPath = $targetPath . DIRECTORY_SEPARATOR; } - if (!$this->isPathAllowed($targetPath, $this->getConditionsForExcludeDirs()) || strlen($targetPath) > 255) { + if (!($this->isDirectoryAllowed($targetPath))) { throw new \Magento\Framework\Exception\LocalizedException( - __('We can\'t upload the file to current folder right now. Please try another folder.') + __('We can\'t upload the file to the current folder right now. Please try another folder.') ); } @@ -573,7 +638,7 @@ public function uploadFile($targetPath, $type = null) } // create thumbnail - $this->resizeFile($targetPath . '/' . $uploader->getUploadedFileName(), true); + $this->resizeFile(rtrim($targetPath, '/') . '/' . ltrim($uploader->getUploadedFileName(), '/'), true); return $result; } @@ -734,7 +799,7 @@ public function getAllowedExtensions($type = null) */ public function getThumbnailRoot() { - return $this->_cmsWysiwygImages->getStorageRoot() . '/' . self::THUMBS_DIRECTORY_NAME; + return rtrim($this->_cmsWysiwygImages->getStorageRoot(), '/') . '/' . self::THUMBS_DIRECTORY_NAME; } /** @@ -875,27 +940,105 @@ private function getExtensionsList($type = null): array } /** - * Check if path is not in excluded dirs. + * Check if directory is allowed * - * @param string $path Absolute path - * @param array $conditions Exclude conditions + * @param string $directoryPath Absolute path to a directory * @return bool */ - private function isPathAllowed($path, array $conditions): bool + private function isDirectoryAllowed($directoryPath): bool { - $isAllowed = true; - $regExp = $conditions['reg_exp'] ? '~' . implode('|', array_keys($conditions['reg_exp'])) . '~i' : null; $storageRoot = $this->_cmsWysiwygImages->getStorageRoot(); $storageRootLength = strlen($storageRoot); + $mediaSubPathname = substr($directoryPath, $storageRootLength); + if (!$mediaSubPathname) { + return false; + } + $mediaSubPathname = ltrim($mediaSubPathname, '/'); + return preg_match($this->getAllowedPathPattern(), $mediaSubPathname) == 1; + } - $mediaSubPathname = substr($path, $storageRootLength); - $rootChildParts = explode('/', '/' . ltrim($mediaSubPathname, '/')); + /** + * Get allowed path pattern + * + * @return string + */ + private function getAllowedPathPattern() + { + if (null === $this->allowedPathPattern) { + $mediaGalleryImageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + $regExp = '/^('; + $or = ''; + foreach ($mediaGalleryImageFolders as $folder) { + $folderPattern = str_replace('/', '[\/]+', $folder); + $regExp .= $or . $folderPattern . '\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$'; + $or = '|'; + } + $regExp .= ')/'; + $this->allowedPathPattern = $regExp; + } + return $this->allowedPathPattern; + } + + /** + * Get allowed media gallery image folders + * + * Example: + * [ + * [0 => 'wysiwyg'], + * [0 => 'catalog', 1 => 'category'] + * ]; + * + * @return array + */ + private function getAllowedDirs(): array + { + if (null == $this->allowedDirs) { + $imageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + + $this->allowedDirs = []; + foreach ($imageFolders as $folder) { + $this->allowedDirs[] = explode('/', $folder); + } + } + return $this->allowedDirs; + } - if (array_key_exists($rootChildParts[1], $conditions['plain']) - || ($regExp && preg_match($regExp, $path))) { - $isAllowed = false; + /** + * Get allowed dir mask. + * + * @param string $path + * @return string + */ + private function getAllowedDirMask(string $path) + { + $allowedDirs = $this->getAllowedDirs(); + // subfolder level under storage root + $subfolderLevel = 1; + $storageRoot = $this->_cmsWysiwygImages->getStorageRoot(); + $storageRootLength = strlen($storageRoot); + $mediaSubPathname = substr($path, $storageRootLength); + // Filter out the irrelevant allowed dirs for the path from the $allowedDirs array + if ($mediaSubPathname) { + $pathSegments = explode('/', trim($mediaSubPathname, '/')); + foreach ($pathSegments as $index => $pathSegment) { + // Find indexes of the relevant allowed dirs based on the path segment + $subDirKeys = array_keys(array_column($allowedDirs, $index), $pathSegment); + $dirs = []; + // Rebuild the allowed dirs based on the found indexes + foreach ($subDirKeys as $subDirKey) { + $dirs[] = $allowedDirs[$subDirKey]; + } + $allowedDirs = $dirs; + $subfolderLevel++; + } } - return $isAllowed; + return '/^(' . implode('|', array_unique(array_column($allowedDirs, $subfolderLevel - 1))) . ')$/'; } }
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminExpandMediaGalleryFolderActionGroup.xml+22 −0 added@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminExpandMediaGalleryFolderActionGroup"> + <annotations> + <description>Expands the provided Folder Name in the Media Gallery.</description> + </annotations> + <arguments> + <argument name="FolderName" type="string"/> + </arguments> + <conditionalClick selector="{{MediaGallerySection.mediaGalleryFolderTreeIconCollapsed(FolderName)}}" dependentSelector="{{MediaGallerySection.mediaGalleryFolderTreeIconCollapsed(FolderName)}}" visible="true" stepKey="clickFolderIfCollapsed"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <waitForElement selector="{{MediaGallerySection.mediaGalleryFolderTreeIconExpanded(FolderName)}}" stepKey="waitForExpandedFolder"/> + </actionGroup> +</actionGroups>
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminMediaGalleryClickOkButtonTinyMceActionGroup.xml+20 −0 added@@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminMediaGalleryClickOkButtonTinyMceActionGroup"> + <annotations> + <description>Click ok button on upload image tinyMce popup.</description> + </annotations> + + <waitForElementVisible selector="{{MediaGallerySection.OkBtn}}" stepKey="waitForOkBtn"/> + <click selector="{{MediaGallerySection.OkBtn}}" stepKey="clickOkBtn"/> + <waitForPageLoad stepKey="wait"/> + </actionGroup> +</actionGroups>
app/code/Magento/Cms/Test/Mftf/ActionGroup/ClickInsertEditImageTinyMCEButtonActionGroup.xml+19 −0 added@@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ClickInsertEditImageTinyMCEButtonActionGroup"> + <annotations> + <description>Clicks on the 'Insert/edit image' TinyMCE button.</description> + </annotations> + + <click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageBtn" /> + <waitForPageLoad stepKey="waitForPageLoad"/> + </actionGroup> +</actionGroups>
app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteFolderActionGroup.xml+27 −0 added@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="DeleteFolderActionGroup"> + <annotations> + <description>Deletes the provided folder by name from the Media Gallery.</description> + </annotations> + <arguments> + <argument name="ImageFolder" defaultValue="ImageFolder"/> + </arguments> + + <click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder"/> + <waitForPageLoad stepKey="waitForLoading"/> + <waitForText selector="{{MediaGallerySection.DeleteFolder}}" userInput="Delete Folder" stepKey="seeDeleteFolderBtn"/> + <click selector="{{MediaGallerySection.DeleteFolder}}" stepKey="clickDeleteFolderBtn"/> + <waitForText userInput="OK" stepKey="waitForConfirm"/> + <click selector="{{MediaGallerySection.confirmDelete}}" stepKey="confirmDelete"/> + <waitForPageLoad stepKey="waitForPopUpHide"/> + <dontSeeElement selector="{{ImageFolder.name}}" stepKey="dontSeeFolderName"/> + </actionGroup> +</actionGroups>
app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection.xml+3 −0 modified@@ -53,6 +53,7 @@ <element name="InsertFile" type="text" selector="#insert_files"/> <element name="CreateFolder" type="button" selector="#new_folder" /> <element name="DeleteSelectedBtn" type="text" selector="#delete_files"/> + <element name="DeleteFolder" type="button" selector="#delete_folder"/> <element name="CancelBtn" type="button" selector="#cancel" /> <element name="FolderName" type="button" selector="input[data-role='promptField']" /> <element name="AcceptFolderName" type="button" selector=".action-primary.action-accept" /> @@ -62,6 +63,8 @@ <element name="checkIfWysiwygArrowExpand" type="button" selector="//li[@id='d3lzaXd5Zw--' and contains(@class,'jstree-closed')]" /> <element name="confirmDelete" type="button" selector=".action-primary.action-accept" /> <element name="imageBlockByName" type="block" selector="//div[@data-row='file'][contains(., '{{imageName}}')]" parameterized="true"/> + <element name="mediaGalleryFolderTreeIconCollapsed" type="button" parameterized="true" selector="//a[text()='{{folderName}}']/parent::li[contains(@class,'jstree-closed')]/ins"/> + <element name="mediaGalleryFolderTreeIconExpanded" type="button" parameterized="true" selector="//a[text()='{{folderName}}']/parent::li[contains(@class,'jstree-open')]/ins"/> </section> <section name="VariableSection"> <element name="InsertWidget" type="button" selector="#insert_variable"/>
app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml+43 −4 modified@@ -33,16 +33,41 @@ <comment userInput="Disable WYSIWYG options" stepKey="commentDisableWYSIWYG"/> <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> <deleteData createDataKey="createBlock" stepKey="deleteBlock" /> + <!-- Delete Uploaded Images --> + <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> <actionGroup ref="logout" stepKey="logout"/> </after> <!--Open created block page and add image--> <comment userInput="Open create block page and add image" stepKey="commentOpenBlockPage"/> <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1"> <argument name="CMSBlockPage" value="$$createBlock$$"/> </actionGroup> - <actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImage"> - <argument name="image" value="TestImageNew"/> + <comment userInput="BIC workaround" stepKey="addImage"/> + <actionGroup ref="ClickInsertEditImageTinyMCEButtonActionGroup" stepKey="clickInsertImage"/> + <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="CreateImageFolderActionGroup" stepKey="createImageFolder"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage"> + <argument name="Image" value="ImageUpload3"/> + </actionGroup> + <actionGroup ref="SaveImageActionGroup" stepKey="insertImage"/> + <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMceActionGroup" stepKey="clickOk"/> <click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnFirstTime"/> <click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnSecondTime"/> <waitForPageLoad stepKey="waitForPageLoad"/> @@ -53,9 +78,23 @@ <switchToIFrame stepKey="switchBack"/> <!--Add image second time and assert--> <comment userInput="Add image second time and assert" stepKey="commentAddImageAndAssert"/> - <actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImageSecondTime"> - <argument name="image" value="MagentoLogo"/> + <comment userInput="BIC workaround" stepKey="addImageSecondTime"/> + <actionGroup ref="ClickInsertEditImageTinyMCEButtonActionGroup" stepKey="clickInsertImage2"/> + <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="openMediaGallery2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder2"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder2"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToTestFolder2"> + <argument name="FolderName" value="{{ImageFolder.name}}"/> + </actionGroup> + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage2"> + <argument name="Image" value="ImageUpload3"/> </actionGroup> + <actionGroup ref="SaveImageActionGroup" stepKey="insertImage2"/> + <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMceActionGroup" stepKey="clickOk2"/> <switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrameSecondTime"/> <seeElement selector="{{BlockContentSection.image}}" stepKey="seeImageElement"/> </test>
app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php+100 −115 modified@@ -6,8 +6,10 @@ namespace Magento\Cms\Test\Unit\Model\Wysiwyg\Images; use Magento\Cms\Model\Wysiwyg\Images\Storage\Collection as StorageCollection; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\DataObject; +use Magento\Framework\Exception\LocalizedException; /** * @SuppressWarnings(PHPMD.LongVariable) @@ -26,92 +28,92 @@ class StorageTest extends \PHPUnit\Framework\TestCase /** * @var \Magento\Cms\Model\Wysiwyg\Images\Storage */ - protected $imagesStorage; + private $imagesStorage; /** * @var \PHPUnit\Framework\MockObject\MockObject */ - protected $filesystemMock; + private $filesystemMock; /** * @var \PHPUnit\Framework\MockObject\MockObject */ - protected $adapterFactoryMock; + private $adapterFactoryMock; /** * @var \PHPUnit\Framework\MockObject\MockObject */ - protected $imageHelperMock; + private $imageHelperMock; /** * @var array() */ - protected $resizeParameters; + private $resizeParameters; /** * @var \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $storageCollectionFactoryMock; + private $storageCollectionFactoryMock; /** * @var \Magento\MediaStorage\Model\File\Storage\FileFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $storageFileFactoryMock; + private $storageFileFactoryMock; /** * @var \Magento\MediaStorage\Model\File\Storage\DatabaseFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $storageDatabaseFactoryMock; + private $storageDatabaseFactoryMock; /** * @var \Magento\MediaStorage\Model\File\Storage\Directory\DatabaseFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $directoryDatabaseFactoryMock; + private $directoryDatabaseFactoryMock; /** * @var \Magento\MediaStorage\Model\File\Storage\Directory\Database|\PHPUnit\Framework\MockObject\MockObject */ - protected $directoryCollectionMock; + private $directoryCollectionMock; /** * @var \Magento\MediaStorage\Model\File\UploaderFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $uploaderFactoryMock; + private $uploaderFactoryMock; /** * @var \Magento\Backend\Model\Session|\PHPUnit\Framework\MockObject\MockObject */ - protected $sessionMock; + private $sessionMock; /** * @var \Magento\Backend\Model\Url|\PHPUnit\Framework\MockObject\MockObject */ - protected $backendUrlMock; + private $backendUrlMock; /** * @var \Magento\Framework\Filesystem\Directory\Write|\PHPUnit\Framework\MockObject\MockObject */ - protected $directoryMock; + private $directoryMock; /** * @var \Magento\Framework\Filesystem\DriverInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $driverMock; + private $driverMock; /** * @var \Magento\MediaStorage\Helper\File\Storage\Database|\PHPUnit\Framework\MockObject\MockObject */ - protected $coreFileStorageMock; + private $coreFileStorageMock; /** * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager|\PHPUnit\Framework\MockObject\MockObject */ - protected $objectManagerHelper; + private $objectManagerHelper; /** * @var \Magento\Framework\Filesystem\Io\File|\PHPUnit\Framework\MockObject\MockObject */ - protected $ioFileMock; + private $ioFileMock; /** * @var \Magento\Framework\Filesystem\Driver\File|\PHPUnit\Framework\MockObject\MockObject @@ -125,6 +127,11 @@ class StorageTest extends \PHPUnit\Framework\TestCase 'gif' => 'image/png', ]; + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface|MockObject + */ + private $coreConfigMock; + /** * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) @@ -229,6 +236,21 @@ function ($path) { 'image_allowed' => $this->allowedImageExtensions, ]; + $this->coreConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $config = [ + 'target', + 'folder1', + 'folder2/subfolder21', + 'folder2/subfolder22', + 'folder3/subfolder31/subfolder32' + ]; + $this->coreConfigMock->expects($this->any()) + ->method('getValue') + ->with('system/media_storage_configuration/allowed_resources/media_gallery_image_folders') + ->willReturn($config); + $this->imagesStorage = $this->objectManagerHelper->getObject( \Magento\Cms\Model\Wysiwyg\Images\Storage::class, [ @@ -252,7 +274,8 @@ function ($path) { ], 'data' => [], 'file' => $this->fileMock, - 'ioFile' => $this->ioFileMock + 'ioFile' => $this->ioFileMock, + 'coreConfig' => $this->coreConfigMock ] ); } @@ -278,11 +301,8 @@ public function testGetResizeHeight() */ public function testDeleteDirectoryOverRoot() { - $this->expectException(\Magento\Framework\Exception\LocalizedException::class); - $this->expectExceptionMessage('Directory /storage/some/another/dir is not under storage root path.'); - - $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->willReturnArgument(0); - $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->willReturnArgument(0); + $this->expectException('Magento\Framework\Exception\LocalizedException'); + $this->expectExceptionMessage('We cannot delete the selected directory.'); $this->imagesStorage->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT); } @@ -291,11 +311,8 @@ public function testDeleteDirectoryOverRoot() */ public function testDeleteRootDirectory() { - $this->expectException(\Magento\Framework\Exception\LocalizedException::class); - $this->expectExceptionMessage('We can\'t delete root directory /storage/root/dir right now.'); - - $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->willReturnArgument(0); - $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->willReturnArgument(0); + $this->expectException('Magento\Framework\Exception\LocalizedException'); + $this->expectExceptionMessage('We cannot delete the selected directory.'); $this->imagesStorage->deleteDirectory(self::STORAGE_ROOT_DIR); } @@ -320,7 +337,11 @@ public function testGetDirsCollectionCreateSubDirectories() ->method('create') ->with(rtrim(self::STORAGE_ROOT_DIR, '/') . '/' . $directoryName); - $this->generalTestGetDirsCollection(self::STORAGE_ROOT_DIR); + $this->generalTestGetDirsCollection( + self::STORAGE_ROOT_DIR, + 1, + '/^(target|folder1|folder2|folder3)$/' + ); } /** @@ -330,45 +351,9 @@ public function testGetDirsCollectionCreateSubDirectories() * @param array $expectedRemoveKeys * @dataProvider dirsCollectionDataProvider */ - public function testGetDirsCollection($exclude, $include, $fileNames, $expectedRemoveKeys) + public function testGetDirsCollection($path, $callNum, $dirsFilter = '') { - $this->imagesStorage = $this->objectManagerHelper->getObject( - \Magento\Cms\Model\Wysiwyg\Images\Storage::class, - [ - 'session' => $this->sessionMock, - 'backendUrl' => $this->backendUrlMock, - 'cmsWysiwygImages' => $this->imageHelperMock, - 'coreFileStorageDb' => $this->coreFileStorageMock, - 'filesystem' => $this->filesystemMock, - 'imageFactory' => $this->adapterFactoryMock, - 'assetRepo' => $this->createMock(\Magento\Framework\View\Asset\Repository::class), - 'storageCollectionFactory' => $this->storageCollectionFactoryMock, - 'storageFileFactory' => $this->storageFileFactoryMock, - 'storageDatabaseFactory' => $this->storageDatabaseFactoryMock, - 'directoryDatabaseFactory' => $this->directoryDatabaseFactoryMock, - 'uploaderFactory' => $this->uploaderFactoryMock, - 'resizeParameters' => $this->resizeParameters, - 'dirs' => [ - 'exclude' => $exclude, - 'include' => $include, - ], - ] - ); - - $collection = []; - foreach ($fileNames as $filename) { - /** @var \Magento\Framework\DataObject|\PHPUnit\Framework\MockObject\MockObject $objectMock */ - $objectMock = $this->getMockBuilder(DataObject::class) - ->addMethods(['getFilename']) - ->disableOriginalConstructor() - ->getMock(); - $objectMock->expects($this->any()) - ->method('getFilename') - ->willReturn(self::STORAGE_ROOT_DIR . $filename); - $collection[] = $objectMock; - } - - $this->generalTestGetDirsCollection(self::STORAGE_ROOT_DIR, $collection, $expectedRemoveKeys); + $this->generalTestGetDirsCollection($path, $callNum, $dirsFilter); } /** @@ -378,48 +363,36 @@ public function dirsCollectionDataProvider() { return [ [ - 'exclude' => [ - ['name' => 'dress'], - ], - 'include' => [], - 'filenames' => [], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR, + 'callNum' => 1, + 'dirsFilter' => '/^(target|folder1|folder2|folder3)$/' ], [ - 'exclude' => [], - 'include' => [], - 'filenames' => [ - '/dress', - ], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR . 'target', + 'callNum' => 0, ], [ - 'exclude' => [ - ['name' => 'dress'], - ], - 'include' => [], - 'filenames' => [ - '/collection', - ], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR . 'folder1/subfolder', + 'callNum' => 0, ], [ - 'exclude' => [ - ['name' => 'gear', 'regexp' => 1], - ['name' => 'home', 'regexp' => 1], - ['name' => 'collection'], - ['name' => 'dress'], - ], - 'include' => [ - ['name' => 'home', 'regexp' => 1], - ['name' => 'collection'], - ], - 'filenames' => [ - '/dress', - '/collection', - '/gear', - ], - 'expectRemoveKeys' => [[0], [2]], + 'path' => self::STORAGE_ROOT_DIR . 'folder2', + 'callNum' => 1, + 'dirsFilter' => '/^(subfolder21|subfolder22)$/' + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'folder3/subfolder31', + 'callNum' => 1, + 'dirsFilter' => '/^(subfolder32)$/' + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'folder3/subfolder31/subfolder32', + 'callNum' => 0, + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'unknown', + 'callNum' => 1, + 'dirsFilter' => '/^()$/' ], ]; } @@ -428,10 +401,11 @@ public function dirsCollectionDataProvider() * General conditions for testGetDirsCollection tests * * @param string $path - * @param array $collectionArray - * @param array $expectedRemoveKeys + * @param int $callNum + * @param string $dirsFilter + * @throws \Exception */ - protected function generalTestGetDirsCollection($path, $collectionArray = [], $expectedRemoveKeys = []) + protected function generalTestGetDirsCollection(string $path, int $callNum, string $dirsFilter) { /** @var StorageCollection|\PHPUnit\Framework\MockObject\MockObject $storageCollectionMock */ $storageCollectionMock = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Images\Storage\Collection::class) @@ -453,12 +427,9 @@ protected function generalTestGetDirsCollection($path, $collectionArray = [], $e ->method('setOrder') ->with('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC) ->willReturnSelf(); - $storageCollectionMock->expects($this->once()) - ->method('getIterator') - ->willReturn(new \ArrayIterator($collectionArray)); - $storageCollectionInvMock = $storageCollectionMock->expects($this->exactly(count($expectedRemoveKeys))) - ->method('removeItemByKey'); - call_user_func_array([$storageCollectionInvMock, 'withConsecutive'], $expectedRemoveKeys); + $storageCollectionMock->expects($this->exactly($callNum)) + ->method('setDirsFilter') + ->with($dirsFilter); $this->storageCollectionFactoryMock->expects($this->once()) ->method('create') @@ -473,7 +444,7 @@ public function testUploadFile() $targetPath = self::STORAGE_ROOT_DIR . $path; $fileName = 'image.gif'; $realPath = $targetPath . '/' . $fileName; - $thumbnailTargetPath = self::STORAGE_ROOT_DIR . '/.thumbs' . $path; + $thumbnailTargetPath = self::STORAGE_ROOT_DIR . '.thumbs' . $path; $thumbnailDestination = $thumbnailTargetPath . '/' . $fileName; $type = 'image'; $result = [ @@ -541,7 +512,7 @@ public function testUploadFile() } /** - * + * Test upload file with excessive path */ public function testUploadFileWithExcessivePath() { @@ -554,4 +525,18 @@ public function testUploadFileWithExcessivePath() $type = 'image'; $this->imagesStorage->uploadFile($targetPath, $type); } + + /** + * Test create directory with invalid name + */ + public function testCreateDirectoryWithInvalidName() + { + $name = 'папка'; + $path = '/tmp/path'; + $this->expectException(LocalizedException::class); + $this->expectExceptionMessage( + (string)__('Please rename the folder using only letters, numbers, underscores and dashes.') + ); + $this->imagesStorage->createDirectory($name, $path); + } }
app/code/Magento/CmsUrlRewrite/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cms-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "102.0.*", + "magento/module-cms": "103.0.*", + "magento/module-store": "101.0.*", + "magento/module-url-rewrite": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CmsUrlRewriteGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-cms-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite-graph-ql": "*" + "magento/framework": "102.0.*", + "magento/module-cms": "103.0.*", + "magento/module-store": "101.0.*", + "magento/module-url-rewrite-graph-ql": "100.3.*" }, "suggest": { - "magento/module-cms-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-cms-url-rewrite": "100.3.*", + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Config/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-config", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-cron": "100.3.*", + "magento/module-deploy": "100.3.*", + "magento/module-directory": "100.3.*", + "magento/module-email": "101.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/ConfigurableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-configurable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-configurable-product": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/ConfigurableProduct/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-msrp": "*", - "magento/module-webapi": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-product-video": "*", - "magento/module-configurable-sample-data": "*", - "magento/module-product-links-sample-data": "*", - "magento/module-tax": "*" + "magento/module-msrp": "100.3.*", + "magento/module-webapi": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-sales-rule": "101.1.*", + "magento/module-product-video": "100.3.*", + "magento/module-configurable-sample-data": "Sample Data version: 100.3.*", + "magento/module-product-links-sample-data": "Sample Data version: 100.3.*", + "magento/module-tax": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/ConfigurableProduct/etc/di.xml+7 −0 modified@@ -33,6 +33,13 @@ <type name="Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend"> <plugin name="ConfigurableProduct::skipValidation" type="Magento\ConfigurableProduct\Plugin\Model\Attribute\Backend\AttributeValidation"/> </type> + <type name="Magento\ConfigurableProduct\Plugin\Model\Attribute\Backend\AttributeValidation"> + <arguments> + <argument name="unskippableAttributes" xsi:type="array"> + <item name="custom_layout_update" xsi:type="string">custom_layout_update</item> + </argument> + </arguments> + </type> <type name="Magento\Catalog\Model\Entity\Product\Attribute\Group\AttributeMapperInterface"> <plugin name="configurable_product" type="Magento\ConfigurableProduct\Model\Entity\Product\Attribute\Group\AttributeMapper\Plugin" sortOrder="50" /> </type>
app/code/Magento/ConfigurableProductGraphQl/composer.json+11 −9 modified@@ -2,19 +2,20 @@ "name": "magento/module-configurable-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-configurable-product": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.6", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-catalog": "103.0.*", + "magento/module-configurable-product": "100.3.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-quote-graph-ql": "100.3.*", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/ConfigurableProduct/Plugin/Model/Attribute/Backend/AttributeValidation.php+22 −10 modified@@ -3,13 +3,17 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\ConfigurableProduct\Plugin\Model\Attribute\Backend; +use Closure; use Magento\Catalog\Api\Data\ProductInterface; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; +use Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend; +use Magento\Framework\DataObject; /** - * Skip validate attributes used for create configurable product + * Skip validate attributes used for create configurable product. */ class AttributeValidation { @@ -19,29 +23,36 @@ class AttributeValidation private $configurableProductType; /** - * AttributeValidation constructor. + * @var array + */ + private $unskippableAttributes; + + /** * @param Configurable $configurableProductType + * @param array $unskippableAttributes */ public function __construct( - Configurable $configurableProductType + Configurable $configurableProductType, + array $unskippableAttributes = [] ) { $this->configurableProductType = $configurableProductType; + $this->unskippableAttributes = $unskippableAttributes; } /** - * @param \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend $subject + * Around plugin to skip attribute validation used for create configurable product. + * + * @param AbstractBackend $subject * @param \Closure $proceed - * @param \Magento\Framework\DataObject $entity + * @param DataObject $entity * @return bool */ - public function aroundValidate( - \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend $subject, - \Closure $proceed, - \Magento\Framework\DataObject $entity - ) { + public function aroundValidate(AbstractBackend $subject, Closure $proceed, DataObject $entity) + { $attribute = $subject->getAttribute(); if ($entity instanceof ProductInterface && $entity->getTypeId() == Configurable::TYPE_CODE + && !in_array($attribute->getAttributeCode(), $this->unskippableAttributes) && in_array( $attribute->getAttributeId(), $this->configurableProductType->getUsedProductAttributeIds($entity), @@ -50,6 +61,7 @@ public function aroundValidate( ) { return true; } + return $proceed($entity); } }
app/code/Magento/ConfigurableProductSales/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-configurable-product-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-configurable-product": "*" + "magento/module-configurable-product": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Contact/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-contact", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cookie/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cookie", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-backend": "*" + "magento/module-backend": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cron/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cron", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Csp/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-csp", "description": "CSP module enables Content Security Policies for Magento", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.1-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Csp/etc/config.xml+23 −1 modified@@ -38,6 +38,11 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <http>http</http> + <https>https</https> + <blob>blob</blob> + </schemes> </children> <connections> <policy_id>connect-src</policy_id> @@ -87,6 +92,9 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <data>data</data> + </schemes> </images> <frames> <policy_id>frame-src</policy_id> @@ -98,7 +106,7 @@ <frame-ancestors> <policy_id>frame-ancestors</policy_id> <self>1</self> - <inline>1</inline> + <inline>0</inline> <eval>0</eval> <dynamic>0</dynamic> </frame-ancestors> @@ -115,6 +123,9 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <data>data</data> + </schemes> </fonts> </storefront> <admin> @@ -138,6 +149,11 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <http>http</http> + <https>https</https> + <blob>blob</blob> + </schemes> </children> <connections> <policy_id>connect-src</policy_id> @@ -187,6 +203,9 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <data>data</data> + </schemes> </images> <frames> <policy_id>frame-src</policy_id> @@ -215,6 +234,9 @@ <inline>1</inline> <eval>0</eval> <dynamic>0</dynamic> + <schemes> + <data>data</data> + </schemes> </fonts> </admin> </policies>
app/code/Magento/Csp/etc/csp_whitelist.xml+17 −0 added@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd"> + <policies> + <policy id="img-src"> + <values> + <value id="data" type="host">data:</value> + </values> + </policy> + </policies> +</csp_whitelist>
app/code/Magento/CurrencySymbol/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-currency-symbol", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-page-cache": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-page-cache": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CustomerAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-customer-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-customer": "102.0.*", + "magento/module-analytics": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Customer/composer.json+30 −28 modified@@ -1,42 +1,43 @@ { "name": "magento/module-customer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-integration": "*", - "magento/module-media-storage": "*", - "magento/module-newsletter": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-review": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-integration": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-newsletter": "100.3.*", + "magento/module-page-cache": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-review": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-wishlist": "101.1.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-customer-sample-data": "*", - "magento/module-webapi": "*" + "magento/module-cookie": "100.3.*", + "magento/module-customer-sample-data": "Sample Data version: 100.3.*", + "magento/module-webapi": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -46,3 +47,4 @@ } } } +
app/code/Magento/Customer/Controller/Account/CreatePassword.php+26 −12 modified@@ -14,11 +14,10 @@ use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\Action\Context; use Magento\Framework\App\ObjectManager; +use Magento\Customer\Api\CustomerRepositoryInterface; /** - * Class CreatePassword - * - * @package Magento\Customer\Controller\Account + * Class to Generate a New Customer Password */ class CreatePassword extends \Magento\Customer\Controller\AbstractAccount implements HttpGetActionInterface { @@ -43,24 +42,33 @@ class CreatePassword extends \Magento\Customer\Controller\AbstractAccount implem private $confirmByToken; /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory - * @param \Magento\Customer\Api\AccountManagementInterface $accountManagement - * @param \Magento\Customer\Model\ForgotPasswordToken\ConfirmCustomerByToken $confirmByToken + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @param Context $context + * @param Session $customerSession + * @param PageFactory $resultPageFactory + * @param AccountManagementInterface $accountManagement + * @param ConfirmCustomerByToken|null $confirmByToken + * @param CustomerRepositoryInterface|null $customerRepository */ public function __construct( Context $context, Session $customerSession, PageFactory $resultPageFactory, AccountManagementInterface $accountManagement, - ConfirmCustomerByToken $confirmByToken = null + ConfirmCustomerByToken $confirmByToken = null, + CustomerRepositoryInterface $customerRepository = null ) { $this->session = $customerSession; $this->resultPageFactory = $resultPageFactory; $this->accountManagement = $accountManagement; $this->confirmByToken = $confirmByToken ?? ObjectManager::getInstance()->get(ConfirmCustomerByToken::class); + $this->customerRepository = $customerRepository + ?? ObjectManager::getInstance()->get(CustomerRepositoryInterface::class); parent::__construct($context); } @@ -73,18 +81,23 @@ public function __construct( public function execute() { $resetPasswordToken = (string)$this->getRequest()->getParam('token'); + $customerId = (int)$this->getRequest()->getParam('id'); $isDirectLink = $resetPasswordToken != ''; if (!$isDirectLink) { $resetPasswordToken = (string)$this->session->getRpToken(); + $customerId = (int)$this->session->getRpCustomerId(); } try { - $this->accountManagement->validateResetPasswordLinkToken(null, $resetPasswordToken); + $this->accountManagement->validateResetPasswordLinkToken($customerId, $resetPasswordToken); + $this->confirmByToken->resetCustomerConfirmation($customerId); - $this->confirmByToken->execute($resetPasswordToken); + $customer = $this->customerRepository->getById($customerId); + $this->accountManagement->changeResetPasswordLinkToken($customer, $resetPasswordToken); if ($isDirectLink) { $this->session->setRpToken($resetPasswordToken); + $this->session->setRpCustomerId($customerId); $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('*/*/createpassword'); @@ -94,7 +107,8 @@ public function execute() $resultPage = $this->resultPageFactory->create(); $resultPage->getLayout() ->getBlock('resetPassword') - ->setResetPasswordLinkToken($resetPasswordToken); + ->setResetPasswordLinkToken($resetPasswordToken) + ->setRpCustomerId($customerId); return $resultPage; }
app/code/Magento/Customer/Controller/Account/EditPost.php+13 −4 modified@@ -4,6 +4,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Controller\Account; @@ -191,6 +192,7 @@ public function validateForCsrf(RequestInterface $request): ?bool * Change customer email or password action * * @return Redirect + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function execute() { @@ -207,7 +209,7 @@ public function execute() try { // whether a customer enabled change email option - $this->processChangeEmailRequest($currentCustomerDataObject); + $isEmailChanged = $this->processChangeEmailRequest($currentCustomerDataObject); // whether a customer enabled change password option $isPasswordChanged = $this->changeCustomerPassword($currentCustomerDataObject->getEmail()); @@ -223,7 +225,12 @@ public function execute() ); $this->dispatchSuccessEvent($customerCandidateDataObject); $this->messageManager->addSuccessMessage(__('You saved the account information.')); - + // logout from current session if password or email changed. + if ($isPasswordChanged || $isEmailChanged) { + $this->session->logout(); + $this->session->start(); + return $resultRedirect->setPath('customer/account/login'); + } return $resultRedirect->setPath('customer/account'); } catch (InvalidEmailOrPasswordException $e) { $this->messageManager->addErrorMessage($this->escaper->escapeHtml($e->getMessage())); @@ -340,7 +347,7 @@ protected function changeCustomerPassword($email) * Process change email request * * @param CustomerInterface $currentCustomerDataObject - * @return void + * @return bool * @throws InvalidEmailOrPasswordException * @throws UserLockedException */ @@ -353,13 +360,15 @@ private function processChangeEmailRequest(CustomerInterface $currentCustomerDat $currentCustomerDataObject->getId(), $this->getRequest()->getPost('current_password') ); - $this->sessionCleaner->clearFor($currentCustomerDataObject->getId()); + $this->sessionCleaner->clearFor((int) $currentCustomerDataObject->getId()); + return true; } catch (InvalidEmailOrPasswordException $e) { throw new InvalidEmailOrPasswordException( __("The password doesn't match this account. Verify the password and try again.") ); } } + return false; } /**
app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php+9 −4 modified@@ -14,9 +14,7 @@ use Magento\Customer\Model\Customer\CredentialsValidator; /** - * Class ResetPasswordPost - * - * @package Magento\Customer\Controller\Account + * Class to Process Password Reset form and successfully redirect */ class ResetPasswordPost extends \Magento\Customer\Controller\AbstractAccount implements HttpPostActionInterface { @@ -69,8 +67,10 @@ public function execute() /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $resetPasswordToken = (string)$this->getRequest()->getQuery('token'); + $customerId = (string)$this->getRequest()->getQuery('id'); $password = (string)$this->getRequest()->getPost('password'); $passwordConfirmation = (string)$this->getRequest()->getPost('password_confirmation'); + $email = null; if ($password !== $passwordConfirmation) { $this->messageManager->addErrorMessage(__("New Password and Confirm New Password values didn't match.")); @@ -85,13 +85,18 @@ public function execute() return $resultRedirect; } + if ($customerId && $this->customerRepository->getById($customerId)) { + $email = $this->customerRepository->getById($customerId)->getEmail(); + } + try { $this->accountManagement->resetPassword( - null, + $email, $resetPasswordToken, $password ); $this->session->unsRpToken(); + $this->session->unsRpCustomerId(); $this->messageManager->addSuccessMessage(__('You updated your password.')); $resultRedirect->setPath('*/*/login');
app/code/Magento/CustomerDownloadableGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-customer-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-downloadable-graph-ql": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" + "magento/module-downloadable-graph-ql": "100.3.*", + "magento/module-graph-ql": "100.3.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Customer/etc/db_schema_whitelist.json+3 −1 modified@@ -29,7 +29,8 @@ "failures_num": true, "first_failure": true, "lock_expired": true, - "lock_expires": true + "lock_expires": true, + "session_cutoff": true }, "index": { "CUSTOMER_ENTITY_STORE_ID": true, @@ -328,6 +329,7 @@ "visitor_id": true, "customer_id": true, "session_id": true, + "created_at": true, "last_visit_at": true }, "index": {
app/code/Magento/Customer/etc/db_schema.xml+6 −1 modified@@ -50,6 +50,8 @@ <column xsi:type="timestamp" name="first_failure" on_update="false" nullable="true" comment="First Failure"/> <column xsi:type="timestamp" name="lock_expires" on_update="false" nullable="true" comment="Lock Expiration Date"/> + <column xsi:type="timestamp" name="session_cutoff" on_update="false" nullable="true" + comment="Session Cutoff Time"/> <constraint xsi:type="primary" referenceId="PRIMARY"> <column name="entity_id"/> </constraint> @@ -508,7 +510,10 @@ comment="Visitor ID"/> <column xsi:type="int" name="customer_id" padding="11" unsigned="false" nullable="true" identity="false" comment="Customer ID"/> - <column xsi:type="varchar" name="session_id" nullable="true" length="64" comment="Session ID"/> + <column xsi:type="varchar" name="session_id" nullable="true" length="1" + comment="Deprecated: Session ID value no longer used"/> + <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" + comment="Created At"/> <column xsi:type="timestamp" name="last_visit_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Last Visit Time"/> <constraint xsi:type="primary" referenceId="PRIMARY">
app/code/Magento/Customer/etc/di.xml+11 −0 modified@@ -62,13 +62,24 @@ <preference for="Magento\Customer\Model\Group\RetrieverInterface" type="Magento\Customer\Model\Group\Retriever"/> <preference for="Magento\Customer\Api\SessionCleanerInterface" type="Magento\Customer\Model\Session\SessionCleaner"/> + <virtualType name="SessionValidator" type="Magento\Framework\Session\CompositeValidator"> + <arguments> + <argument name="validators" xsi:type="array"> + <item name="validator" xsi:type="object">Magento\Framework\Session\Validator</item> + <item name="cutoff_validator" xsi:type="object"> + Magento\Customer\Model\Session\Validators\CutoffValidator + </item> + </argument> + </arguments> + </virtualType> <type name="Magento\Customer\Model\Session"> <arguments> <argument name="configShare" xsi:type="object">Magento\Customer\Model\Config\Share\Proxy</argument> <argument name="customerUrl" xsi:type="object">Magento\Customer\Model\Url\Proxy</argument> <argument name="customerResource" xsi:type="object">Magento\Customer\Model\ResourceModel\Customer\Proxy</argument> <argument name="storage" xsi:type="object">Magento\Customer\Model\Session\Storage</argument> <argument name="customerRepository" xsi:type="object">Magento\Customer\Api\CustomerRepositoryInterface\Proxy</argument> + <argument name="validator" xsi:type="object">SessionValidator</argument> </arguments> </type> <type name="Magento\Customer\Helper\Address">
app/code/Magento/CustomerGraphQl/composer.json+14 −12 modified@@ -2,22 +2,23 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-authorization": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-graph-ql": "*", - "magento/module-newsletter": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*", - "magento/module-directory": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.6", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-authorization": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-graph-ql": "100.3.*", + "magento/module-newsletter": "100.3.*", + "magento/module-integration": "100.3.*", + "magento/module-store": "101.0.*", + "magento/framework": "102.0.*", + "magento/module-directory": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CustomerImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-customer-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Customer/Model/AccountManagement.php+5 −12 modified@@ -711,8 +711,8 @@ private function handleUnknownTemplate($template) public function resetPassword($email, $resetToken, $newPassword) { if (!$email) { - $customer = $this->getByToken->execute($resetToken); - $email = $customer->getEmail(); + $params = ['fieldName' => 'email']; + throw new InputException(__('"%fieldName" is required. Enter and try again.', $params)); } else { $customer = $this->customerRepository->get($email); } @@ -1183,24 +1183,17 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) * @throws NoSuchEntityException If customer doesn't exist * @SuppressWarnings(PHPMD.LongVariable) */ - private function validateResetPasswordToken($customerId, $resetPasswordLinkToken) + private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): bool { - if ($customerId !== null && $customerId <= 0) { + if (!$customerId) { throw new InputException( __( 'Invalid value of "%value" provided for the %fieldName field.', ['value' => $customerId, 'fieldName' => 'customerId'] ) ); } - - if ($customerId === null) { - //Looking for the customer. - $customerId = $this->getByToken - ->execute($resetPasswordLinkToken) - ->getId(); - } - if (!is_string($resetPasswordLinkToken) || empty($resetPasswordLinkToken)) { + if (!$resetPasswordLinkToken) { $params = ['fieldName' => 'resetPasswordLinkToken']; throw new InputException(__('"%fieldName" is required. Enter and try again.', $params)); }
app/code/Magento/Customer/Model/Customer/Attribute/Validator/File.php+1 −1 modified@@ -37,7 +37,7 @@ public function __construct(EavConfig $eavConfig) public function validate(AttributeInterface $customAttribute): void { $attribute = $this->eavConfig->getAttribute(Customer::ENTITY, $customAttribute->getAttributeCode()); - if ($attribute->getFrontendInput() === 'file') { + if ($attribute->getFrontendInput() === 'file' && !empty($customAttribute->getValue())) { if (!preg_match( '#^/[a-zA-Z0-9_-]/[a-zA-Z0-9_-]/[a-zA-Z0-9_-]+.[a-z]{3,6}$#', $customAttribute->getValue()
app/code/Magento/Customer/Model/ForgotPasswordToken/ConfirmCustomerByToken.php+18 −0 modified@@ -45,6 +45,7 @@ public function __construct( * * @return void * @throws \Magento\Framework\Exception\LocalizedException + * @deprecated rp tokens cannot be looked up directly from db */ public function execute(string $resetPasswordToken): void { @@ -55,4 +56,21 @@ public function execute(string $resetPasswordToken): void ); } } + + /** + * Check if customer confirmation needs to be reset + * + * @param int $customerId + * @return void + */ + public function resetCustomerConfirmation(int $customerId): void + { + $customer = $this->customerRepository->getById($customerId); + + if ($customer && $customer->getConfirmation()) { + $this->customerRepository->save( + $customer->setConfirmation(null) + ); + } + } }
app/code/Magento/Customer/Model/ForgotPasswordToken/GetCustomerByToken.php+1 −0 modified@@ -17,6 +17,7 @@ /** * Get Customer By reset password token * @SuppressWarnings(PHPMD.LongVariable) + * @deprecated Rp Tokens cannot be looked up directly */ class GetCustomerByToken {
app/code/Magento/Customer/Model/Metadata/Form/File.php+15 −3 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Customer\Model\Metadata\Form; use Magento\Customer\Model\FileProcessor; @@ -14,6 +16,7 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Framework\File\UploaderFactory; use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Io\File as IoFile; /** * Processes files that are save for customer. @@ -62,6 +65,11 @@ class File extends AbstractData */ protected $fileProcessorFactory; + /** + * @var IoFile|null + */ + private $ioFile; + /** * Constructor * @@ -77,6 +85,7 @@ class File extends AbstractData * @param Filesystem $fileSystem * @param UploaderFactory $uploaderFactory * @param \Magento\Customer\Model\FileProcessorFactory|null $fileProcessorFactory + * @param IoFile|null $ioFile * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -91,7 +100,8 @@ public function __construct( \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator, Filesystem $fileSystem, UploaderFactory $uploaderFactory, - \Magento\Customer\Model\FileProcessorFactory $fileProcessorFactory = null + \Magento\Customer\Model\FileProcessorFactory $fileProcessorFactory = null, + IoFile $ioFile = null ) { parent::__construct($localeDate, $logger, $attribute, $localeResolver, $value, $entityTypeCode, $isAjax); $this->urlEncoder = $urlEncoder; @@ -101,6 +111,8 @@ public function __construct( $this->fileProcessorFactory = $fileProcessorFactory ?: ObjectManager::getInstance() ->get(\Magento\Customer\Model\FileProcessorFactory::class); $this->fileProcessor = $this->fileProcessorFactory->create(['entityTypeCode' => $this->_entityTypeCode]); + $this->ioFile = $ioFile ?: ObjectManager::getInstance() + ->get(IoFile::class); } /** @@ -176,7 +188,7 @@ protected function _validateByRules($value) { $label = $value['name']; $rules = $this->getAttribute()->getValidationRules(); - $extension = $this->fileProcessor->getStat($value['name'])['extension']; + $extension = $this->ioFile->getPathInfo($value['name'])['extension']; $fileExtensions = ArrayObjectSearch::getArrayElementByName( $rules, 'file_extensions' @@ -230,7 +242,7 @@ protected function _isUploadedFile($filename) } // This case is required for file uploader UI component - $temporaryFile = FileProcessor::TMP_DIR . '/' . $this->fileProcessor->getStat($filename)['basename']; + $temporaryFile = FileProcessor::TMP_DIR . '/' . $this->ioFile->getPathInfo($filename)['basename']; if ($this->fileProcessor->isExist($temporaryFile)) { return true; }
app/code/Magento/Customer/Model/ResourceModel/Customer.php+77 −3 modified@@ -3,14 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model\ResourceModel; use Magento\Customer\Model\AccountConfirmation; use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Framework\App\ObjectManager; -use Magento\Framework\Validator\Exception as ValidatorException; use Magento\Framework\Exception\AlreadyExistsException; +use Magento\Framework\Validator\Exception as ValidatorException; +use Magento\Framework\Encryption\EncryptorInterface; /** * Customer entity resource model @@ -53,6 +55,11 @@ class Customer extends \Magento\Eav\Model\Entity\VersionControl\AbstractEntity */ private $notificationStorage; + /** + * @var EncryptorInterface + */ + private $encryptor; + /** * Customer constructor. * @@ -65,6 +72,8 @@ class Customer extends \Magento\Eav\Model\Entity\VersionControl\AbstractEntity * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data * @param AccountConfirmation $accountConfirmation + * @param EncryptorInterface|null $encryptor + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Eav\Model\Entity\Context $context, @@ -75,7 +84,8 @@ public function __construct( \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Store\Model\StoreManagerInterface $storeManager, $data = [], - AccountConfirmation $accountConfirmation = null + AccountConfirmation $accountConfirmation = null, + EncryptorInterface $encryptor = null ) { parent::__construct($context, $entitySnapshot, $entityRelationComposite, $data); @@ -85,8 +95,10 @@ public function __construct( $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance() ->get(AccountConfirmation::class); $this->setType('customer'); - $this->setConnection('customer_read', 'customer_write'); + $this->setConnection('customer_read'); $this->storeManager = $storeManager; + $this->encryptor = $encryptor ?? ObjectManager::getInstance() + ->get(EncryptorInterface::class); } /** @@ -175,6 +187,11 @@ protected function _beforeSave(\Magento\Framework\DataObject $customer) $this->_validate($customer); } + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->encrypt($rpToken)); + } + return $this; } @@ -223,6 +240,10 @@ protected function _afterSave(\Magento\Framework\DataObject $customer) NotificationStorage::UPDATE_CUSTOMER_SESSION, $customer->getId() ); + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->decrypt($rpToken)); + } return parent::_afterSave($customer); } @@ -403,4 +424,57 @@ public function changeResetPasswordLinkToken(\Magento\Customer\Model\Customer $c } return $this; } + + /** + * Gets the session cut off timestamp string for provided customer id. + * + * @param int $customerId + * @return int|null + */ + public function findSessionCutOff(int $customerId): ?int + { + $connection = $this->getConnection(); + $select = $connection->select()->from( + ['customer_table' => $this->getTable('customer_entity')], + ['session_cutoff' => 'customer_table.session_cutoff'] + )->where( + 'entity_id =?', + $customerId + )->limit( + 1 + ); + $lookup = $connection->fetchRow($select); + if (empty($lookup) || $lookup['session_cutoff'] == null) { + return null; + } + return strtotime($lookup['session_cutoff']); + } + + /** + * Update session cutoff column value for customer + * + * @param int $customerId + * @param int $timestamp + * @return void + */ + public function updateSessionCutOff(int $customerId, int $timestamp): void + { + $this->getConnection()->update( + $this->getTable('customer_entity'), + ['session_cutoff' => $this->dateTime->formatDate($timestamp)], + $this->getConnection()->quoteInto('entity_id = ?', $customerId) + ); + } + + /** + * @inheritDoc + */ + protected function _afterLoad(\Magento\Framework\DataObject $customer) + { + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->decrypt($rpToken)); + } + return parent::_afterLoad($customer); // + } }
app/code/Magento/Customer/Model/ResourceModel/Visitor.php+43 −3 modified@@ -3,12 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model\ResourceModel; /** - * Class Visitor - * @package Magento\Customer\Model\ResourceModel + * Class for Visitor Resource Model */ class Visitor extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { @@ -59,7 +59,6 @@ protected function _prepareDataForSave(\Magento\Framework\Model\AbstractModel $v { return [ 'customer_id' => $visitor->getCustomerId(), - 'session_id' => $visitor->getSessionId(), 'last_visit_at' => $visitor->getLastVisitAt() ]; } @@ -95,4 +94,45 @@ public function clean(\Magento\Customer\Model\Visitor $object) return $this; } + + /** + * Gets created at value for the visitor id. + * + * @param int $visitorId + * @return int|null + */ + public function fetchCreatedAt(int $visitorId): ?int + { + $connection = $this->getConnection(); + $select = $connection->select()->from( + ['visitor_table' => $this->getTable('customer_visitor')], + ['created_at' => 'visitor_table.created_at'] + )->where( + 'visitor_table.visitor_id = ?', + (string) $visitorId + )->limit( + 1 + ); + $lookup = $connection->fetchRow($select); + if (empty($lookup) || $lookup['created_at'] == null) { + return null; + } + return strtotime($lookup['created_at']); + } + + /** + * Update visitor session created at column value + * + * @param int $visitorId + * @param int $timestamp + * @return void + */ + public function updateCreatedAt(int $visitorId, int $timestamp): void + { + $this->getConnection()->update( + $this->getTable('customer_visitor'), + ['created_at' => $this->dateTime->formatDate($timestamp)], + $this->getConnection()->quoteInto('visitor_id = ?', $visitorId) + ); + } }
app/code/Magento/Customer/Model/Session.php+18 −10 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Customer\Model; use Magento\Customer\Api\CustomerRepositoryInterface; @@ -11,6 +13,7 @@ use Magento\Customer\Model\Config\Share; use Magento\Customer\Model\ResourceModel\Customer as ResourceCustomer; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Session\Generic; /** * Customer session model @@ -70,7 +73,7 @@ class Session extends \Magento\Framework\Session\SessionManager protected $_configShare; /** - * @var \Magento\Framework\Session\Generic + * @var Generic */ protected $_session; @@ -132,7 +135,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param ResourceCustomer $customerResource * @param CustomerFactory $customerFactory * @param \Magento\Framework\UrlFactory $urlFactory - * @param \Magento\Framework\Session\Generic $session + * @param Generic $session * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Framework\App\Http\Context $httpContext * @param CustomerRepositoryInterface $customerRepository @@ -158,7 +161,7 @@ public function __construct( ResourceCustomer $customerResource, CustomerFactory $customerFactory, \Magento\Framework\UrlFactory $urlFactory, - \Magento\Framework\Session\Generic $session, + Generic $session, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\App\Http\Context $httpContext, CustomerRepositoryInterface $customerRepository, @@ -176,6 +179,10 @@ public function __construct( $this->customerRepository = $customerRepository; $this->_eventManager = $eventManager; $this->_httpContext = $httpContext; + $this->groupManagement = $groupManagement; + $this->response = $response; + $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance() + ->get(AccountConfirmation::class); parent::__construct( $request, $sidResolver, @@ -187,10 +194,6 @@ public function __construct( $cookieMetadataFactory, $appState ); - $this->groupManagement = $groupManagement; - $this->response = $response; - $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance() - ->get(AccountConfirmation::class); $this->_eventManager->dispatch('customer_session_init', ['customer_session' => $this]); } @@ -310,7 +313,11 @@ public function setCustomer(Customer $customerModel) public function getCustomer() { if ($this->_customerModel === null) { - $this->_customerModel = $this->_customerFactory->create()->load($this->getCustomerId()); + $this->_customerModel = $this->_customerFactory->create(); + + if ($this->getCustomerId()) { + $this->_customerResource->load($this->_customerModel, $this->getCustomerId()); + } } return $this->_customerModel; @@ -504,8 +511,9 @@ public function logout() /** * Authenticate controller action by login customer * - * @param bool|null $loginUrl - * @return bool + * @param bool|null $loginUrl + * @return bool + * @throws \Magento\Framework\Exception\SessionException */ public function authenticate($loginUrl = null) {
app/code/Magento/Customer/Model/Session/SessionCleaner.php+32 −28 modified@@ -8,14 +8,14 @@ namespace Magento\Customer\Model\Session; use Magento\Customer\Api\SessionCleanerInterface; +use Magento\Customer\Model\ResourceModel\Customer as CustomerResourceModel; +use Magento\Customer\Model\ResourceModel\Visitor as VisitorResourceModel; use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory as VisitorCollectionFactory; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Intl\DateTimeFactory; -use Magento\Framework\Session\Config; use Magento\Framework\Session\SaveHandlerInterface; use Magento\Framework\Session\SessionManagerInterface; -use Magento\Framework\Stdlib\DateTime; -use Magento\Store\Model\ScopeInterface; /** * Deletes all session data which relates to customer, including current session data. @@ -50,51 +50,55 @@ class SessionCleaner implements SessionCleanerInterface private $saveHandler; /** - * @inheritdoc + * @var CustomerResourceModel + */ + private $customerResourceModel; + + /** + * @var VisitorResourceModel + */ + private $visitorResourceModel; + + /** + * @param ScopeConfigInterface $scopeConfig + * @param DateTimeFactory $dateTimeFactory + * @param VisitorCollectionFactory $visitorCollectionFactory + * @param SessionManagerInterface $sessionManager + * @param SaveHandlerInterface $saveHandler + * @param CustomerResourceModel|null $customerResourceModel + * @param VisitorResourceModel|null $visitorResourceModel */ public function __construct( ScopeConfigInterface $scopeConfig, DateTimeFactory $dateTimeFactory, VisitorCollectionFactory $visitorCollectionFactory, SessionManagerInterface $sessionManager, - SaveHandlerInterface $saveHandler + SaveHandlerInterface $saveHandler, + CustomerResourceModel $customerResourceModel = null, + VisitorResourceModel $visitorResourceModel = null ) { $this->scopeConfig = $scopeConfig; $this->dateTimeFactory = $dateTimeFactory; $this->visitorCollectionFactory = $visitorCollectionFactory; $this->sessionManager = $sessionManager; $this->saveHandler = $saveHandler; + $this->customerResourceModel = $customerResourceModel + ?: ObjectManager::getInstance()->get(CustomerResourceModel::class); + $this->visitorResourceModel = $visitorResourceModel + ?: ObjectManager::getInstance()->get(VisitorResourceModel::class); } /** * @inheritdoc */ public function clearFor(int $customerId): void { - if ($this->sessionManager->isSessionExists()) { - //delete old session and move data to the new session - //use this instead of $this->sessionManager->regenerateId because last one doesn't delete old session - // phpcs:ignore Magento2.Functions.DiscouragedFunction - session_regenerate_id(true); - } - - $sessionLifetime = $this->scopeConfig->getValue( - Config::XML_PATH_COOKIE_LIFETIME, - ScopeInterface::SCOPE_STORE - ); $dateTime = $this->dateTimeFactory->create(); - $activeSessionsTime = $dateTime->setTimestamp($dateTime->getTimestamp() - $sessionLifetime) - ->format(DateTime::DATETIME_PHP_FORMAT); - /** @var \Magento\Customer\Model\ResourceModel\Visitor\Collection $visitorCollection */ - $visitorCollection = $this->visitorCollectionFactory->create(); - $visitorCollection->addFieldToFilter('customer_id', $customerId); - $visitorCollection->addFieldToFilter('last_visit_at', ['from' => $activeSessionsTime]); - /** @var \Magento\Customer\Model\Visitor $visitor */ - foreach ($visitorCollection->getItems() as $visitor) { - $sessionId = $visitor->getSessionId(); - $this->sessionManager->start(); - $this->saveHandler->destroy($sessionId); - $this->sessionManager->writeClose(); + $timestamp = $dateTime->getTimestamp(); + $this->customerResourceModel->updateSessionCutOff($customerId, $timestamp); + if ($this->sessionManager->getVisitorData() !== null) { + $visitorId = $this->sessionManager->getVisitorData()['visitor_id']; + $this->visitorResourceModel->updateCreatedAt((int) $visitorId, $timestamp + 1); } } }
app/code/Magento/Customer/Model/Session/Validators/CutoffValidator.php+85 −0 added@@ -0,0 +1,85 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Customer\Model\Session\Validators; + +use Magento\Customer\Model\ResourceModel\Customer as ResourceCustomer; +use Magento\Customer\Model\ResourceModel\Visitor as ResourceVisitor; +use Magento\Framework\Exception\SessionException; +use Magento\Framework\Phrase; +use Magento\Framework\Session\SessionManagerInterface; +use Magento\Framework\Session\ValidatorInterface; +use Magento\Framework\Session\Generic; + +/** + * Session Validator + * + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) + */ +class CutoffValidator implements ValidatorInterface +{ + /** + * @var ResourceCustomer + */ + private $customerResource; + + /** + * @var ResourceVisitor + */ + private $visitorResource; + + /** + * @var Generic + */ + private $visitorSession; + + /** + * Cutoff validator constructor. + * + * @param ResourceCustomer $customerResource + * @param ResourceVisitor $visitorResource + * @param Generic $visitorSession + */ + public function __construct( + ResourceCustomer $customerResource, + ResourceVisitor $visitorResource, + Generic $visitorSession + ) { + $this->customerResource = $customerResource; + $this->visitorResource = $visitorResource; + $this->visitorSession = $visitorSession; + } + + /** + * Validate session + * + * @param SessionManagerInterface $session + * @return void + * @throws SessionException + */ + public function validate(SessionManagerInterface $session): void + { + try { + $visitor = $this->visitorSession->getVisitorData(); + if ($visitor !== null + && array_key_exists('customer_id', $visitor) + && array_key_exists('visitor_id', $visitor) + ) { + $cutoff = $this->customerResource->findSessionCutOff((int) $visitor['customer_id']); + $sessionCreationTime = $this->visitorResource->fetchCreatedAt((int) $visitor['visitor_id']); + if (isset($cutoff, $sessionCreationTime) && $cutoff > $sessionCreationTime) { + throw new SessionException( + new Phrase('The session has expired, please login again.') + ); + } + } + } catch (SessionException $e) { + $session->destroy(['clear_storage' => false]); + // throw core session exception + throw $e; + } + } +}
app/code/Magento/Customer/Model/Visitor.php+19 −1 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model; @@ -90,7 +91,6 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @param array $ignores * @param array $data * @param RequestSafetyInterface|null $requestSafety - * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -184,6 +184,24 @@ public function initByRequest($observer) return $this; } + /** + * @inheritdoc + */ + public function beforeSave() + { + $this->unsetData("session_id"); + return parent::beforeSave(); + } + + /** + * @inheritdoc + */ + public function afterSave() + { + $this->setSessionId($this->session->getSessionId()); + return parent::afterSave(); + } + /** * Save visitor by request *
app/code/Magento/Customer/Setup/Patch/Data/SessionIDColumnCleanUp.php+102 −0 added@@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Customer\Setup\Patch\Data; + +use Magento\Framework\DB\Adapter\Pdo\Mysql; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Psr\Log\LoggerInterface; + +/** + * Class Clean Up Data Removes unused data + */ +class SessionIDColumnCleanUp implements DataPatchInterface +{ + /** + * @var ModuleDataSetupInterface + */ + private $moduleDataSetup; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * RemoveData constructor. + * @param ModuleDataSetupInterface $moduleDataSetup + * @param LoggerInterface $logger + */ + public function __construct( + ModuleDataSetupInterface $moduleDataSetup, + LoggerInterface $logger + ) { + $this->moduleDataSetup = $moduleDataSetup; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + try { + $this->cleanCustomerVisitorTable(); + } catch (\Throwable $e) { + $this->logger->warning( + 'Customer module SessionIDColumnCleanUp patch experienced an error and could not be completed.' + . ' Please submit a support ticket or email us at security@magento.com.' + ); + + return $this; + } + + return $this; + } + + /** + * Remove session id from customer_visitor table. + * + * @throws \Zend_Db_Statement_Exception + */ + private function cleanCustomerVisitorTable() + { + $tableName = $this->moduleDataSetup->getTable('customer_visitor'); + // phpcs:ignore Magento2.SQL.RawQuery + $rawQuery = sprintf( + 'UPDATE %s SET session_id = NULL WHERE session_id IS NOT NULL LIMIT 1000', + $tableName + ); + + $adapter = $this->moduleDataSetup->getConnection(); + if ($adapter instanceof Mysql) { + do { + $result = $adapter->rawQuery($rawQuery)->rowCount(); + } while ($result > 0); + } else { + do { + $result = $adapter->query($rawQuery)->rowCount(); + } while ($result > 0); + } + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php+14 −16 modified@@ -842,22 +842,20 @@ public function testCreateAccountWithPasswordInputException( $this->scopeConfig->expects($this->any()) ->method('getValue') ->willReturnMap( - + [ [ - [ - AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH, - 'default', - null, - $minPasswordLength, - ], - [ - AccountManagement::XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER, - 'default', - null, - $minCharacterSetsNum, - ], - ] - + AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH, + 'default', + null, + $minPasswordLength, + ], + [ + AccountManagement::XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER, + 'default', + null, + $minCharacterSetsNum, + ], + ] ); $this->string->expects($this->any()) @@ -1615,7 +1613,7 @@ public function testValidateResetPasswordTokenBadResetPasswordLinkToken() $this->expectException(\Magento\Framework\Exception\InputException::class); $this->expectExceptionMessage('"resetPasswordLinkToken" is required. Enter and try again.'); - $this->accountManagement->validateResetPasswordLinkToken(22, null); + $this->accountManagement->validateResetPasswordLinkToken(22, ''); } /**
app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php+2 −0 modified@@ -128,6 +128,8 @@ public function testExtractValueNoRequestScope($expected, $attributeCode = '', $ 'entityTypeCode' => self::ENTITY_TYPE, ]); + $model->setRequestScope(''); + $this->assertEquals($expected, $model->extractValue($this->requestMock)); if (!empty($attributeCode)) { unset($_FILES[$attributeCode]);
app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php+7 −46 modified@@ -3,7 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - declare(strict_types=1); namespace Magento\Customer\Test\Unit\Model\Metadata\Form; @@ -26,7 +25,6 @@ use Magento\Framework\Filesystem\Io\File; use Magento\Framework\Url\EncoderInterface; use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension; -use PHPUnit_Framework_MockObject_MockObject; /** * Tests Metadata/Form/Image class @@ -100,6 +98,9 @@ class ImageTest extends AbstractFormTestCase */ private $driverMock; + /** + * @inheritdoc + */ protected function setUp(): void { parent::setUp(); @@ -201,14 +202,6 @@ public function testValidateIsNotValidFile() ->method('getStoreLabel') ->willReturn('File Input Field Label'); - $this->fileProcessorMock->expects($this->once()) - ->method('getStat') - ->with($value['tmp_name']) - ->willReturn([ - 'extension' => 'txt', - 'basename' => 'tmp_file.txt', - ]); - $this->fileProcessorMock->expects($this->once()) ->method('isExist') ->with(FileProcessor::TMP_DIR . '/' . $value['tmp_name']) @@ -238,20 +231,12 @@ public function testValidate() ->method('getStoreLabel') ->willReturn('File Input Field Label'); - $this->fileProcessorMock->expects($this->once()) - ->method('getStat') - ->with($value['tmp_name']) - ->willReturn([ - 'extension' => 'gif', - 'basename' => 'logo.gif', - ]); - $this->fileProcessorMock->expects($this->once()) ->method('isExist') ->with(FileProcessor::TMP_DIR . '/' . $value['name']) ->willReturn(true); - $this->ioFileSystemMock->expects($this->any()) + $this->ioFileSystemMock->expects($this->once()) ->method('getPathInfo') ->with($value['name']) ->willReturn([ @@ -299,20 +284,12 @@ public function testValidateMaxFileSize() ->method('getValidationRules') ->willReturn([$validationRuleMock]); - $this->fileProcessorMock->expects($this->once()) - ->method('getStat') - ->with($value['tmp_name']) - ->willReturn([ - 'extension' => 'gif', - 'basename' => 'logo.gif', - ]); - $this->fileProcessorMock->expects($this->once()) ->method('isExist') ->with(FileProcessor::TMP_DIR . '/' . $value['name']) ->willReturn(true); - $this->ioFileSystemMock->expects($this->any()) + $this->ioFileSystemMock->expects($this->once()) ->method('getPathInfo') ->with($value['name']) ->willReturn([ @@ -359,20 +336,12 @@ public function testValidateMaxImageWidth() ->method('getValidationRules') ->willReturn([$validationRuleMock]); - $this->fileProcessorMock->expects($this->once()) - ->method('getStat') - ->with($value['tmp_name']) - ->willReturn([ - 'extension' => 'gif', - 'basename' => 'logo.gif', - ]); - $this->fileProcessorMock->expects($this->once()) ->method('isExist') ->with(FileProcessor::TMP_DIR . '/' . $value['name']) ->willReturn(true); - $this->ioFileSystemMock->expects($this->any()) + $this->ioFileSystemMock->expects($this->once()) ->method('getPathInfo') ->with($value['name']) ->willReturn([ @@ -419,20 +388,12 @@ public function testValidateMaxImageHeight() ->method('getValidationRules') ->willReturn([$validationRuleMock]); - $this->fileProcessorMock->expects($this->once()) - ->method('getStat') - ->with($value['tmp_name']) - ->willReturn([ - 'extension' => 'gif', - 'basename' => 'logo.gif', - ]); - $this->fileProcessorMock->expects($this->once()) ->method('isExist') ->with(FileProcessor::TMP_DIR . '/' . $value['name']) ->willReturn(true); - $this->ioFileSystemMock->expects($this->any()) + $this->ioFileSystemMock->expects($this->once()) ->method('getPathInfo') ->with($value['name']) ->willReturn([
app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php+2 −2 modified@@ -9,8 +9,7 @@ use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; /** - * Class VisitorTest - * @package Magento\Customer\Model + * Class for test for Customer/Model/Visitor */ class VisitorTest extends \PHPUnit\Framework\TestCase { @@ -59,6 +58,7 @@ protected function setUp(): void 'addCommitCallback', 'commit', 'clean', + 'load', ])->disableOriginalConstructor()->getMock(); $this->resource->expects($this->any())->method('getIdFieldName')->willReturn('visitor_id'); $this->resource->expects($this->any())->method('addCommitCallback')->willReturnSelf();
app/code/Magento/Customer/view/frontend/email/password_reset_confirmation.html+2 −2 modified@@ -8,7 +8,7 @@ <!--@vars { "var store.frontend_name":"Store Name", "var customer.name":"Customer Name", -"var this.getUrl($store,'customer/account/createPassword/',[_query:[token:$customer.rp_token],_nosid:1])":"Reset Password URL" +"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Reset Password URL" } @--> {{template config_path="design/email/header_template"}} @@ -22,7 +22,7 @@ <table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"> - <a href="{{var this.getUrl($store,'customer/account/createPassword/',[_query:[token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a> + <a href="{{var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a> </td> </tr> </table>
app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml+4 −3 modified@@ -3,12 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - +// phpcs:disable Generic.Files.LineLength.TooLong +//phpcs:disable Magento2.Legacy.PhtmlTemplate /** @var \Magento\Customer\Block\Account\Resetpassword $block */ ?> -<form action="<?= $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['token' => $block->getResetPasswordLinkToken()]])) ?>" +<form action="<?= $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['id'=>$block->getRpCustomerId(),'token' => $block->getResetPasswordLinkToken()]])) ?>" method="post" - <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> + <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> id="form-validate" class="form password reset" data-mage-init='{"validation":{}}'>
app/code/Magento/Deploy/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-deploy", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "102.0.*", + "magento/module-config": "101.1.*", + "magento/module-require-js": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-user": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Developer/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-developer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Dhl/composer.json+18 −16 modified@@ -1,31 +1,32 @@ { "name": "magento/module-dhl", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-checkout": "*" + "magento/module-checkout": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/Directory/composer.json+11 −9 modified@@ -1,22 +1,23 @@ { "name": "magento/module-directory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/DirectoryGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-directory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.4", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-directory": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-graph-ql": "100.3.*", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Downloadable/composer.json+25 −23 modified@@ -1,37 +1,38 @@ { "name": "magento/module-downloadable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-gift-message": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-downloadable-sample-data": "*" + "magento/module-downloadable-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/DownloadableGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/framework": "*" + "magento/module-catalog": "103.0.*", + "magento/module-downloadable": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-quote-graph-ql": "100.3.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/DownloadableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-downloadable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-downloadable": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-import-export": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Eav/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-eav", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/EavGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-eav-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-eav": "*" + "magento/framework": "102.0.*", + "magento/module-eav": "102.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Elasticsearch6/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-6", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "102.0.*", + "magento/module-advanced-search": "100.3.*", + "magento/module-catalog-search": "101.0.*", + "magento/module-search": "101.0.*", + "magento/module-elasticsearch": "100.3.*", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1||~7.6" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch7/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-7", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "102.0.*", + "magento/module-advanced-search": "100.3.*", + "magento/module-catalog-search": "101.0.*", + "magento/module-search": "101.0.*", + "magento/module-elasticsearch": "100.3.*", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1||~7.6 " }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-elasticsearch", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-advanced-search": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*", + "magento/module-advanced-search": "100.3.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-search": "101.0.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-search": "101.0.*", + "magento/module-store": "101.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/framework": "102.0.*", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1||~7.6" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Email/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-email", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-require-js": "*", - "magento/module-media-storage": "*", - "magento/module-variable": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*", + "magento/module-require-js": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-variable": "100.3.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Email/Console/Command/DatabaseTemplateCompatibilityCommand.php+126 −0 added@@ -0,0 +1,126 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Email\Console\Command; + +use Magento\Email\Model\AbstractTemplate; +use Magento\Email\Model\ResourceModel\Template\CollectionFactory; +use Magento\Email\Model\Template\VariableCompatibilityChecker; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Magento\Framework\Console\Cli; + +/** + * Scan DB templates for directive incompatibilities + */ +class DatabaseTemplateCompatibilityCommand extends Command +{ + /** + * @var CollectionFactory + */ + private $templateCollection; + + /** + * @var VariableCompatibilityChecker + */ + private $compatibilityChecker; + + /** + * @var bool + */ + protected $hasErrors = false; + + /** + * Constructor + * + * @param VariableCompatibilityChecker $compatibilityChecker + * @param CollectionFactory $templateCollection + * @param string $name + */ + public function __construct( + VariableCompatibilityChecker $compatibilityChecker, + CollectionFactory $templateCollection, + string $name = null + ) { + parent::__construct($name); + $this->templateCollection = $templateCollection; + $this->compatibilityChecker = $compatibilityChecker; + } + + /** + * @inheritdoc + */ + protected function configure() + { + $this->setName('dev:email:override-compatibility-check') + ->setDescription('Scans email template overrides for potential variable usage compatibility issues'); + } + + /** + * @inheritDoc + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $collection = $this->templateCollection->create(); + $collection->load(); + + $this->hasErrors = false; + foreach ($collection as $template) { + $this->checkTemplate($template, $output); + } + + if (!$this->hasErrors) { + $output->writeln('<info>No errors detected</info>'); + } + return $this->hasErrors ? Cli::RETURN_FAILURE : Cli::RETURN_SUCCESS; + } + + /** + * Check the given template for compatibility issues + * + * @param AbstractTemplate $template + * @param OutputInterface $output + */ + protected function checkTemplate(AbstractTemplate $template, OutputInterface $output): void + { + $errors = $this->compatibilityChecker->getCompatibilityIssues($template->getTemplateText()); + $templateName = $template->getTemplateCode(); + if (!empty($errors)) { + $this->hasErrors = true; + $output->writeln( + '<error>Template "' . $templateName . '" has the following compatibility issues:</error>' + ); + $this->renderErrors($output, $errors); + } + $errors = $this->compatibilityChecker->getCompatibilityIssues($template->getTemplateSubject()); + if (!empty($errors)) { + $this->hasErrors = true; + $output->writeln( + '<error>Template "' . $templateName . '" subject has the following compatibility issues:</error>' + ); + $this->renderErrors($output, $errors); + } + } + + /** + * Render given errors + * + * @param OutputInterface $output + * @param array $errors + */ + private function renderErrors(OutputInterface $output, array $errors): void + { + foreach ($errors as $error) { + $error = str_replace(PHP_EOL, PHP_EOL . ' ', $error); + $output->writeln( + '<error> - ' . $error . '</error>' + ); + } + $output->writeln(''); + } +}
app/code/Magento/Email/etc/di.xml+7 −0 modified@@ -90,4 +90,11 @@ </argument> </arguments> </type> + <type name="Magento\Framework\Console\CommandListInterface"> + <arguments> + <argument name="commands" xsi:type="array"> + <item name="emailTemplateCheck" xsi:type="object">Magento\Email\Console\Command\DatabaseTemplateCompatibilityCommand</item> + </argument> + </arguments> + </type> </config>
app/code/Magento/Email/Model/AbstractTemplate.php+8 −14 modified@@ -31,32 +31,32 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn /** * Default design area for emulation */ - const DEFAULT_DESIGN_AREA = 'frontend'; + public const DEFAULT_DESIGN_AREA = 'frontend'; /** * Default path to email logo */ - const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png'; + public const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png'; /** * Email logo url */ - const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo'; + public const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo'; /** * Email logo alt text */ - const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt'; + public const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt'; /** * Email logo width */ - const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width'; + public const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width'; /** * Email logo height */ - const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height'; + public const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height'; /** * Configuration of design package for template @@ -144,8 +144,6 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn protected $filesystem; /** - * Scope config - * * @var \Magento\Framework\App\Config\ScopeConfigInterface */ protected $scopeConfig; @@ -361,17 +359,11 @@ public function getProcessedTemplate(array $variables = []) $variables = $this->addEmailVariables($variables, $storeId); $processor->setVariables($variables); - $previousStrictMode = $processor->setStrictMode( - !$this->getData('is_legacy') && is_numeric($this->getTemplateId()) - ); - try { $result = $processor->filter($this->getTemplateText()); } catch (\Exception $e) { $this->cancelDesignConfig(); throw new \LogicException(__($e->getMessage()), $e->getCode(), $e); - } finally { - $processor->setStrictMode($previousStrictMode); } if ($isDesignApplied) { @@ -461,6 +453,8 @@ protected function addEmailVariables($variables, $storeId) if (!isset($variables['store'])) { $variables['store'] = $store; } + $storeAddress = $variables['store']->getFormattedAddress(); + $variables['store']->setData('formatted_address', $storeAddress); if (!isset($variables['store']['frontend_name'])) { $variables['store']['frontend_name'] = $store->getFrontendName(); }
app/code/Magento/Email/Model/Template.php+3 −11 modified@@ -45,20 +45,20 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ * @deprecated * @see \Magento\Email\Model\Transport::XML_PATH_SENDING_SET_RETURN_PATH */ - const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path'; + public const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path'; /** * Configuration path for custom Return-Path email * @deprecated * @see \Magento\Email\Model\Transport::XML_PATH_SENDING_RETURN_PATH_EMAIL */ - const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email'; + public const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email'; /** * Config path to mail sending setting that shows if email communications are disabled * @deprecated */ - const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; + public const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; /** * BCC list @@ -68,8 +68,6 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ protected $_bcc = []; /** - * Return path - * * @var string */ protected $_returnPath = ''; @@ -247,17 +245,11 @@ public function getProcessedTemplateSubject(array $variables) $this->applyDesignConfig(); $storeId = $this->getDesignConfig()->getStore(); - $previousStrictMode = $processor->setStrictMode( - !$this->getData('is_legacy') && is_numeric($this->getTemplateId()) - ); - try { $processedResult = $processor->setStoreId($storeId)->filter(__($this->getTemplateSubject())); } catch (\Exception $e) { $this->cancelDesignConfig(); throw new \Magento\Framework\Exception\MailException(__($e->getMessage()), $e); - } finally { - $processor->setStrictMode($previousStrictMode); } $this->cancelDesignConfig();
app/code/Magento/Email/Model/Template/VariableCompatibilityChecker.php+204 −0 added@@ -0,0 +1,204 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Email\Model\Template; + +use Magento\Framework\Filter\Template\Tokenizer\Parameter; +use Magento\Framework\Filter\Template\Tokenizer\Variable; + +/** + * Scan an email template for compatibility with the strict resolver + */ +class VariableCompatibilityChecker +{ + private const CONSTRUCTION_DEPEND_PATTERN = '/{{depend\s*(.*?)}}(.*?){{\\/depend\s*}}/si'; + private const CONSTRUCTION_IF_PATTERN = '/{{if\s*(.*?)}}(.*?)({{else}}(.*?))?{{\\/if\s*}}/si'; + private const LOOP_PATTERN = '/{{for(?P<loopItem>.*? )(in)(?P<loopData>.*?)}}(?P<loopBody>.*?){{\/for}}/si'; + private const CONSTRUCTION_PATTERN = '/{{([a-z]{0,10})(.*?)}}(?:(.*?)(?:{{\/(?:\\1)}}))?/si'; + + /** + * @var array + */ + private $errors = []; + + /** + * @var Variable + */ + private $variableTokenizer; + + /** + * @var Parameter + */ + private $parameterTokenizer; + + /** + * Constructor + * + * @param Variable $variableTokenizer + * @param Parameter $parameterTokenizer + */ + public function __construct(Variable $variableTokenizer, Parameter $parameterTokenizer) + { + $this->variableTokenizer = $variableTokenizer; + $this->parameterTokenizer = $parameterTokenizer; + } + + /** + * Detect invalid usage of template filter directives + * + * @param string $template + */ + public function getCompatibilityIssues(string $template): array + { + $this->errors = []; + + if (empty($template)) { + return []; + } + + $template = $this->processIfDirectives($template); + $template = $this->processDependDirectives($template); + $template = $this->processForDirectives($template); + $this->processVarDirectivesAndParams($template); + + return $this->errors; + } + + /** + * Process the {{if}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processIfDirectives(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_IF_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{if <var>}} + $this->validateVariableUsage($construction[1]); + $html = str_replace($construction[0], $construction[2] . ($construction[4] ?? ''), $html); + } + } + + return $html; + } + + /** + * Process the {{depend}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processDependDirectives(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_DEPEND_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{depend <var>}} + $this->validateVariableUsage($construction[1]); + $html = str_replace($construction[0], $construction[2], $html); + } + } + + return $html; + } + + /** + * Process the {{for}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processForDirectives(string $html): string + { + if (preg_match_all(self::LOOP_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{for in <var>}} + $this->validateVariableUsage($construction['loopData']); + $html = str_replace($construction[0], $construction['loopBody'], $html); + } + } + + return $html; + } + + /** + * Process the all var directives and var directive params in the file + * + * @param string $html + * @return string The processed template + */ + private function processVarDirectivesAndParams(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + if (empty($construction[2])) { + continue; + } + + if ($construction[1] === 'var') { + $this->validateVariableUsage($construction[2]); + } else { + $this->validateDirectiveBody($construction[2]); + } + } + } + + return $html; + } + + /** + * Validate directive body is valid. e.g. {{somedir <directive body>}} + * + * @param string $body + */ + private function validateDirectiveBody(string $body): void + { + $this->parameterTokenizer->setString($body); + $params = $this->parameterTokenizer->tokenize(); + + foreach ($params as $param) { + if (substr($param, 0, 1) === '$') { + $this->validateVariableUsage(substr($param, 1)); + } + } + } + + /** + * Validate directive variable usage is valid. e.g. {{var <variable body>}} or {{somedir some_param="$foo.bar()"}} + * + * @param string $body + */ + private function validateVariableUsage(string $body): void + { + $this->variableTokenizer->setString($body); + $stack = $this->variableTokenizer->tokenize(); + + if (empty($stack)) { + return; + } + + foreach ($stack as $token) { + // As a static analyzer there are no data types to know if this is a DataObject so allow all get* methods + if ($token['type'] === 'method' && substr($token['name'], 0, 3) !== 'get') { + $this->addError( + 'Template directives may not invoke methods. Only scalar array access is allowed.' . PHP_EOL + . 'Found "' . trim($body) . '"' + ); + } + } + } + + /** + * Add an error to the current processing template + * + * @param string $error + */ + private function addError(string $error): void + { + $this->errors[] = $error; + } +}
app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php+4 −11 modified@@ -77,7 +77,7 @@ protected function setUp(): void ->getMock(); $this->store = $this->getMockBuilder(\Magento\Store\Model\Store::class) - ->setMethods(['getFrontendName', 'getId']) + ->setMethods(['getFrontendName', 'getId', 'getFormattedAddress']) ->disableOriginalConstructor() ->getMock(); $this->store->expects($this->any()) @@ -86,6 +86,9 @@ protected function setUp(): void $this->store->expects($this->any()) ->method('getFrontendName') ->willReturn('storeId'); + $this->store->expects($this->any()) + ->method('getFormattedAddress') + ->willReturn("Test Store\n Street 1"); $this->storeManager->expects($this->any()) ->method('getStore') ->willReturn($this->store); @@ -168,7 +171,6 @@ public function testGetProcessedTemplate($variables, $templateType, $storeId, $e 'filter', 'getStoreId', 'getInlineCssFiles', - 'setStrictMode', ] ) ->disableOriginalConstructor() @@ -194,10 +196,6 @@ public function testGetProcessedTemplate($variables, $templateType, $storeId, $e $filterTemplate->expects($this->any()) ->method('getStoreId') ->willReturn($storeId); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(true)], [$this->equalTo(false)]) - ->willReturnOnConsecutiveCalls(false, true); $expectedVariables['store'] = $this->store; @@ -259,7 +257,6 @@ public function testGetProcessedTemplateException() 'filter', 'getStoreId', 'getInlineCssFiles', - 'setStrictMode', ] ) ->disableOriginalConstructor() @@ -280,10 +277,6 @@ public function testGetProcessedTemplateException() $filterTemplate->expects($this->any()) ->method('getStoreId') ->willReturn(1); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(false)], [$this->equalTo(true)]) - ->willReturnOnConsecutiveCalls(true, false); $model = $this->getModelMock( [
app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php+2 −2 modified@@ -113,7 +113,7 @@ class FilterTest extends \PHPUnit\Framework\TestCase private $pubDirectoryRead; /** - * @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\Filter\VariableResolver\StrategyResolver + * @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\Filter\VariableResolver\StrictResolver */ private $variableResolver; @@ -190,7 +190,7 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); $this->variableResolver = - $this->getMockBuilder(\Magento\Framework\Filter\VariableResolver\StrategyResolver::class) + $this->getMockBuilder(\Magento\Framework\Filter\VariableResolver\StrictResolver::class) ->disableOriginalConstructor() ->getMock();
app/code/Magento/Email/Test/Unit/Model/TemplateTest.php+1 −5 modified@@ -518,16 +518,12 @@ public function testGetProcessedTemplateSubject() class_exists(Template::class, true); $filterTemplate = $this->getMockBuilder(\Magento\Framework\Filter\Template::class) - ->setMethods(['setVariables', 'setStoreId', 'filter', 'setStrictMode']) + ->setMethods(['setVariables', 'setStoreId', 'filter']) ->disableOriginalConstructor() ->getMock(); $model->expects($this->once()) ->method('getTemplateFilter') ->willReturn($filterTemplate); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(true)], [$this->equalTo(false)]) - ->willReturnOnConsecutiveCalls(false, true); $model->expects($this->once()) ->method('applyDesignConfig');
app/code/Magento/EncryptionKey/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-encryption-key", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Fedex/composer.json+16 −14 modified@@ -1,27 +1,28 @@ { "name": "magento/module-fedex", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/GiftMessage/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-gift-message", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-eav": "*", - "magento/module-multishipping": "*" + "magento/module-eav": "102.0.*", + "magento/module-multishipping": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/GoogleAdwords/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-google-adwords", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/GoogleAnalytics/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-cookie": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GoogleOptimizer/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-optimizer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-google-analytics": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-cms": "103.0.*", + "magento/module-google-analytics": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GraphQlCache/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-graph-ql-cache", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-page-cache": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-page-cache": "100.3.*", + "magento/module-graph-ql": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/GraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.6-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-eav": "*", - "magento/framework": "*" + "magento/module-eav": "102.0.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-webapi": "*", - "magento/module-graph-ql-cache": "*" + "magento/module-webapi": "100.3.*", + "magento/module-graph-ql-cache": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/GraphQl/etc/adminhtml/system.xml+31 −0 added@@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +/** + * Representation of Webapi module in System Configuration (Magento admin panel). + * + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> + <system> + <section id="webapi"> + <group id="graphql_validation" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>GraphQl Input Limits</label> + <field id="input_limit_enabled" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <label>Enable Input Limits</label> + <config_path>graphql/validation/input_limit_enabled</config_path> + </field> + <field id="maximum_page_size" translate="label comment" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Page Size</label> + <comment>Maximum number of items allowed in a paginated search result.</comment> + <config_path>graphql/validation/maximum_page_size</config_path> + <depends> + <field id="input_limit_enabled">1</field> + </depends> + </field> + </group> + </section> + </system> +</config>
app/code/Magento/GroupedCatalogInventory/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-grouped-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-grouped-product": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-grouped-product": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/GroupedImportExport/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-grouped-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-grouped-product": "*", - "magento/module-import-export": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-import-export": "101.0.*", + "magento/module-eav": "102.0.*", + "magento/module-grouped-product": "100.3.*", + "magento/module-import-export": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/GroupedProduct/composer.json+21 −19 modified@@ -1,33 +1,34 @@ { "name": "magento/module-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-msrp": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-grouped-product-sample-data": "*" + "magento/module-grouped-product-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } +
app/code/Magento/GroupedProductGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-grouped-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-grouped-product": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.6", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-grouped-product": "100.3.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/ImportExport/composer.json+14 −12 modified@@ -1,25 +1,26 @@ { "name": "magento/module-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Indexer/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-indexer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/InstantPurchase/composer.json+10 −8 modified@@ -6,16 +6,17 @@ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-quote": "*", - "magento/module-vault": "*", - "magento/framework": "*" + "magento/module-store": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-vault": "101.1.*", + "magento/framework": "102.0.*" }, "autoload": { "files": [ @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Integration/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-integration", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-customer": "102.0.*", + "magento/module-security": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-user": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Integration/etc/db_schema.xml+2 −2 modified@@ -16,7 +16,7 @@ comment="Updated At"/> <column xsi:type="varchar" name="name" nullable="false" length="255" comment="Name of consumer"/> <column xsi:type="varchar" name="key" nullable="false" length="32" comment="Key code"/> - <column xsi:type="varchar" name="secret" nullable="false" length="32" comment="Secret code"/> + <column xsi:type="varchar" name="secret" nullable="false" length="128" comment="Secret code"/> <column xsi:type="text" name="callback_url" nullable="true" comment="Callback URL"/> <column xsi:type="text" name="rejected_callback_url" nullable="false" comment="Rejected callback URL"/> <constraint xsi:type="primary" referenceId="PRIMARY"> @@ -46,7 +46,7 @@ comment="Customer user ID"/> <column xsi:type="varchar" name="type" nullable="false" length="16" comment="Token Type"/> <column xsi:type="varchar" name="token" nullable="false" length="32" comment="Token"/> - <column xsi:type="varchar" name="secret" nullable="false" length="32" comment="Token Secret"/> + <column xsi:type="varchar" name="secret" nullable="false" length="128" comment="Token Secret"/> <column xsi:type="varchar" name="verifier" nullable="true" length="32" comment="Token Verifier"/> <column xsi:type="text" name="callback_url" nullable="false" comment="Token Callback URL"/> <column xsi:type="smallint" name="revoked" padding="5" unsigned="true" nullable="false" identity="false"
app/code/Magento/Integration/Model/Oauth/Token.php+2 −1 modified@@ -11,7 +11,7 @@ use Magento\Integration\Model\ResourceModel\Oauth\Token\Collection as TokenCollection; /** - * oAuth token model + * OAuth token model * * @method string getName() Consumer name (joined from consumer table) * @method int getConsumerId() @@ -318,6 +318,7 @@ public function loadByConsumerIdAndUserType($consumerId, $userType) { $tokenData = $this->getResource()->selectTokenByConsumerIdAndUserType($consumerId, $userType); $this->setData($tokenData ? $tokenData : []); + $this->getResource()->afterLoad($this); return $this; }
app/code/Magento/Integration/Model/Oauth/Token/Provider.php+11 −8 modified@@ -11,6 +11,9 @@ use Magento\Framework\Oauth\TokenProviderInterface; use Magento\Integration\Model\Oauth\Token; +/** + * Oauth Token Provider Class + */ class Provider implements TokenProviderInterface { /** @@ -44,7 +47,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function validateConsumer($consumer) { @@ -58,7 +61,7 @@ public function validateConsumer($consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function createRequestToken($consumer) { @@ -73,7 +76,7 @@ public function createRequestToken($consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateRequestToken($requestToken, $consumer, $oauthVerifier) { @@ -99,7 +102,7 @@ public function validateRequestToken($requestToken, $consumer, $oauthVerifier) } /** - * {@inheritdoc} + * @inheritdoc */ public function getAccessToken($consumer) { @@ -118,7 +121,7 @@ public function getAccessToken($consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateAccessTokenRequest($accessToken, $consumer) { @@ -144,7 +147,7 @@ public function validateAccessTokenRequest($accessToken, $consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateAccessToken($accessToken) { @@ -168,15 +171,15 @@ public function validateAccessToken($accessToken) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateOauthToken($oauthToken) { return strlen($oauthToken) == \Magento\Framework\Oauth\Helper\Oauth::LENGTH_TOKEN; } /** - * {@inheritdoc} + * @inheritdoc */ public function getConsumerByKey($consumerKey) {
app/code/Magento/Integration/Model/ResourceModel/Oauth/Consumer.php+52 −1 modified@@ -5,17 +5,32 @@ */ namespace Magento\Integration\Model\ResourceModel\Oauth; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Encryption\Encryptor; + +/** + * Consumer ResourceModel Class + */ class Consumer extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { + + /** + * @var Encryptor + */ + private $encryptor; + /** * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param string $connectionName + * @param Encryptor $encryptor */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, - $connectionName = null + $connectionName = null, + Encryptor $encryptor = null ) { parent::__construct($context, $connectionName); + $this->encryptor = $encryptor ?? ObjectManager::getInstance()->get(Encryptor::class); } /** @@ -61,4 +76,40 @@ public function getTimeInSecondsSinceCreation($consumerId) return $connection->fetchOne($select); } + + /** + * @inheritdoc + */ + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->encrypt($object->getSecret())); + } + + return parent::_beforeSave($object); + } + + /** + * @inheritdoc + */ + protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterLoad($object); + } + + /** + * @inheritdoc + */ + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterSave($object); + } }
app/code/Magento/Integration/Model/ResourceModel/Oauth/Token.php+50 −1 modified@@ -6,6 +6,9 @@ namespace Magento\Integration\Model\ResourceModel\Oauth; use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\App\ObjectManager; /** * OAuth token resource model @@ -24,20 +27,28 @@ class Token extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb */ protected $date; + /** + * @var Encryptor + */ + private $encryptor; + /** * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param string $connectionName + * @param Encryptor $encryptor */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Stdlib\DateTime\DateTime $date, - $connectionName = null + $connectionName = null, + $encryptor = null ) { $this->_dateTime = $dateTime; $this->date = $date; + $this->encryptor = $encryptor ?? ObjectManager::getInstance()->get(Encryptor::class); parent::__construct($context, $connectionName); } @@ -195,4 +206,42 @@ public function selectTokenByCustomerId($customerId) ->where('user_type = ?', UserContextInterface::USER_TYPE_CUSTOMER); return $connection->fetchRow($select); } + + /** + * @inheritdoc + */ + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + + if (!empty($object->getSecret())) { + $object->setSecret($this->encryptor->encrypt($object->getSecret())); + } + } + return parent::_beforeSave($object); + } + + /** + * @inheritdoc + */ + protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterLoad($object); + } + + /** + * @inheritdoc + */ + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterSave($object); + } }
app/code/Magento/Integration/Setup/Patch/Data/UpgradeConsumerSecret.php+133 −0 added@@ -0,0 +1,133 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Integration\Setup\Patch\Data; + +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Magento\Framework\Setup\Patch\PatchVersionInterface; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer\Collection as ConsumerCollection; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer\CollectionFactory as ConsumerCollectionFactory; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer; +use Psr\Log\LoggerInterface; + +/** + * Upgrades Oauth Consumer Secret if not encrypted + */ +class UpgradeConsumerSecret implements DataPatchInterface, PatchVersionInterface +{ + + /** + * @var ConsumerCollection + */ + private $consumerCollection; + + /** + * @var Encryptor + */ + private $encryptor; + + /** + * @var Consumer + */ + private $consumerResourceModel; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /**#@+ + * Constant for batch size limit + */ + private const BATCH_SIZE = 100; + /**#@-*/ + + /** + * Constructor + * + * @param ConsumerCollectionFactory $consumerCollectionFactory + * @param Encryptor $encryptor + * @param Consumer $consumerResourceModel + * @param LoggerInterface $logger + */ + public function __construct( + ConsumerCollectionFactory $consumerCollectionFactory, + Encryptor $encryptor, + Consumer $consumerResourceModel, + LoggerInterface $logger + ) { + + $this->consumerCollection= $consumerCollectionFactory->create(); + $this->encryptor = $encryptor; + $this->consumerResourceModel = $consumerResourceModel; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + $this->consumerCollection->addFieldToSelect('entity_id'); + $this->consumerCollection->addFieldToSelect('secret'); + $connection = $this->consumerResourceModel->getConnection(); + $this->consumerCollection->setPageSize(self::BATCH_SIZE); + $pages = $this->consumerCollection->getLastPageNumber(); + $tableName = $this->consumerResourceModel->getMainTable(); + + for ($currentPage = 1; $currentPage <= $pages; $currentPage++) { + $this->consumerCollection->setCurPage($currentPage); + + /** @var $consumer Consumer */ + foreach ($this->consumerCollection as $consumer) { + $existingSecret = $consumer->getSecret(); + $entityId = $consumer->getEntityId(); + + if ($entityId && $existingSecret) { + if (strlen($existingSecret) <= OauthHelper::LENGTH_TOKEN_SECRET) { + $data = ['secret' => $this->encryptor->encrypt($existingSecret)]; + $where = ['entity_id = ?' => $entityId]; + try { + $connection->update($tableName, $data, $where); + } catch (\Exception $exception) { + $this->logger->critical($exception->getMessage()); + return $this; + } + } + } + } + $this->consumerCollection->clear(); + } + + return $this; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public static function getVersion() + { + return '2.0.0'; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Integration/Setup/Patch/Data/UpgradeOauthToken.php+136 −0 added@@ -0,0 +1,136 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Integration\Setup\Patch\Data; + +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Magento\Framework\Setup\Patch\PatchVersionInterface; +use Magento\Integration\Model\ResourceModel\Oauth\Token\Collection as TokenCollection; +use Magento\Integration\Model\ResourceModel\Oauth\Token\CollectionFactory as TokenCollectionFactory; +use Magento\Integration\Model\ResourceModel\Oauth\Token; +use Magento\Integration\Model\Oauth\Token as TokenModel; +use Psr\Log\LoggerInterface; + +/** + * Upgrades Oauth Access Token Secret if not encrypted + */ +class UpgradeOauthToken implements DataPatchInterface, PatchVersionInterface +{ + + /** + * @var TokenCollection + */ + private $tokenCollection; + + /** + * @var Encryptor + */ + private $encryptor; + + /** + * @var Token + */ + private $tokenResourceModel; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /**#@+ + * Constant for batch size limit + */ + private const BATCH_SIZE = 100; + /**#@-*/ + + /** + * Constructor + * + * @param TokenCollectionFactory $tokenCollectionFactory + * @param Encryptor $encryptor + * @param Token $tokenResourceModel + * @param LoggerInterface $logger + */ + public function __construct( + TokenCollectionFactory $tokenCollectionFactory, + Encryptor $encryptor, + Token $tokenResourceModel, + LoggerInterface $logger + ) { + + $this->tokenCollection= $tokenCollectionFactory->create(); + $this->encryptor = $encryptor; + $this->tokenResourceModel = $tokenResourceModel; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + $this->tokenCollection->addFieldToSelect('entity_id'); + $this->tokenCollection->addFieldToSelect('secret'); + $this->tokenCollection->addFieldToSelect('type'); + $this->tokenCollection->setPageSize(self::BATCH_SIZE); + $connection = $this->tokenResourceModel->getConnection(); + $pages = $this->tokenCollection->getLastPageNumber(); + $tableName = $this->tokenResourceModel->getMainTable(); + + for ($currentPage = 1; $currentPage <= $pages; $currentPage++) { + $this->tokenCollection->setCurPage($currentPage); + + /** @var $token Token */ + foreach ($this->tokenCollection as $token) { + $existingSecret = $token->getSecret(); + $entityId = $token->getEntityId(); + $type = strtolower($token->getType()); + + if ($entityId && $existingSecret && $type === TokenModel::TYPE_ACCESS) { + if (strlen($existingSecret) <= OauthHelper::LENGTH_TOKEN_SECRET) { + $data = ['secret' => $this->encryptor->encrypt($existingSecret)]; + $where = ['entity_id = ?' => $entityId, 'type = ?' => 'access']; + try { + $connection->update($tableName, $data, $where); + } catch (\Exception $exception) { + $this->logger->critical($exception->getMessage()); + return $this; + } + } + } + } + $this->tokenCollection->clear(); + } + return $this; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public static function getVersion() + { + return '2.0.0'; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Integration/Test/Unit/Model/Oauth/TokenTest.php+2 −1 modified@@ -123,7 +123,8 @@ protected function setUp(): void 'selectTokenByConsumerIdAndUserType', 'selectTokenByAdminId', 'selectTokenByCustomerId', - 'load' + 'load', + 'afterLoad' ] ) ->disableOriginalConstructor()
app/code/Magento/LayeredNavigation/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Marketplace/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-marketplace", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/MediaGalleryApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-api", "description": "Magento module responsible for media gallery asset attributes storage and management", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGallery/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery", "description": "Magento module responsible for media handling", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-cms": "*", - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-media-gallery-api": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-catalog": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaStorage/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-media-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/MediaStorage/Model/File/Storage/Config.php+7 −1 modified@@ -10,6 +10,9 @@ use Magento\Framework\Filesystem\File\Write; use Magento\Framework\Exception\FileSystemException; +/** + * Media storage file storage config + */ class Config { /** @@ -34,14 +37,17 @@ class Config protected $rootDirectory; /** + * Config constructor. + * * @param \Magento\MediaStorage\Model\File\Storage $storage * @param \Magento\Framework\Filesystem $filesystem * @param string $cacheFile + * @throws FileSystemException */ public function __construct( \Magento\MediaStorage\Model\File\Storage $storage, \Magento\Framework\Filesystem $filesystem, - $cacheFile + string $cacheFile ) { $this->config = $storage->getScriptConfig(); $this->rootDirectory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
app/code/Magento/MediaStorage/Model/File/Storage.php+6 −5 modified@@ -11,7 +11,7 @@ use Magento\Framework\Model\AbstractModel; /** - * Class Storage + * Media File Storage * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @api @@ -156,8 +156,8 @@ public function getSyncFlag() /** * Retrieve storage model - * If storage not defined - retrieve current storage * + * If storage not defined - retrieve current storage * params = array( * connection => string, - define connection for model if needed * init => bool - force initialization process for storage model @@ -289,9 +289,10 @@ public function getScriptConfig() $config['media_directory'] = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath(); $allowedResources = $this->_coreConfig->getValue(self::XML_PATH_MEDIA_RESOURCE_WHITELIST, 'default'); - foreach ($allowedResources as $allowedResource) { - $config['allowed_resources'][] = $allowedResource; - } + array_walk_recursive($allowedResources, function ($value) use (&$resources) { + $resources[] = $value; + }, $resources); + $config['allowed_resources'] = $resources; $config['update_time'] = $this->_scopeConfig->getValue( self::XML_PATH_MEDIA_UPDATE_TIME,
app/code/Magento/MessageQueue/composer.json+8 −6 modified@@ -1,19 +1,20 @@ { "name": "magento/module-message-queue", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Msrp/composer.json+15 −13 modified@@ -1,27 +1,28 @@ { "name": "magento/module-msrp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-downloadable": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*" }, "suggest": { - "magento/module-bundle": "*", - "magento/module-msrp-sample-data": "*" + "magento/module-bundle": "100.3.*", + "magento/module-msrp-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/MsrpConfigurableProduct/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-msrp-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-configurable-product": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-msrp": "100.3.*", + "magento/module-configurable-product": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/MsrpGroupedProduct/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-msrp-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-grouped-product": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-msrp": "100.3.*", + "magento/module-grouped-product": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Multishipping/composer.json+18 −16 modified@@ -1,28 +1,29 @@ { "name": "magento/module-multishipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-captcha": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-captcha": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php+2 −3 modified@@ -508,8 +508,7 @@ public function setShippingItemsInformation($info) protected function _addShippingItem($quoteItemId, $data) { $qty = isset($data['qty']) ? (int)$data['qty'] : 1; - //$qty = $qty > 0 ? $qty : 1; - $addressId = isset($data['address']) ? $data['address'] : false; + $addressId = isset($data['address']) ? (int)$data['address'] : false; $quoteItem = $this->getQuote()->getItemById($quoteItemId); if ($addressId && $quoteItem) { @@ -1118,7 +1117,7 @@ function ($address) { $this->getCustomer()->getAddresses() ); - return !is_numeric($addressId) || in_array($addressId, $applicableAddressIds); + return in_array($addressId, $applicableAddressIds); } /**
app/code/Magento/MysqlMq/composer.json+9 −7 modified@@ -1,20 +1,21 @@ { "name": "magento/module-mysql-mq", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", - "magento/module-store": "*", + "magento/module-store": "101.0.*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/NewRelicReporting/composer.json+14 −12 modified@@ -1,25 +1,26 @@ { "name": "magento/module-new-relic-reporting", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-configurable-product": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php+1 −1 modified@@ -14,7 +14,7 @@ class Preview extends \Magento\Newsletter\Block\Adminhtml\Template\Preview { /** - * {@inheritdoc} + * @var string */ protected $profilerName = "newsletter_queue_proccessing";
app/code/Magento/Newsletter/composer.json+16 −14 modified@@ -1,26 +1,27 @@ { "name": "magento/module-newsletter", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-email": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-widget": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-cms": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-email": "101.0.*", + "magento/module-require-js": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-widget": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/Newsletter/Console/Command/TemplateCheckCommand.php+78 −0 added@@ -0,0 +1,78 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Newsletter\Console\Command; + +use Magento\Email\Console\Command\DatabaseTemplateCompatibilityCommand; +use Magento\Email\Model\ResourceModel\Template\CollectionFactory as EmailCollectionFactory; +use Magento\Newsletter\Model\ResourceModel\Template\CollectionFactory; +use Magento\Email\Model\Template\VariableCompatibilityChecker; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Magento\Framework\Console\Cli; + +/** + * Scan DB templates for directive incompatibilities + */ +class TemplateCheckCommand extends DatabaseTemplateCompatibilityCommand +{ + /** + * @var CollectionFactory + */ + private $templateCollection; + + /** + * Constructor + * + * @param VariableCompatibilityChecker $compatibilityChecker + * @param EmailCollectionFactory $templateCollection + * @param CollectionFactory $newsletterCollectionFactory + * @param string|null $name + */ + public function __construct( + VariableCompatibilityChecker $compatibilityChecker, + EmailCollectionFactory $templateCollection, + CollectionFactory $newsletterCollectionFactory, + string $name = null + ) { + parent::__construct($compatibilityChecker, $templateCollection, $name); + + $this->templateCollection = $newsletterCollectionFactory; + } + + /** + * @inheritdoc + */ + protected function configure() + { + $this->setName('dev:email:newsletter-compatibility-check') + ->setDescription('Scans newsletter templates for potential variable usage compatibility issues'); + } + + /** + * Executes compatibility checker command + * + * @param InputInterface $input + * @param OutputInterface $output + * @return int|null + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $collection = $this->templateCollection->create(); + $collection->load(); + + $this->hasErrors = false; + foreach ($collection as $template) { + $this->checkTemplate($template, $output); + } + + if (!$this->hasErrors) { + $output->writeln('<info>No errors detected</info>'); + } + return $this->hasErrors ? Cli::RETURN_FAILURE : Cli::RETURN_SUCCESS; + } +}
app/code/Magento/Newsletter/etc/di.xml+7 −0 modified@@ -25,4 +25,11 @@ <plugin name="update_newsletter_subscription_on_customer_update" type="Magento\Newsletter\Model\Plugin\CustomerPlugin"/> </type> + <type name="Magento\Framework\Console\CommandListInterface"> + <arguments> + <argument name="commands" xsi:type="array"> + <item name="newsletterCompatibilityCheck" xsi:type="object">Magento\Newsletter\Console\Command\TemplateCheckCommand</item> + </argument> + </arguments> + </type> </config>
app/code/Magento/Newsletter/Model/Template.php+3 −10 modified@@ -40,8 +40,9 @@ class Template extends \Magento\Email\Model\AbstractTemplate /** * Mail object * - * @deprecated 100.3.0 Unused property + * @var \Zend_Mail * + * @deprecated 100.3.0 Unused property */ protected $_mail; @@ -60,8 +61,6 @@ class Template extends \Magento\Email\Model\AbstractTemplate protected $_request; /** - * Filter factory - * * @var \Magento\Newsletter\Model\Template\FilterFactory */ protected $_filterFactory; @@ -203,13 +202,7 @@ public function getProcessedTemplateSubject(array $variables) $filter = $this->getTemplateFilter(); $filter->setVariables($variables); - $previousStrictMode = $filter->setStrictMode( - !$this->getData('is_legacy') && is_numeric($this->getTemplateId()) - ); - $result = $filter->filter($this->getTemplateSubject()); - $filter->setStrictMode($previousStrictMode); - - return $result; + return $filter->filter($this->getTemplateSubject()); } /**
app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php+2 −13 modified@@ -111,7 +111,7 @@ protected function setUp(): void ->getMock(); $this->store = $this->getMockBuilder(\Magento\Store\Model\Store::class) - ->setMethods(['getFrontendName', 'getId']) + ->setMethods(['getFrontendName', 'getId', 'getFormattedAddress']) ->disableOriginalConstructor() ->getMock(); @@ -221,11 +221,6 @@ public function testGetProcessedTemplateSubject() ->with($templateSubject) ->willReturn($expectedResult); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(false)], [$this->equalTo(true)]) - ->willReturnOnConsecutiveCalls(true, false); - $variables = ['key' => 'value']; $filterTemplate->expects($this->once()) ->method('setVariables') @@ -262,8 +257,7 @@ class_exists(\Magento\Newsletter\Model\Template\Filter::class, true); 'setStoreId', 'filter', 'getStoreId', - 'getInlineCssFiles', - 'setStrictMode', + 'getInlineCssFiles' ] ) ->disableOriginalConstructor() @@ -289,11 +283,6 @@ class_exists(\Magento\Newsletter\Model\Template\Filter::class, true); ->method('getStoreId') ->willReturn($storeId); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(true)], [$this->equalTo(false)]) - ->willReturnOnConsecutiveCalls(false, true); - // The following block of code tests to ensure that the store id of the subscriber will be used, if the // 'subscriber' variable is set. $subscriber = $this->getMockBuilder(\Magento\Newsletter\Model\Subscriber::class)
app/code/Magento/OfflinePayments/composer.json+11 −9 modified@@ -1,23 +1,24 @@ { "name": "magento/module-offline-payments", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-payment": "100.3.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/OfflineShipping/composer.json+19 −17 modified@@ -1,31 +1,32 @@ { "name": "magento/module-offline-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-sales-rule": "101.1.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-checkout": "*", - "magento/module-offline-shipping-sample-data": "*" + "magento/module-checkout": "100.3.*", + "magento/module-offline-shipping-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/PageCache/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-page-cache", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Payment/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-payment", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/PaypalCaptcha/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-paypal-captcha", "description": "Provides CAPTCHA validation for PayPal Payflow Pro", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-captcha": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-paypal": "*" + "magento/module-paypal": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Paypal/composer.json+26 −24 modified@@ -1,39 +1,40 @@ { "name": "magento/module-paypal", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-instant-purchase": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-vault": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-instant-purchase": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-vault": "101.1.*" }, "suggest": { - "magento/module-checkout-agreements": "*" + "magento/module-checkout-agreements": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -43,3 +44,4 @@ } } } +
app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php+3 −1 modified@@ -11,7 +11,8 @@ use Magento\Paypal\Model\Api\ProcessableException as ApiProcessableException; /** - * Class PlaceOrder + * Finalizes the PayPal order and executes payment + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class PlaceOrder extends \Magento\Paypal\Controller\Express\AbstractExpress @@ -99,6 +100,7 @@ public function execute() // prepare session to success or cancellation page $this->_getCheckoutSession()->clearHelperData(); + $this->_getSession()->unsQuoteId(); // "last successful quote" $quoteId = $this->_getQuote()->getId();
app/code/Magento/Paypal/Controller/Express/OnAuthorization.php+1 −7 modified@@ -113,17 +113,11 @@ public function __construct( public function execute(): ResultInterface { $controllerResult = $this->resultFactory->create(ResultFactory::TYPE_JSON); - $quoteId = $this->getRequest()->getParam('quoteId'); $payerId = $this->getRequest()->getParam('payerId'); $tokenId = $this->getRequest()->getParam('paymentToken'); - $customerId = $this->getRequest()->getParam('customerId') ?: $this->_customerSession->getId(); try { - if ($quoteId) { - $quote = $customerId ? $this->cartRepository->get($quoteId) : $this->guestCartRepository->get($quoteId); - } else { - $quote = $this->_getQuote(); - } + $quote = $this->_getQuote(); $responseContent = [ 'success' => true,
app/code/Magento/Paypal/etc/csp_whitelist.xml+11 −0 modified@@ -29,6 +29,17 @@ <values> <value id="www_paypal" type="host">www.paypal.com</value> <value id="www_sandbox_paypal" type="host">www.sandbox.paypal.com</value> + <value id="www_pilot_payflowlink_paypal" type="host">pilot-payflowlink.paypal.com</value> + </values> + </policy> + <policy id="form-action"> + <values> + <value id="www_pilot_payflowlink_paypal" type="host">pilot-payflowlink.paypal.com</value> + </values> + </policy> + <policy id="connect-src"> + <values> + <value id="www_sandbox_paypal_com" type="host">www.sandbox.paypal.com</value> </values> </policy> </policies>
app/code/Magento/PaypalGraphQl/composer.json+16 −14 modified@@ -1,28 +1,29 @@ { "name": "magento/module-paypal-graph-ql", "description": "GraphQl support for Paypal", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-paypal": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-payment": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-checkout": "100.3.*", + "magento/module-paypal": "100.3.*", + "magento/module-quote-graph-ql": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-payment": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/Paypal/view/frontend/web/js/in-context/express-checkout-smart-buttons.js+0 −2 modified@@ -85,8 +85,6 @@ define([ var params = { paymentToken: data.paymentToken, payerId: data.payerID, - quoteId: clientConfig.quoteId || '', - customerId: clientConfig.customerId || '', 'form_key': clientConfig.formKey };
app/code/Magento/Persistent/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-persistent", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-cron": "*", - "magento/module-customer": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-cron": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-page-cache": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/ProductAlert/composer.json+14 −12 modified@@ -1,26 +1,27 @@ { "name": "magento/module-product-alert", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/ProductVideo/composer.json+15 −13 modified@@ -1,28 +1,29 @@ { "name": "magento/module-product-video", "description": "Add Video to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-customer": "*", - "magento/module-config": "*" + "magento/module-customer": "102.0.*", + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/QuoteAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-quote-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.6", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-analytics": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Quote/composer.json+23 −21 modified@@ -1,35 +1,36 @@ { "name": "magento/module-quote", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7-p4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-payment": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-sales-sequence": "100.3.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } +
app/code/Magento/Quote/etc/webapi_rest/di.xml+3 −0 modified@@ -13,4 +13,7 @@ <plugin name="accessControl" type="Magento\Quote\Model\QuoteRepository\Plugin\AccessChangeQuoteControl" /> <plugin name="authorization" type="Magento\Quote\Model\QuoteRepository\Plugin\Authorization" /> </type> + <type name="Magento\Webapi\Controller\Rest\ParamsOverrider"> + <plugin name="validateQuoteData" type="Magento\Quote\Plugin\Webapi\Controller\Rest\ValidateQuoteData" sortOrder="1" disabled="false" /> + </type> </config>
app/code/Magento/Quote/etc/webapi.xml+3 −3 modified@@ -65,7 +65,7 @@ <resource ref="self" /> </resources> <data> - <parameter name="cartId" force="true">%cart_id%</parameter> + <parameter name="quote.id" force="true">%cart_id%</parameter> </data> </route> <route url="/V1/carts/mine/order" method="PUT"> @@ -237,7 +237,7 @@ <resource ref="self" /> </resources> <data> - <parameter name="cartId" force="true">%cart_id%</parameter> + <parameter name="cartItem.quote_id" force="true">%cart_id%</parameter> </data> </route> <route url="/V1/carts/mine/items/:itemId" method="PUT"> @@ -246,7 +246,7 @@ <resource ref="self" /> </resources> <data> - <parameter name="cartId" force="true">%cart_id%</parameter> + <parameter name="cartItem.quote_id" force="true">%cart_id%</parameter> </data> </route> <route url="/V1/carts/mine/items/:itemId" method="DELETE">
app/code/Magento/QuoteGraphQl/composer.json+17 −15 modified@@ -2,26 +2,27 @@ "name": "magento/module-quote-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-customer": "*", - "magento/module-customer-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-directory": "*", - "magento/module-graph-ql": "*" + "magento/framework": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-checkout": "100.3.*", + "magento/module-catalog": "103.0.*", + "magento/module-store": "101.0.*", + "magento/module-customer": "102.0.*", + "magento/module-customer-graph-ql": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-graph-ql": "100.3.*" }, "suggest": { - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql-cache": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/QuoteGraphQl/Model/Resolver/PlaceOrder.php+12 −2 modified@@ -15,6 +15,7 @@ use Magento\Framework\GraphQl\Query\ResolverInterface; use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; use Magento\Quote\Api\CartManagementInterface; +use Magento\Quote\Api\PaymentMethodManagementInterface; use Magento\QuoteGraphQl\Model\Cart\GetCartForUser; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\QuoteGraphQl\Model\Cart\CheckCartCheckoutAllowance; @@ -44,22 +45,30 @@ class PlaceOrder implements ResolverInterface */ private $checkCartCheckoutAllowance; + /** + * @var PaymentMethodManagementInterface + */ + private $paymentMethodManagement; + /** * @param GetCartForUser $getCartForUser * @param CartManagementInterface $cartManagement * @param OrderRepositoryInterface $orderRepository * @param CheckCartCheckoutAllowance $checkCartCheckoutAllowance + * @param PaymentMethodManagementInterface $paymentMethodManagement */ public function __construct( GetCartForUser $getCartForUser, CartManagementInterface $cartManagement, OrderRepositoryInterface $orderRepository, - CheckCartCheckoutAllowance $checkCartCheckoutAllowance + CheckCartCheckoutAllowance $checkCartCheckoutAllowance, + PaymentMethodManagementInterface $paymentMethodManagement ) { $this->getCartForUser = $getCartForUser; $this->cartManagement = $cartManagement; $this->orderRepository = $orderRepository; $this->checkCartCheckoutAllowance = $checkCartCheckoutAllowance; + $this->paymentMethodManagement = $paymentMethodManagement; } /** @@ -84,7 +93,8 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value } try { - $orderId = $this->cartManagement->placeOrder($cart->getId()); + $cartId = $cart->getId(); + $orderId = $this->cartManagement->placeOrder($cartId, $this->paymentMethodManagement->get($cartId)); $order = $this->orderRepository->get($orderId); return [
app/code/Magento/Quote/Model/ShippingMethodManagement.php+27 −2 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Quote\Model; use Magento\Customer\Api\AddressRepositoryInterface; @@ -25,6 +27,7 @@ use Magento\Quote\Model\Quote\Address\Rate; use Magento\Quote\Model\Quote\TotalsCollector; use Magento\Quote\Model\ResourceModel\Quote\Address as QuoteAddressResource; +use Magento\Customer\Model\Data\Address as CustomerAddress; /** * Shipping method read service @@ -38,7 +41,7 @@ class ShippingMethodManagement implements ShipmentEstimationInterface { /** - * Quote repository. + * Quote repository model. * * @var CartRepositoryInterface */ @@ -260,6 +263,8 @@ public function estimateByExtendedAddress($cartId, AddressInterface $address) /** * @inheritDoc + * @throws InputException + * @throws NoSuchEntityException */ public function estimateByAddressId($cartId, $addressId) { @@ -270,7 +275,7 @@ public function estimateByAddressId($cartId, $addressId) if ($quote->isVirtual() || 0 == $quote->getItemsCount()) { return []; } - $address = $this->addressRepository->getById($addressId); + $address = $this->getAddress($addressId, $quote); return $this->getShippingMethods($quote, $address); } @@ -375,4 +380,24 @@ private function getDataObjectProcessor() } return $this->dataProcessor; } + + /** + * Gets the address if exists for customer + * + * @param int $addressId + * @param Quote $quote + * @return CustomerAddress + * @throws InputException The shipping address is incorrect. + */ + private function getAddress(int $addressId, Quote $quote): CustomerAddress + { + $addresses = $quote->getCustomer()->getAddresses(); + foreach ($addresses as $address) { + if ($addressId === (int)$address->getId()) { + return $address; + } + } + + throw new InputException(__('The shipping address is missing. Set the address and try again.')); + } }
app/code/Magento/Quote/Plugin/Webapi/Controller/Rest/ValidateQuoteData.php+55 −0 added@@ -0,0 +1,55 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Quote\Plugin\Webapi\Controller\Rest; + +use Magento\Webapi\Controller\Rest\ParamsOverrider; + +/** + * Validates Quote Data + */ +class ValidateQuoteData +{ + private const QUOTE_KEY = 'quote'; + + /** + * Before Overriding to validate data + * + * @param ParamsOverrider $subject + * @param array $inputData + * @param array $parameters + * @return array[] + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeOverride(ParamsOverrider $subject, array $inputData, array $parameters): array + { + if (isset($inputData[self:: QUOTE_KEY])) { + $inputData[self:: QUOTE_KEY] = $this->validateInputData($inputData[self:: QUOTE_KEY]); + } + return [$inputData, $parameters]; + } + + /** + * Validates InputData + * + * @param array $inputData + * @return array + */ + private function validateInputData(array $inputData): array + { + $result = []; + + $data = array_filter($inputData, function ($k) use (&$result) { + $key = is_string($k) ? strtolower($k) : $k; + return !isset($result[$key]) && ($result[$key] = true); + }, ARRAY_FILTER_USE_KEY); + + return array_map(function ($value) { + return is_array($value) ? $this->validateInputData($value) : $value; + }, $data); + } +}
app/code/Magento/Quote/Test/Unit/Model/ShippingMethodManagementTest.php+108 −76 modified@@ -20,6 +20,8 @@ use Magento\Quote\Model\ShippingMethodManagement; use Magento\Store\Model\Store; use PHPUnit\Framework\MockObject\MockObject as MockObject; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Model\Session; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -31,16 +33,6 @@ class ShippingMethodManagementTest extends \PHPUnit\Framework\TestCase */ protected $model; - /** - * @var MockObject - */ - protected $shippingMethodMock; - - /** - * @var MockObject - */ - protected $methodDataFactoryMock; - /** * @var ShippingMethodConverter|MockObject */ @@ -96,6 +88,11 @@ class ShippingMethodManagementTest extends \PHPUnit\Framework\TestCase */ private $quoteAddressResource; + /** + * @var Session + */ + private $customerSession; + /** * @inheritdoc */ @@ -104,9 +101,10 @@ protected function setUp(): void $this->objectManager = new ObjectManager($this); $this->quoteRepository = $this->createMock(\Magento\Quote\Api\CartRepositoryInterface::class); $this->addressRepository = $this->createMock(\Magento\Customer\Api\AddressRepositoryInterface::class); + $this->customerSession = $this->createMock(Session::class); $className = \Magento\Quote\Api\Data\ShippingMethodInterfaceFactory::class; - $this->methodDataFactoryMock = $this->createPartialMock($className, ['create']); + $methodDataFactoryMock = $this->createPartialMock($className, ['create']); $className = \Magento\Customer\Api\Data\AddressInterfaceFactory::class; $this->addressFactory = $this->createPartialMock($className, ['create']); @@ -127,6 +125,7 @@ protected function setUp(): void 'collectTotals', 'save', '__wakeup', + 'getCustomer' ]) ->getMock(); @@ -163,25 +162,17 @@ protected function setUp(): void ShippingMethodManagement::class, [ 'quoteRepository' => $this->quoteRepository, - 'methodDataFactory' => $this->methodDataFactoryMock, + 'methodDataFactory' => $methodDataFactoryMock, 'converter' => $this->converter, 'totalsCollector' => $this->totalsCollector, 'addressRepository' => $this->addressRepository, 'quoteAddressResource' => $this->quoteAddressResource, + 'customerSession' => $this->customerSession, ] ); - $this->objectManager->setBackwardCompatibleProperty( - $this->model, - 'addressFactory', - $this->addressFactory - ); - - $this->objectManager->setBackwardCompatibleProperty( - $this->model, - 'dataProcessor', - $this->dataProcessor - ); + $this->objectManager->setBackwardCompatibleProperty($this->model, 'addressFactory', $this->addressFactory); + $this->objectManager->setBackwardCompatibleProperty($this->model, 'dataProcessor', $this->dataProcessor); } /** @@ -228,11 +219,11 @@ public function testGetMethod() ->with('one_two') ->willReturn($shippingRateMock); - $this->shippingMethodMock = $this->createMock(\Magento\Quote\Api\Data\ShippingMethodInterface::class); + $shippingMethodMock = $this->createMock(\Magento\Quote\Api\Data\ShippingMethodInterface::class); $this->converter->expects($this->once()) ->method('modelToDataObject') ->with($shippingRateMock, $currencyCode) - ->willReturn($this->shippingMethodMock); + ->willReturn($shippingMethodMock); $this->model->get($cartId); } @@ -345,7 +336,8 @@ public function testGetList() public function testSetMethodWithInputException() { $this->expectException(\Magento\Framework\Exception\InputException::class); - $this->expectExceptionMessage('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.'); + $exceptionMessage = 'The shipping method can\'t be set for an empty cart. Add an item to cart and try again.'; + $this->expectExceptionMessage($exceptionMessage); $cartId = 12; $carrierCode = 34; @@ -580,86 +572,126 @@ public function testEstimateByExtendedAddress() } /** + * @dataProvider getAddressDataProvider + * * @covers \Magento\Quote\Model\ShippingMethodManagement::estimateByAddressId + * @param int $cartId + * @param int $addressId + * @param int $randomAddressId + * @param bool $throwsException */ - public function testEstimateByAddressId() + public function testEstimateByAddressId($cartId, $addressId, $randomAddressId, $throwsException) { - $cartId = 1; - $addressData = [ 'region' => 'California', 'region_id' => 23, 'country_id' => 1, 'postcode' => 90200, ]; $currencyCode = 'UAH'; + $customerId = 1; - /** - * @var \Magento\Customer\Api\Data\AddressInterface|MockObject $address - */ - $address = $this->getMockBuilder(\Magento\Customer\Api\Data\AddressInterface::class) + $rate = $this->getMockBuilder(Rate::class) ->disableOriginalConstructor() + ->setMethods([]) ->getMock(); + $methodObject = $this->getMockForAbstractClass(ShippingMethodInterface::class); - $this->addressRepository->expects($this->any()) - ->method('getById') - ->willReturn($address); - - $this->addressFactory->expects($this->any()) - ->method('create') - ->willReturn($address); - - $this->quoteRepository->expects(static::once()) + $this->quoteRepository->expects(self::once()) ->method('getActive') ->with($cartId) ->willReturn($this->quote); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('isVirtual') ->willReturn(false); - $this->quote->expects(static::once()) + + $this->quote->expects(self::once()) ->method('getItemsCount') ->willReturn(1); - $this->quote->expects(static::once()) - ->method('getShippingAddress') - ->willReturn($this->shippingAddress); - - $this->dataProcessor->expects(static::any()) - ->method('buildOutputDataArray') - ->willReturn($addressData); - - $this->shippingAddress->expects(static::once()) - ->method('setCollectShippingRates') - ->with(true) - ->willReturnSelf(); + $this->setCustomerSession($addressId, $customerId); + if ($throwsException) { + $this->expectException('Magento\Framework\Exception\InputException'); + $this->expectExceptionMessage('The shipping address is missing. Set the address and try again.'); + $this->model->estimateByAddressId($cartId, $randomAddressId); + } else { + $this->quote->expects(self::once()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddress); + + $this->dataProcessor->expects(self::any()) + ->method('buildOutputDataArray') + ->willReturn($addressData); + + $this->shippingAddress->expects(self::once()) + ->method('setCollectShippingRates') + ->with(true) + ->willReturnSelf(); + + $this->totalsCollector->expects(self::once()) + ->method('collectAddressTotals') + ->with($this->quote, $this->shippingAddress) + ->willReturnSelf(); + + $expectedRates = [$methodObject]; + $this->shippingAddress->expects(self::once()) + ->method('getGroupedAllShippingRates') + ->willReturn([[$rate]]); + + $this->quote->expects(self::once()) + ->method('getQuoteCurrencyCode') + ->willReturn($currencyCode); + + $this->converter->expects(self::once()) + ->method('modelToDataObject') + ->with($rate, $currencyCode) + ->willReturn($methodObject); + + $carriersRates = $this->model->estimateByAddressId($cartId, $addressId); + self::assertEquals($expectedRates, $carriersRates); + } + } - $this->totalsCollector->expects(static::once()) - ->method('collectAddressTotals') - ->with($this->quote, $this->shippingAddress) - ->willReturnSelf(); + /** + * @return array + */ + public function getAddressDataProvider() + { + return [ + [1, 1, 5, true], + [1, 1, 1, false], + ]; + } - $rate = $this->getMockBuilder(Rate::class) + private function setCustomerSession($addressId, $customerId) + { + /** + * @var \Magento\Customer\Model\Data\Address|MockObject $address + */ + $address = $this->getMockBuilder(\Magento\Customer\Model\Data\Address::class) + ->setMethods(['getId']) ->disableOriginalConstructor() - ->setMethods([]) ->getMock(); - $methodObject = $this->getMockForAbstractClass(ShippingMethodInterface::class); - $expectedRates = [$methodObject]; + $address->expects($this->atLeastOnce()) + ->method('getId') + ->willReturn($addressId); - $this->shippingAddress->expects(static::once()) - ->method('getGroupedAllShippingRates') - ->willReturn([[$rate]]); + $this->addressRepository->expects($this->any()) + ->method('getById') + ->willReturn($address); - $this->quote->expects(static::once()) - ->method('getQuoteCurrencyCode') - ->willReturn($currencyCode); + $this->addressFactory->expects($this->any()) + ->method('create') + ->willReturn($address); - $this->converter->expects(static::once()) - ->method('modelToDataObject') - ->with($rate, $currencyCode) - ->willReturn($methodObject); + $customerAddresses = [$address]; + $customerMock = $this->getMockForAbstractClass(CustomerInterface::class); + $customerMock->method('getAddresses')->willReturn($customerAddresses); - $carriersRates = $this->model->estimateByAddressId($cartId, $address); - static::assertEquals($expectedRates, $carriersRates); + $this->quote->method('getCustomer')->willReturn($customerMock); + $this->customerSession->method('getCustomerId')->willReturn($customerId); + $this->customerSession->expects(self::any())->method('isLoggedIn')->willReturn(true); + $this->customerSession->expects(self::any())->method('getCustomerData')->willReturn($customerMock); } }
app/code/Magento/Quote/Test/Unit/Plugin/Webapi/Controller/Rest/ValidateQuoteDataTest.php+114 −0 added@@ -0,0 +1,114 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Test\Unit\Plugin\Webapi\Controller\Rest; + +use Exception; +use Magento\Framework\App\ObjectManager; +use Magento\Quote\Plugin\Webapi\Controller\Rest\ValidateQuoteData; +use PHPUnit\Framework\TestCase; +use ReflectionClass; + +/** + * Unit test for ValidateQuoteData plugin + */ +class ValidateQuoteDataTest extends TestCase +{ + + /** + * @var ValidateQuoteData + */ + private $validateQuoteDataObject; + + /** + * @var ReflectionClass + * + */ + private $reflectionObject; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->validateQuoteDataObject = ObjectManager::getInstance()->get(ValidateQuoteData::class); + $this->reflectionObject = new ReflectionClass(get_class($this->validateQuoteDataObject)); + } + /** + * Test if the quote array is valid + * + * @param array $array + * @param array $result + * @dataProvider dataProviderInputData + * @throws Exception + */ + public function testValidateInputData(array $array, array $result) + { + $this->assertEquals( + $result, + $this->invokeValidateInputData('validateInputData', [$array]) + ); + } + + /** + * @param string $methodName + * @param array $arguments + * @return mixed + * @throws Exception + */ + private function invokeValidateInputData(string $methodName, array $arguments = []) + { + $validateInputDataMethod = $this->reflectionObject->getMethod($methodName); + $validateInputDataMethod->setAccessible(true); + return $validateInputDataMethod->invokeArgs($this->validateQuoteDataObject, $arguments); + } + + /** + * @return array + */ + public function dataProviderInputData(): array + { + return [ + [ + ['person' => + [ + 'id' => -1, + 'Id' => 1, + 'name' => + [ + 'firstName' => 'John', + 'LastName' => 'S' + ], + 'isHavingVehicle' => 1, + 'address' => + [ + 'street' => '4th Street', + 'Street' => '2nd Street', + 'city' => 'Atlanta' + ], + ] + ], + ['person' => + [ + 'id' => -1, + 'name' => + [ + 'firstName' => 'John', + 'LastName' => 'S' + ], + 'isHavingVehicle' => 1, + 'address' => + [ + 'street' => '4th Street', + 'city' => 'Atlanta' + ], + ] + ], + ] + ]; + } +}
app/code/Magento/RelatedProductGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-related-product-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" + "magento/module-catalog": "103.0.*", + "magento/module-catalog-graph-ql": "100.3.*", + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/ReleaseNotification/composer.json+12 −10 modified@@ -1,21 +1,22 @@ { "name": "magento/module-release-notification", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-user": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/framework": "*" - }, - "suggest": { - "magento/module-config": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-user": "101.1.*", + "magento/module-backend": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/framework": "102.0.*" + }, + "suggest": { + "magento/module-config": "101.1.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Reports/composer.json+24 −22 modified@@ -1,34 +1,35 @@ { "name": "magento/module-reports", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-review": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-downloadable": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-quote": "101.1.*", + "magento/module-review": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-sales-rule": "101.1.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-widget": "101.1.*", + "magento/module-wishlist": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -38,3 +39,4 @@ } } } +
app/code/Magento/RequireJs/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-require-js", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/ReviewAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-review-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-review": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-review": "100.3.*", + "magento/module-analytics": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Review/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-review", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-newsletter": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-newsletter": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-review-sample-data": "*" + "magento/module-cookie": "100.3.*", + "magento/module-review-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Robots/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-robots", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Rss/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-rss", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Rule/composer.json+12 −10 modified@@ -1,23 +1,24 @@ { "name": "magento/module-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-eav": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/SalesAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-sales-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-sales": "102.0.*", + "magento/module-analytics": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Sales/composer.json+33 −31 modified@@ -1,45 +1,46 @@ { "name": "magento/module-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.7-p4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales-rule": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-bundle": "100.3.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-gift-message": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-reports": "100.3.*", + "magento/module-sales-rule": "101.1.*", + "magento/module-sales-sequence": "100.3.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-theme": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-widget": "101.1.*", + "magento/module-wishlist": "101.1.*" }, "suggest": { - "magento/module-sales-sample-data": "*" + "magento/module-sales-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -49,3 +50,4 @@ } } } +
app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php+4 −5 modified@@ -20,12 +20,12 @@ class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements Ht * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Sales::comment'; + public const ADMIN_RESOURCE = 'Magento_Sales::comment'; /** * ACL resource needed to send comment email notification */ - const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails'; + public const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails'; /** * Add order comment action @@ -52,13 +52,12 @@ public function execute() $notify = false; } - $history = $order->addStatusHistoryComment($data['comment'], $data['status']); + $comment = trim(strip_tags($data['comment'])); + $history = $order->addStatusHistoryComment($comment, $data['status']); $history->setIsVisibleOnFront($visible); $history->setIsCustomerNotified($notify); $history->save(); - $comment = trim(strip_tags($data['comment'])); - $order->save(); /** @var OrderCommentSender $orderCommentSender */ $orderCommentSender = $this->_objectManager
app/code/Magento/SalesGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-sales-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.4", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-sales": "102.0.*", + "magento/module-graph-ql": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/SalesInventory/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-sales-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/SalesRule/composer.json+28 −26 modified@@ -1,40 +1,41 @@ { "name": "magento/module-sales-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-rule": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-authorization": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-rule": "101.1.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-reports": "100.3.*", + "magento/module-rule": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-widget": "101.1.*", + "magento/module-captcha": "100.3.*", + "magento/module-checkout": "100.3.*", + "magento/module-authorization": "100.3.*" }, "suggest": { - "magento/module-sales-rule-sample-data": "*" + "magento/module-sales-rule-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -44,3 +45,4 @@ } } } +
app/code/Magento/SalesSequence/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-sales-sequence", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_track.xml+1 −1 modified@@ -8,7 +8,7 @@ <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <update handle="sales_email_order_shipment_renderers"/> <body> - <block class="Magento\Sales\Block\Order\Email\Shipment\Items" name="sales.order.email.shipment.track" template="Magento_Sales::email/shipment/track.phtml"> + <block class="Magento\Sales\Block\Order\Email\Shipment\Items" name="sales.order.email.shipment.track" template="Magento_Sales::email/shipment/track.phtml" cacheable="false"> <arguments> <argument name="tracking_url" xsi:type="object">Magento\Sales\Block\DataProviders\Email\Shipment\TrackingUrl</argument> </arguments>
app/code/Magento/Sales/view/frontend/layout/sales_guest_printshipment.xml+1 −1 modified@@ -15,7 +15,7 @@ <block class="Magento\Sales\Block\Order\PrintOrder\Shipment" name="order.date" template="Magento_Sales::order/order_date.phtml" /> </referenceContainer> <referenceContainer name="content"> - <block class="Magento\Sales\Block\Order\PrintOrder\Shipment" name="sales.order.print.shipment" template="Magento_Sales::order/print/shipment.phtml"> + <block class="Magento\Sales\Block\Order\PrintOrder\Shipment" name="sales.order.print.shipment" template="Magento_Sales::order/print/shipment.phtml" cacheable="false"> <block class="Magento\Framework\View\Element\RendererList" name="sales.order.print.shipment.renderers" as="renderer.list" /> </block> </referenceContainer>
app/code/Magento/SampleData/composer.json+9 −7 modified@@ -1,21 +1,22 @@ { "name": "magento/module-sample-data", "description": "Sample Data fixtures", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, "suggest": { - "magento/sample-data-media": "*" + "magento/sample-data-media": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Search/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-search": "*", - "magento/module-reports": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog-search": "101.0.*", + "magento/module-reports": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Security/Block/Config/Backend/Session/SessionSize.php+76 −0 added@@ -0,0 +1,76 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** + * System config email field backend model + */ +declare(strict_types=1); + +namespace Magento\Security\Block\Config\Backend\Session; + +use Magento\Backend\Block\Template\Context; +use Magento\Config\Block\System\Config\Form\Field; +use Magento\Framework\Data\Form\Element\AbstractElement; +use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Serialize\Serializer\Json; + +/** + * Backend Model for Max Session Size + */ +class SessionSize extends Field +{ + /** + * @var Json + */ + private $json; + + /** + * @param Context $context + * @param Json $json + * @param array $data + */ + public function __construct( + Context $context, + Json $json, + array $data = [] + ) { + parent::__construct($context, $data); + $this->json = $json; + } + + /** + * @inheritdoc + */ + protected function _getElementHtml(AbstractElement $element) + { + $html = parent::_getElementHtml($element); + $originalData = $element->getOriginalData(); + $maxSessionSizeAdminSelector = '#' . $element->getHtmlId(); + $jsString = '<script type="text/x-magento-init"> {"' . + $maxSessionSizeAdminSelector . '": { + "Magento_Security/js/system/config/session-size": {"modalTitleText": ' . + $this->json->serialize(__($originalData['modal_title_text'])) . ', "modalContentBody": ' . + $this->json->serialize($this->getModalContentBody($originalData['modal_content_body_path'])) + . '}}}</script>'; + + $html .= $jsString; + return $html; + } + + /** + * Get HTML for the modal content body when user switches to disable + * + * @param string $templatePath + * @return string + * @throws ValidatorException + */ + private function getModalContentBody(string $templatePath) + { + $templateFileName = $this->getTemplateFile($templatePath); + + return $this->fetchView($templateFileName); + } +}
app/code/Magento/Security/composer.json+13 −10 modified@@ -1,24 +1,26 @@ { "name": "magento/module-security", "description": "Security management module", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "102.0.*", + "magento/module-config": "101.1.*", + "magento/module-backend": "101.0.*", + "magento/module-store": "101.0.*", + "magento/module-user": "101.1.*" }, "suggest": { - "magento/module-customer": "*" + "magento/module-customer": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +30,4 @@ } } } +
app/code/Magento/Security/etc/adminhtml/system.xml+23 −0 modified@@ -36,6 +36,29 @@ </field> </group> </section> + <section id="system"> + <group id="security" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Security</label> + <field id="max_session_size_admin" translate="label" type="text" sortOrder="1" showInDefault="1" canRestore="1"> + <label>Max Session Size in Admin</label> + <attribute type="modal_title_text">Are You Sure About Your Max Session Size in Admin Settings?</attribute> + <attribute type="modal_content_body_path">Magento_Security::system/config/session_size_admin/modal_content_body.phtml</attribute> + <validate>required-entry validate-zero-or-greater validate-digits</validate> + <frontend_model>Magento\Security\Block\Config\Backend\Session\SessionSize</frontend_model> + <backend_model>Magento\Security\Model\Config\Backend\Session\SessionSize</backend_model> + <comment>Limit the maximum session size in bytes. Use 0 to disable.</comment> + </field> + <field id="max_session_size_storefront" translate="label" type="text" sortOrder="2" showInDefault="1" canRestore="1"> + <label>Max Session Size in Storefront</label> + <attribute type="modal_title_text">Are You Sure About Your Max Session Size in Storefront Settings?</attribute> + <attribute type="modal_content_body_path">Magento_Security::system/config/session_size_storefront/modal_content_body.phtml</attribute> + <validate>required-entry validate-zero-or-greater validate-digits</validate> + <frontend_model>Magento\Security\Block\Config\Backend\Session\SessionSize</frontend_model> + <backend_model>Magento\Security\Model\Config\Backend\Session\SessionSize</backend_model> + <comment>Limit the maximum session size in bytes. Use 0 to disable.</comment> + </field> + </group> + </section> <section id="customer"> <group id="password"> <field id="password_reset_protection_type" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
app/code/Magento/Security/etc/config.xml+6 −0 modified@@ -15,6 +15,12 @@ <min_time_between_password_reset_requests>10</min_time_between_password_reset_requests> </security> </admin> + <system> + <security> + <max_session_size_admin>256000</max_session_size_admin> + <max_session_size_storefront>256000</max_session_size_storefront> + </security> + </system> <customer> <password> <password_reset_protection_type>1</password_reset_protection_type>
app/code/Magento/Security/etc/db_schema.xml+2 −1 modified@@ -10,7 +10,8 @@ <table name="admin_user_session" resource="default" engine="innodb" comment="Admin User sessions table"> <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Entity ID"/> - <column xsi:type="varchar" name="session_id" nullable="false" length="128" comment="Session ID value"/> + <column xsi:type="varchar" name="session_id" nullable="true" length="1" + comment="Deprecated: Session ID value no longer used"/> <column xsi:type="int" name="user_id" padding="10" unsigned="true" nullable="true" identity="false" comment="Admin User ID"/> <column xsi:type="smallint" name="status" padding="5" unsigned="true" nullable="false" identity="false"
app/code/Magento/Security/Model/AdminSessionInfo.php+2 −1 modified@@ -3,12 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Security\Model; /** * Admin Session Info Model * - * @method string getSessionId() * @method int getUserId() getUserId() * @method int getStatus() * @method string getUpdatedAt()
app/code/Magento/Security/Model/AdminSessionsManager.php+13 −10 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Security\Model; @@ -14,6 +15,7 @@ * * @api * @since 100.1.0 + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class AdminSessionsManager { @@ -114,7 +116,7 @@ public function processLogin() $result = $this->createAdminSessionInfoCollection()->updateActiveSessionsStatus( AdminSessionInfo::LOGGED_OUT_BY_LOGIN, $this->getCurrentSession()->getUserId(), - $this->getCurrentSession()->getSessionId(), + $this->getCurrentSession()->getId(), $olderThen ); if ($result) { @@ -174,7 +176,7 @@ public function getCurrentSession() { if (!$this->currentSession) { $this->currentSession = $this->adminSessionInfoFactory->create(); - $this->currentSession->load($this->authSession->getSessionId(), 'session_id'); + $this->currentSession->load($this->authSession->getAdminSessionInfoId(), 'id'); } return $this->currentSession; @@ -256,7 +258,7 @@ public function logoutOtherUserSessions() ->filterByUser( $this->authSession->getUser()->getId(), \Magento\Security\Model\AdminSessionInfo::LOGGED_IN, - $this->authSession->getSessionId() + $this->authSession->getAdminSessionInfoId() ) ->filterExpiredSessions($this->securityConfig->getAdminSessionLifetime()) ->loadData(); @@ -290,22 +292,26 @@ public function cleanExpiredSessions() */ protected function createNewSession() { - $this->adminSessionInfoFactory + $adminSessionInfo = $this->adminSessionInfoFactory ->create() ->setData( [ - 'session_id' => $this->authSession->getSessionId(), 'user_id' => $this->authSession->getUser()->getId(), 'ip' => $this->remoteAddress->getRemoteAddress(), 'status' => AdminSessionInfo::LOGGED_IN ] )->save(); + $this->authSession->setAdminSessionInfoId($adminSessionInfo->getId()); + return $this; } /** + * Creates admin session information collection + * * @return \Magento\Security\Model\ResourceModel\AdminSessionInfo\Collection + * * @since 100.1.0 */ protected function createAdminSessionInfoCollection() @@ -314,11 +320,8 @@ protected function createAdminSessionInfoCollection() } /** - * Calculates diff between now and last session updated_at - * and decides whether new prolong must be triggered or not - * - * This is done to limit amount of session prolongs and updates to database - * within some period of time - X + * Calculates diff between now and last session updated_at and decides whether new prolong must be triggered or not + * This is done to limit amount of session prolongs and updates to database within some period of time - X * X - is calculated in getIntervalBetweenConsecutiveProlongs() * * @see getIntervalBetweenConsecutiveProlongs()
app/code/Magento/Security/Model/Config/Backend/Session/SessionSize.php+40 −0 added@@ -0,0 +1,40 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** + * System config email field backend model + */ +declare(strict_types=1); + +namespace Magento\Security\Model\Config\Backend\Session; + +use Magento\Framework\App\Config\Value; + +/** + * Backend Model for Max Session Size + */ +class SessionSize extends Value +{ + /** + * Handles the before save event + * + * @return $this + */ + public function beforeSave() + { + $value = $this->getValue(); + if ($value === '0') { + $value = 0; + } else { + $value = (int)$value; + if ($value === null || $value <= 0) { + $value = 256000; + } + } + $this->setValue((string)$value); + return $this; + } +}
app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php+3 −1 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Security\Model\ResourceModel\AdminSessionInfo; /** @@ -103,7 +105,7 @@ public function filterByUser( $this->addFieldToFilter('user_id', $userId); $this->addFieldToFilter('status', $status); if (null !== $sessionIdToExclude) { - $this->addFieldToFilter('session_id', ['neq' => $sessionIdToExclude]); + $this->addFieldToFilter('id', ['neq' => $sessionIdToExclude]); } return $this; }
app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo.php+3 −2 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Security\Model\ResourceModel; @@ -23,7 +24,7 @@ class AdminSessionInfo extends \Magento\Framework\Model\ResourceModel\Db\Abstrac /** * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param \Magento\Framework\Stdlib\DateTime $dateTime - * @param null $connectionName + * @param string|null $connectionName */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, @@ -87,7 +88,7 @@ public function updateStatusByUserId( 'user_id = ?' => (int) $userId, ]; if (!empty($excludedSessionIds)) { - $whereStatement['session_id NOT IN (?)'] = $excludedSessionIds; + $whereStatement['id NOT IN (?)'] = $excludedSessionIds; } if (!empty($withStatuses)) { $whereStatement['status IN (?)'] = $withStatuses;
app/code/Magento/Security/Setup/Patch/Data/SessionIDColumnCleanUp.php+102 −0 added@@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Security\Setup\Patch\Data; + +use Magento\Framework\DB\Adapter\Pdo\Mysql; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Psr\Log\LoggerInterface; + +/** + * Class Clean Up Data Removes unused data + */ +class SessionIDColumnCleanUp implements DataPatchInterface +{ + /** + * @var ModuleDataSetupInterface + */ + private $moduleDataSetup; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * RemoveData constructor. + * @param ModuleDataSetupInterface $moduleDataSetup + * @param LoggerInterface $logger + */ + public function __construct( + ModuleDataSetupInterface $moduleDataSetup, + LoggerInterface $logger + ) { + $this->moduleDataSetup = $moduleDataSetup; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + try { + $this->cleanAdminUserSessionTable(); + } catch (\Throwable $e) { + $this->logger->warning( + 'Security module SessionIDColumnCleanUp patch experienced an error and could not be completed.' + . ' Please submit a support ticket or email us at security@magento.com.' + ); + + return $this; + } + + return $this; + } + + /** + * Remove session id from admin_user_session table. + * + * @throws \Zend_Db_Statement_Exception + */ + private function cleanAdminUserSessionTable() + { + $tableName = $this->moduleDataSetup->getTable('admin_user_session'); + // phpcs:ignore Magento2.SQL.RawQuery + $rawQuery = sprintf( + 'UPDATE %s SET session_id = NULL WHERE session_id IS NOT NULL LIMIT 1000', + $tableName + ); + + $adapter = $this->moduleDataSetup->getConnection(); + if ($adapter instanceof Mysql) { + do { + $result = $adapter->rawQuery($rawQuery)->rowCount(); + } while ($result > 0); + } else { + do { + $result = $adapter->query($rawQuery)->rowCount(); + } while ($result > 0); + } + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Security/Test/Unit/Model/AdminSessionsManagerTest.php+78 −69 modified@@ -3,51 +3,59 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Security\Test\Unit\Model; +use Magento\Backend\Model\Auth\Session; use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; use Magento\Framework\Stdlib\DateTime\DateTime; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Security\Model\AdminSessionInfo; +use Magento\Security\Model\AdminSessionInfoFactory; use Magento\Security\Model\AdminSessionsManager; use Magento\Security\Model\ConfigInterface; +use Magento\Security\Model\ResourceModel\AdminSessionInfo\Collection; +use Magento\Security\Model\ResourceModel\AdminSessionInfo\CollectionFactory; +use Magento\User\Model\User; +use PHPUnit\Framework\TestCase; /** * Test class for AdminSessionsManager testing * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class AdminSessionsManagerTest extends \PHPUnit\Framework\TestCase +class AdminSessionsManagerTest extends TestCase { /** @var AdminSessionsManager */ protected $model; - /** @var \Magento\Security\Model\AdminSessionInfo */ + /** @var AdminSessionInfo */ protected $currentSessionMock; - /** @var \Magento\Backend\Model\Auth\Session */ + /** @var Session */ protected $authSessionMock; /** @var ConfigInterface */ protected $securityConfigMock; - /** @var \Magento\User\Model\User */ + /** @var User */ protected $userMock; - /** @var \Magento\Security\Model\ResourceModel\AdminSessionInfo\CollectionFactory */ + /** @var CollectionFactory */ protected $adminSessionInfoCollectionFactoryMock; - /** @var \Magento\Security\Model\ResourceModel\AdminSessionInfo\Collection */ + /** @var Collection */ protected $adminSessionInfoCollectionMock; - /** @var \Magento\Security\Model\AdminSessionInfoFactory */ + /** @var AdminSessionInfoFactory */ protected $adminSessionInfoFactoryMock; /** * @var DateTime */ protected $dateTimeMock; - /** @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager */ + /** @var ObjectManager */ protected $objectManager; /* @@ -63,18 +71,28 @@ protected function setUp(): void { $this->objectManager = new ObjectManager($this); - $this->authSessionMock = $this->createPartialMock( - \Magento\Backend\Model\Auth\Session::class, - ['isActive', 'getStatus', 'getUser', 'getId', 'getSessionId', 'getUpdatedAt'] - ); + $this->authSessionMock = $this->getMockBuilder(Session::class) + ->addMethods( + [ + 'isActive', + 'getStatus', + 'getUser', + 'getId', + 'getUpdatedAt', + 'getAdminSessionInfoId', + 'setAdminSessionInfoId' + ] + ) + ->disableOriginalConstructor() + ->getMock(); $this->adminSessionInfoCollectionFactoryMock = $this->createPartialMock( - \Magento\Security\Model\ResourceModel\AdminSessionInfo\CollectionFactory::class, + CollectionFactory::class, ['create'] ); $this->adminSessionInfoCollectionMock = $this->createPartialMock( - \Magento\Security\Model\ResourceModel\AdminSessionInfo\Collection::class, + Collection::class, [ 'filterByUser', 'filterExpiredSessions', @@ -87,27 +105,21 @@ protected function setUp(): void ); $this->adminSessionInfoFactoryMock = $this->createPartialMock( - \Magento\Security\Model\AdminSessionInfoFactory::class, + AdminSessionInfoFactory::class, ['create'] ); - $this->currentSessionMock = $this->createPartialMock(\Magento\Security\Model\AdminSessionInfo::class, [ - 'isActive', - 'getStatus', - 'load', - 'setData', - 'setIsOtherSessionsTerminated', - 'save', - 'getUserId', - 'getSessionId', - 'getUpdatedAt' - ]); - - $this->securityConfigMock = $this->getMockBuilder(\Magento\Security\Model\ConfigInterface::class) + $this->currentSessionMock = $this->getMockBuilder(AdminSessionInfo::class) + ->addMethods(['isActive', 'getStatus', 'getUserId', 'getUpdatedAt']) + ->onlyMethods(['load', 'setData', 'setIsOtherSessionsTerminated', 'save', 'getId']) ->disableOriginalConstructor() ->getMock(); - $this->userMock = $this->createPartialMock(\Magento\User\Model\User::class, ['getId']); + $this->securityConfigMock = $this->getMockBuilder(ConfigInterface::class) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + + $this->userMock = $this->createPartialMock(User::class, ['getId']); $this->dateTimeMock = $this->getMockBuilder(DateTime::class) ->disableOriginalConstructor() @@ -118,7 +130,7 @@ protected function setUp(): void ->getMock(); $this->model = $this->objectManager->getObject( - \Magento\Security\Model\AdminSessionsManager::class, + AdminSessionsManager::class, [ 'securityConfig' => $this->securityConfigMock, 'authSession' => $this->authSessionMock, @@ -138,19 +150,18 @@ public function testProcessLogin() $useId = 1; $sessionLifetime = 100; $ip = 12345; - $sessionId = 50; $timestamp = time(); $olderThen = $timestamp - $sessionLifetime; + $adminSessionInfoId = 50; + $this->authSessionMock->expects($this->any()) + ->method('getAdminSessionInfoId') + ->willReturn($adminSessionInfoId); $this->adminSessionInfoFactoryMock->expects($this->exactly(2)) ->method('create') ->willReturn($this->currentSessionMock); - $this->authSessionMock->expects($this->exactly(2)) - ->method('getSessionId') - ->willReturn($sessionId); - $this->authSessionMock->expects($this->once()) ->method('getUser') ->willReturn($this->userMock); @@ -169,7 +180,6 @@ public function testProcessLogin() $this->currentSessionMock->expects($this->once()) ->method('save') ->willReturnSelf(); - $this->dateTimeMock->expects($this->once()) ->method('gmtTimestamp') ->willReturn($timestamp); @@ -186,19 +196,19 @@ public function testProcessLogin() ->method('getUserId') ->willReturn($useId); - $this->currentSessionMock->expects($this->once()) - ->method('getSessionId') - ->willReturn($sessionId); + $this->currentSessionMock->expects($this->any()) + ->method('getId') + ->willReturn($adminSessionInfoId); $this->adminSessionInfoCollectionFactoryMock->expects($this->once()) ->method('create') ->willReturn($this->adminSessionInfoCollectionMock); $this->adminSessionInfoCollectionMock->expects($this->once())->method('updateActiveSessionsStatus') ->with( - \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT_BY_LOGIN, + AdminSessionInfo::LOGGED_OUT_BY_LOGIN, $useId, - $sessionId, + $adminSessionInfoId, $olderThen ) ->willReturn(1); @@ -216,18 +226,17 @@ public function testProcessLogin() */ public function testProcessProlong() { - $sessionId = 50; $lastUpdatedAt = '2015-12-31 23:59:59'; $newUpdatedAt = '2016-01-01 00:00:30'; + $adminSessionInfoId = 50; + $this->authSessionMock->expects($this->any()) + ->method('getAdminSessionInfoId') + ->willReturn($adminSessionInfoId); $this->adminSessionInfoFactoryMock->expects($this->any()) ->method('create') ->willReturn($this->currentSessionMock); - $this->authSessionMock->expects($this->once()) - ->method('getSessionId') - ->willReturn($sessionId); - $this->currentSessionMock->expects($this->once()) ->method('load') ->willReturnSelf(); @@ -261,23 +270,22 @@ public function testProcessProlong() */ public function testProcessLogout() { - $sessionId = 50; + $adminSessionInfoId = 50; + $this->authSessionMock->expects($this->any()) + ->method('getAdminSessionInfoId') + ->willReturn($adminSessionInfoId); $this->adminSessionInfoFactoryMock->expects($this->any()) ->method('create') ->willReturn($this->currentSessionMock); - $this->authSessionMock->expects($this->once()) - ->method('getSessionId') - ->willReturn($sessionId); - $this->currentSessionMock->expects($this->once()) ->method('load') ->willReturnSelf(); $this->currentSessionMock->expects($this->once()) ->method('setData') - ->with('status', \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT) + ->with('status', AdminSessionInfo::LOGGED_OUT) ->willReturnSelf(); $this->currentSessionMock->expects($this->once()) @@ -292,16 +300,15 @@ public function testProcessLogout() */ public function testGetCurrentSession() { - $sessionId = 50; + $adminSessionInfoId = 50; + $this->authSessionMock->expects($this->any()) + ->method('getAdminSessionInfoId') + ->willReturn($adminSessionInfoId); $this->adminSessionInfoFactoryMock->expects($this->any()) ->method('create') ->willReturn($this->currentSessionMock); - $this->authSessionMock->expects($this->once()) - ->method('getSessionId') - ->willReturn($sessionId); - $this->currentSessionMock->expects($this->once()) ->method('load') ->willReturnSelf(); @@ -359,23 +366,23 @@ public function dataProviderLogoutReasonMessage() 'Someone logged into this account from another device or browser.' . ' Your current session is terminated.' ), - 'sessionStatus' => \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT_BY_LOGIN + 'sessionStatus' => AdminSessionInfo::LOGGED_OUT_BY_LOGIN ], [ 'expectedResult' => __('Your current session is terminated by another user of this account.'), - 'sessionStatus' => \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT_MANUALLY + 'sessionStatus' => AdminSessionInfo::LOGGED_OUT_MANUALLY ], [ 'expectedResult' => __('Your current session has been expired.'), - 'sessionStatus' => \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT + 'sessionStatus' => AdminSessionInfo::LOGGED_OUT ], [ 'expectedResult' => __('Your account is temporarily disabled. Please try again later.'), - 'sessionStatus' => \Magento\Security\Model\AdminSessionsManager::LOGOUT_REASON_USER_LOCKED + 'sessionStatus' => AdminSessionsManager::LOGOUT_REASON_USER_LOCKED ], [ 'expectedResult' => '', - 'sessionStatus' => \Magento\Security\Model\AdminSessionInfo::LOGGED_IN + 'sessionStatus' => AdminSessionInfo::LOGGED_IN ] ]; } @@ -397,7 +404,7 @@ public function testGetSessionsForCurrentUser() ->method('getId') ->willReturn($useId); $this->adminSessionInfoCollectionMock->expects($this->once())->method('filterByUser') - ->with($useId, \Magento\Security\Model\AdminSessionInfo::LOGGED_IN) + ->with($useId, AdminSessionInfo::LOGGED_IN) ->willReturnSelf(); $this->securityConfigMock->expects($this->once()) ->method('getAdminSessionLifetime') @@ -420,22 +427,24 @@ public function testLogoutOtherUserSessions() { $useId = 1; $sessionLifetime = 100; - $sessionId = 50; + $adminSessionInfoId = 50; + $this->authSessionMock->expects($this->any()) + ->method('getAdminSessionInfoId') + ->willReturn($adminSessionInfoId); + $this->adminSessionInfoCollectionFactoryMock->expects($this->once()) ->method('create') ->willReturn($this->adminSessionInfoCollectionMock); $this->authSessionMock->expects($this->once()) ->method('getUser') ->willReturn($this->userMock); - $this->authSessionMock->expects($this->once()) - ->method('getSessionId') - ->willReturn($sessionId); + $this->userMock->expects($this->once()) ->method('getId') ->willReturn($useId); $this->adminSessionInfoCollectionMock->expects($this->once()) ->method('filterByUser') - ->with($useId, \Magento\Security\Model\AdminSessionInfo::LOGGED_IN, $sessionId) + ->with($useId, AdminSessionInfo::LOGGED_IN, $adminSessionInfoId) ->willReturnSelf(); $this->securityConfigMock->expects($this->once()) ->method('getAdminSessionLifetime') @@ -449,7 +458,7 @@ public function testLogoutOtherUserSessions() ->willReturnSelf(); $this->adminSessionInfoCollectionMock->expects($this->once()) ->method('setDataToAll') - ->with($this->equalTo('status'), \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT_MANUALLY) + ->with($this->equalTo('status'), AdminSessionInfo::LOGGED_OUT_MANUALLY) ->willReturnSelf(); $this->adminSessionInfoCollectionMock->expects($this->once()) ->method('save');
app/code/Magento/Security/Test/Unit/Model/ResourceModel/AdminSessionInfo/CollectionTest.php+1 −1 modified@@ -102,7 +102,7 @@ public function testFilterByUser() ->withConsecutive( ['user_id', $userId], ['status', $status], - ['session_id', ['neq' => $sessionIdToExclude]] + ['id', ['neq' => $sessionIdToExclude]] ) ->willReturnSelf();
app/code/Magento/Security/Test/Unit/Model/ResourceModel/AdminSessionInfoTest.php+1 −1 modified@@ -82,7 +82,7 @@ public function testUpdateStatusByUserId() 'user_id = ?' => (int) $userId, ]; if (!empty($excludedSessionIds)) { - $whereStatement['session_id NOT IN (?)'] = $excludedSessionIds; + $whereStatement['id NOT IN (?)'] = $excludedSessionIds; } if (!empty($withStatuses)) { $whereStatement['status IN (?)'] = $withStatuses;
app/code/Magento/Security/view/adminhtml/templates/system/config/session_size_admin/modal_content_body.phtml+15 −0 added@@ -0,0 +1,15 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +?> +<div> + <p> + <strong><?= $block->escapeHtml(__('Warning')) ?></strong> + <?= $block->escapeHtml(__(': You are about to set max session size in admin to be lower than recommended ' . + 'default session size. Low max session size in admin could break admin functionalities such as admin ' . + 'panel login. Are you sure you want to make this change?')) ?> + </p> +</div>
app/code/Magento/Security/view/adminhtml/templates/system/config/session_size_storefront/modal_content_body.phtml+15 −0 added@@ -0,0 +1,15 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +?> +<div> + <p> + <strong><?= $block->escapeHtml(__('Warning')) ?></strong> + <?= $block->escapeHtml(__(': You are about to set max session size in storefront to be lower than ' . + ' recommended default session size. Low max session size in storefront could break storefront ' . + 'functionalities such as customer login. Are you sure you want to make this change?')) ?> + </p> +</div>
app/code/Magento/Security/view/adminhtml/web/js/system/config/session-size.js+58 −0 added@@ -0,0 +1,58 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +define([ + 'jquery', + 'mage/translate', + 'Magento_Ui/js/modal/confirm', + 'domReady!' +], function ($, $t, confirm) { + 'use strict'; + + return function (config, inputEl) { + var $inputEl = $(inputEl); + + $inputEl.on('blur', function () { + var inputVal = parseInt($inputEl.val(), 10); + + if (256000 > inputVal) { + confirm({ + title: $t(config.modalTitleText), + content: $t(config.modalContentBody), + buttons: [{ + text: $t('No'), + class: 'action-secondary action-dismiss', + + /** + * Close modal and trigger 'cancel' action on click + */ + click: function (event) { + this.closeModal(event); + } + }, { + text: $t('Yes'), + class: 'action-primary action-accept', + + /** + * Close modal and trigger 'confirm' action on click + */ + click: function (event) { + this.closeModal(event, true); + } + }], + actions: { + + /** + * Revert back to original value + */ + cancel: function () { + $inputEl.val(256000); + } + } + }); + } + }); + }; +});
app/code/Magento/SendFriend/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-send-friend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-captcha": "*", - "magento/module-authorization": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-customer": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-captcha": "100.3.*", + "magento/module-authorization": "100.3.*", + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/SendFriendGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-send-friend-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-send-friend": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.4", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-send-friend": "100.3.*", + "magento/module-graph-ql": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Shipping/composer.json+24 −22 modified@@ -1,37 +1,38 @@ { "name": "magento/module-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", "ext-gd": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-contact": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-contact": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*", + "magento/module-ui": "101.1.*", + "magento/module-user": "101.1.*" }, "suggest": { - "magento/module-fedex": "*", - "magento/module-ups": "*", - "magento/module-config": "*" + "magento/module-fedex": "100.3.*", + "magento/module-ups": "100.3.*", + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/Signifyd/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-signifyd", "description": "Submitting Case Entry to Signifyd on Order Creation", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-store": "*", + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-payment": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", "php": "~7.3.0||~7.4.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Sitemap/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-sitemap", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-robots": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-url-rewrite": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-robots": "101.0.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Store/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7-p4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-media-storage": "*", - "magento/module-ui": "*", - "magento/module-customer": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-ui": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Store/etc/config.xml+3 −0 modified@@ -124,6 +124,7 @@ <pl>pl</pl> <py>py</py> <asp>asp</asp> + <aspx>aspx</aspx> <sh>sh</sh> <cgi>cgi</cgi> <htm>htm</htm> @@ -132,7 +133,9 @@ <shtml>shtml</shtml> <phpt>phpt</phpt> <pht>pht</pht> + <phar>phar</phar> <svg>svg</svg> + <svgz>svgz</svgz> <xml>xml</xml> <xhtml>xhtml</xhtml> </protected_extensions>
app/code/Magento/Store/etc/di.xml+5 −0 modified@@ -170,6 +170,11 @@ <argument name="scopeType" xsi:type="const">Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument> </arguments> </type> + <type name="Magento\Framework\Session\SessionMaxSizeConfig"> + <arguments> + <argument name="scopeType" xsi:type="const">Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument> + </arguments> + </type> <type name="Magento\Framework\Session\SidResolver"> <arguments> <argument name="scopeType" xsi:type="const">Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument>
app/code/Magento/StoreGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-store-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.5", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-graph-ql": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Swagger/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-swagger", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Swagger/Controller/Index/Index.php+45 −13 modified@@ -5,44 +5,76 @@ */ namespace Magento\Swagger\Controller\Index; +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\Action\Context; +use Magento\Framework\App\Action\HttpGetActionInterface; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Exception\NotFoundException; +use Magento\Framework\View\Page\Config as PageConfig; +use Magento\Framework\View\Result\Page; +use Magento\Framework\View\Result\PageFactory; +use Magento\Swagger\Model\Config; + /** - * Class Index - * - * @package Magento\Swagger\Controller\Index + * Renders Swagger */ -class Index extends \Magento\Framework\App\Action\Action +class Index extends Action implements HttpGetActionInterface { /** - * @var \Magento\Framework\View\Page\Config + * @var PageConfig */ private $pageConfig; /** - * @var \Magento\Framework\View\Result\PageFactory + * @var PageFactory */ private $pageFactory; /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Framework\View\Page\Config $pageConfig - * @param \Magento\Framework\View\Result\PageFactory $pageFactory + * @var Config + */ + private $config; + + /** + * @param Context $context + * @param PageConfig $pageConfig + * @param PageFactory $pageFactory + * @param Config|null $config */ public function __construct( - \Magento\Framework\App\Action\Context $context, - \Magento\Framework\View\Page\Config $pageConfig, - \Magento\Framework\View\Result\PageFactory $pageFactory + Context $context, + PageConfig $pageConfig, + PageFactory $pageFactory, + ?Config $config = null ) { parent::__construct($context); $this->pageConfig = $pageConfig; $this->pageFactory = $pageFactory; + $this->config = $config ?? ObjectManager::getInstance() + ->get(Config::class); } /** - * @return \Magento\Framework\View\Result\Page + * @inheritDoc + * + * @return Page */ public function execute() { $this->pageConfig->addBodyClass('swagger-section'); return $this->pageFactory->create(); } + + /** + * @inheritDoc + */ + public function dispatch(RequestInterface $request) + { + if (!$this->config->isEnabled()) { + throw new NotFoundException(__('Page not found.')); + } + + return parent::dispatch($request); + } }
app/code/Magento/Swagger/etc/csp_whitelist.xml+17 −0 added@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd"> + <policies> + <policy id="img-src"> + <values> + <value id="swagger" type="host">validator.swagger.io</value> + </values> + </policy> + </policies> +</csp_whitelist>
app/code/Magento/Swagger/Model/Config.php+47 −0 added@@ -0,0 +1,47 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Swagger\Model; + +use Magento\Framework\App\State; + +/** + * Configuration for Swagger + */ +class Config +{ + /** + * @var State + */ + private $state; + + /** + * @var bool + */ + private $enabledInProduction; + + /** + * @param State $state + * @param bool $enabledInProduction + */ + public function __construct(State $state, bool $enabledInProduction = false) + { + $this->state = $state; + $this->enabledInProduction = $enabledInProduction; + } + + /** + * Is Swagger enabled + * + * @return bool + */ + public function isEnabled(): bool + { + return $this->state->getMode() === State::MODE_DEVELOPER || $this->enabledInProduction; + } +}
app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php+97 −14 modified@@ -8,29 +8,112 @@ namespace Magento\Swagger\Test\Unit\Controller\Index; -class IndexTest extends \PHPUnit\Framework\TestCase +use Magento\Framework\App\Action\Context; +use Magento\Framework\App\Request\Http; +use Magento\Framework\EntityManager\EventManager; +use Magento\Framework\Exception\NotFoundException; +use Magento\Framework\View\Page\Config as PageConfig; +use Magento\Framework\View\Result\PageFactory; +use Magento\Swagger\Controller\Index\Index; +use Magento\Swagger\Model\Config; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class IndexTest extends TestCase { - public function testExecute() + /** + * @var PageConfig|MockObject + */ + private $pageConfigMock; + + /** + * @var PageFactory|MockObject + */ + private $resultPageFactory; + + /** + * @var Config|MockObject + */ + private $config; + + /** + * @var Index + */ + private $indexAction; + + protected function setUp(): void { - $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $eventManager = self::getMockBuilder(EventManager::class) + ->disableOriginalConstructor() + ->getMock(); + /** @var MockObject|Context $pageConfigMock */ + $contextMock = $this->createMock(Context::class); + $contextMock->method('getEventManager') + ->willReturn($eventManager); - $pageConfigMock = $this->getMockBuilder(\Magento\Framework\View\Page\Config::class) + /** @var MockObject|PageConfig $pageConfigMock */ + $this->pageConfigMock = $this->getMockBuilder(PageConfig::class) ->disableOriginalConstructor() ->getMock(); - $resultPageFactory = $this->getMockBuilder(\Magento\Framework\View\Result\PageFactory::class) + /** @var MockObject|PageFactory $resultPageFactory */ + $this->resultPageFactory = $this->getMockBuilder(PageFactory::class) ->disableOriginalConstructor() ->getMock(); - $pageConfigMock->expects($this->once())->method('addBodyClass')->with('swagger-section'); - $resultPageFactory->expects($this->once())->method('create'); + $this->config = self::getMockBuilder(Config::class) + ->disableOriginalConstructor() + ->getMock(); - $model = $objectManager->getObject( - \Magento\Swagger\Controller\Index\Index::class, - [ - 'pageConfig' => $pageConfigMock, - 'pageFactory' => $resultPageFactory - ] + $this->indexAction = new Index( + $contextMock, + $this->pageConfigMock, + $this->resultPageFactory, + $this->config ); - $model->execute(); + } + + /** + * @doesNotPerformAssertions + */ + public function testExecute() + { + $this->pageConfigMock->expects($this->once()) + ->method('addBodyClass') + ->with('swagger-section'); + $this->resultPageFactory->expects($this->once()) + ->method('create'); + + $this->indexAction->execute(); + } + + public function testDispatchRejectsWhenDisabled() + { + $this->expectException(NotFoundException::class); + $this->expectExceptionMessage('Page not found.'); + + $request = self::getMockBuilder(Http::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->config->method('isEnabled') + ->willReturn(false); + $this->indexAction->dispatch($request); + } + + /** + * @doesNotPerformAssertions + */ + public function testDispatchIsSuccessfulWhenEnabled() + { + $request = self::getMockBuilder(Http::class) + ->disableOriginalConstructor() + ->getMock(); + // Assert that execute is called + $request->expects($this->atLeast(1)) + ->method('getFullActionName'); + $this->config->method('isEnabled') + ->willReturn(true); + + $this->indexAction->dispatch($request); } }
app/code/Magento/Swagger/Test/Unit/Model/ConfigTest.php+68 −0 added@@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Swagger\Test\Unit\Model; + +use Magento\Framework\App\State; +use Magento\Swagger\Model\Config; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class ConfigTest extends TestCase +{ + /** + * @var State|MockObject + */ + private $state; + + protected function setUp(): void + { + $this->state = self::getMockBuilder(State::class) + ->disableOriginalConstructor() + ->getMock(); + } + + public function testDisabledInProductionByDefault() + { + $this->state->method('getMode') + ->willReturn(State::MODE_PRODUCTION); + $config = new Config($this->state); + + self::assertFalse($config->isEnabled()); + } + + /** + * @param string $mode + * @param bool $configuredValue + * @param bool $expectedResult + * @dataProvider useCaseProvider + */ + public function testUseCases(string $mode, bool $configuredValue, bool $expectedResult) + { + $this->state->method('getMode') + ->willReturn($mode); + $config = new Config($this->state, $configuredValue); + + self::assertSame($expectedResult, $config->isEnabled()); + } + + /** + * Use cases for modes + * + * @return array[] + */ + public function useCaseProvider(): array + { + return [ + [State::MODE_PRODUCTION, false, false], + [State::MODE_PRODUCTION, true, true], + [State::MODE_DEVELOPER, true, true], + [State::MODE_DEVELOPER, false, true], + ]; + } +}
app/code/Magento/SwaggerWebapiAsync/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-swagger-webapi-async", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "102.0.*", + "magento/module-swagger": "100.3.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/SwaggerWebapi/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-swagger-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "102.0.*", + "magento/module-swagger": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Swatches/composer.json+20 −18 modified@@ -1,32 +1,33 @@ { "name": "magento/module-swatches", "description": "Add Swatches to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-configurable-product": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-page-cache": "100.3.*", + "magento/module-media-storage": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*" }, "suggest": { - "magento/module-layered-navigation": "*", - "magento/module-swatches-sample-data": "*" + "magento/module-layered-navigation": "100.3.*", + "magento/module-swatches-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } +
app/code/Magento/SwatchesGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-swatches-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-swatches": "*", - "magento/module-catalog": "*" + "magento/framework": "102.0.*", + "magento/module-swatches": "100.3.*", + "magento/module-catalog": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/SwatchesLayeredNavigation/composer.json+8 −6 modified@@ -1,19 +1,20 @@ { "name": "magento/module-swatches-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "102.0.*", "magento/magento-composer-installer": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php+3 −0 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types = 1); + namespace Magento\Swatches\Test\Unit\Helper; /** @@ -136,6 +138,7 @@ public function testMoveImageFromTmpNoDb() { $this->fileStorageDbMock->method('checkDbUsage')->willReturn(false); $this->fileStorageDbMock->method('renameFile')->willReturnSelf(); + $this->mediaDirectoryMock->method('getAbsolutePath')->willReturn('attribute/swatch/e/a/file'); $result = $this->mediaHelperObject->moveImageFromTmp('file.tmp'); $this->assertNotNull($result); }
app/code/Magento/Tax/composer.json+22 −20 modified@@ -1,34 +1,35 @@ { "name": "magento/module-tax", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-directory": "100.3.*", + "magento/module-eav": "102.0.*", + "magento/module-page-cache": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-reports": "100.3.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-tax-sample-data": "*" + "magento/module-tax-sample-data": "Sample Data version: 100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -38,3 +39,4 @@ } } } +
app/code/Magento/TaxGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-tax-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-tax": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-tax": "100.3.*", + "magento/module-catalog-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/TaxImportExport/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-tax-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-directory": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-tax": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Theme/composer.json+21 −19 modified@@ -1,33 +1,34 @@ { "name": "magento/module-theme", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-cms": "103.0.*", + "magento/module-config": "101.1.*", + "magento/module-customer": "102.0.*", + "magento/module-eav": "102.0.*", + "magento/module-media-storage": "100.3.*", + "magento/module-require-js": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-widget": "101.1.*" }, "suggest": { - "magento/module-theme-sample-data": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*" + "magento/module-theme-sample-data": "Sample Data version: 100.3.*", + "magento/module-deploy": "100.3.*", + "magento/module-directory": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } +
app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/Save.php+19 −2 modified@@ -7,8 +7,9 @@ namespace Magento\Theme\Controller\Adminhtml\System\Design\Theme; /** - * Class Save + * Class Save use to save Theme data * @deprecated 100.2.0 + * @SuppressWarnings(PHPMD.AllPurposeAction) */ class Save extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme { @@ -51,7 +52,9 @@ public function execute() if ($theme && !$theme->isEditable()) { throw new \Magento\Framework\Exception\LocalizedException(__('This theme is not editable.')); } - $theme->addData($themeData); + $theme->addData( + $this->extractMutableData($themeData) + ); if (isset($themeData['preview']['delete'])) { $theme->getThemeImage()->removePreviewImage(); } @@ -80,4 +83,18 @@ public function execute() ? $this->_redirect('adminhtml/*/edit', ['id' => $theme->getId()]) : $this->_redirect('adminhtml/*/'); } + + /** + * Extract required attributes + * + * @param array $postData + * @return array + */ + private function extractMutableData(array $postData): array + { + if (!empty($postData['theme_title'])) { + return ['theme_title' => $postData['theme_title']]; + } + return []; + } }
app/code/Magento/ThemeGraphQl/composer.json+8 −6 modified@@ -2,17 +2,18 @@ "name": "magento/module-theme-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.4", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, "suggest": { - "magento/module-store-graph-ql": "*" + "magento/module-store-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Theme/Model/Theme/Image/Path.php+1 −1 modified@@ -103,6 +103,6 @@ public function getImagePreviewDirectory() */ public function getTemporaryDirectory() { - return $this->mediaDirectory->getRelativePath('/theme/origin'); + return $this->mediaDirectory->getAbsolutePath('theme/origin'); } }
app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml+17 −9 modified@@ -36,9 +36,16 @@ <comment userInput="Upload Image" stepKey="uploadImageComment"/> <click selector="{{AdminDesignConfigSection.selectFromGalleryByFieldsetName('Head')}}" stepKey="openMediaGallery"/> <actionGroup ref="VerifyMediaGalleryStorageActions" stepKey="verifyMediaGalleryStorageBtn"/> - <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder"> + <comment userInput="BIC workaround" stepKey="navigateToFolder"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> <argument name="FolderName" value="Storage Root"/> </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="CreateImageFolderActionGroup" stepKey="CreateImageFolder"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> <actionGroup ref="attachImage" stepKey="selectImageFromMediaStorage"> <argument name="Image" value="ImageUpload3"/> </actionGroup> @@ -62,17 +69,18 @@ <!--Delete Image: will be in both root and favicon--> <comment userInput="Delete Image" stepKey="deleteImageComment"/> <actionGroup ref="navigateToMediaGallery" stepKey="navigateToMediaGallery"/> - <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder2"> + <comment userInput="BIC workaround" stepKey="navigateToFolder2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder2"> <argument name="FolderName" value="Storage Root"/> </actionGroup> - <actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="deleteImageFromStorage"> - <argument name="Image" value="ImageUpload3"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> </actionGroup> - <actionGroup ref="NavigateToFaviconMediaFolderActionGroup" stepKey="navigateToFolder3"> - <argument name="StoreFolder" value="{{AdminDesignConfigSection.storeLink}}"/> - </actionGroup> - <actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="deleteImageFromStorage2"> - <argument name="Image" value="ImageUpload3"/> + <comment userInput="BIC workaround" stepKey="deleteImageFromStorage"/> + <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteFolderFromMediaGallery"> + <argument name="Image" value="{{ImageFolder.name}}"/> </actionGroup> + <comment userInput="BIC workaround" stepKey="navigateToFolder3"/> + <comment userInput="BIC workaround" stepKey="deleteImageFromStorage2"/> </test> </tests>
app/code/Magento/Theme/Test/Unit/Model/Theme/Image/PathTest.php+17 −13 modified@@ -50,8 +50,8 @@ protected function setUp(): void $this->mediaDirectory->expects($this->any()) ->method('getRelativePath') - ->with('/theme/origin') - ->willReturn('/theme/origin'); + ->with('theme/origin') + ->willReturn('theme/origin'); $this->filesystem->expects($this->any())->method('getDirectoryRead') ->with(DirectoryList::MEDIA) @@ -62,17 +62,17 @@ protected function setUp(): void $this->_assetRepo, $this->_storeManager ); - - $this->_model = new Path($this->filesystem, $this->_assetRepo, $this->_storeManager); } public function testGetPreviewImageUrl() { /** @var $theme \Magento\Theme\Model\Theme|\PHPUnit\Framework\MockObject\MockObject */ - $theme = $this->createPartialMock( - \Magento\Theme\Model\Theme::class, - ['getPreviewImage', 'isPhysical', '__wakeup'] - ); + $theme = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + ->disableOriginalConstructor() + ->addMethods(['getPreviewImage']) + ->onlyMethods(['isPhysical', '__wakeup']) + ->getMock(); + $theme->expects($this->any()) ->method('getPreviewImage') ->willReturn('image.png'); @@ -89,10 +89,11 @@ public function testGetPreviewImagePath() $expectedPath = 'theme/preview/preview.jpg'; /** @var $theme \Magento\Theme\Model\Theme|\PHPUnit\Framework\MockObject\MockObject */ - $theme = $this->createPartialMock( - \Magento\Theme\Model\Theme::class, - ['getPreviewImage', 'isPhysical', '__wakeup'] - ); + $theme = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + ->disableOriginalConstructor() + ->addMethods(['getPreviewImage']) + ->onlyMethods(['isPhysical', '__wakeup']) + ->getMock(); $this->mediaDirectory->expects($this->once()) ->method('getAbsolutePath') @@ -138,8 +139,11 @@ public function testImagePreviewDirectoryGetter() */ public function testTemporaryDirectoryGetter() { + $this->mediaDirectory->expects($this->any()) + ->method('getAbsolutePath') + ->willReturn('/foo/theme/origin'); $this->assertEquals( - '/theme/origin', + '/foo/theme/origin', $this->model->getTemporaryDirectory() ); }
app/code/Magento/Tinymce3/composer.json+14 −13 modified@@ -1,24 +1,24 @@ { "name": "magento/module-tinymce-3", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/module-variable": "*", - "magento/module-widget": "*", - "magento/module-cms": "*" - - }, - "suggest": { - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.7", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-ui": "101.1.*", + "magento/module-variable": "100.3.*", + "magento/module-widget": "101.1.*", + "magento/module-cms": "103.0.*" + }, + "suggest": { + "magento/module-cms": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +28,4 @@ } } } +
app/code/Magento/Translation/composer.json+13 −11 modified@@ -1,25 +1,26 @@ { "name": "magento/module-translation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-developer": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-developer": "100.3.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.3.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Ui/Component/Filters/Type/Select.php+4 −1 modified@@ -12,6 +12,8 @@ use Magento\Ui\Component\Filters\FilterModifier; /** + * Class Select for Filters types + * * @api * @since 100.0.2 */ @@ -79,7 +81,8 @@ public function prepare() 'config', array_replace_recursive( (array)$this->wrappedComponent->getData('config'), - (array)$this->getData('config') + (array)$this->getData('config'), + ['__disableTmpl' => ['label' => true]] ) );
app/code/Magento/Ui/Component/Listing/Columns/Column.php+2 −1 modified@@ -89,7 +89,8 @@ public function prepare() 'config', array_replace_recursive( (array)$this->wrappedComponent->getData('config'), - (array)$this->getData('config') + (array)$this->getData('config'), + ['__disableTmpl' => ['label' => true]] ) ); }
app/code/Magento/Ui/composer.json+15 −13 modified@@ -1,27 +1,28 @@ { "name": "magento/module-ui", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-user": "*", - "magento/module-cms": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-eav": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-user": "101.1.*", + "magento/module-cms": "103.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Ups/composer.json+16 −14 modified@@ -1,28 +1,29 @@ { "name": "magento/module-ups", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/UrlRewrite/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.6", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-cms-url-rewrite": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-url-rewrite": "100.3.*", + "magento/module-cms": "103.0.*", + "magento/module-cms-url-rewrite": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/UrlRewriteGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.3.7", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "102.0.*", + "magento/module-url-rewrite": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.3.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/User/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-user", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-email": "*", - "magento/module-integration": "*", - "magento/module-security": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-email": "101.0.*", + "magento/module-integration": "100.3.*", + "magento/module-security": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/User/Model/ResourceModel/User.php+23 −1 modified@@ -17,6 +17,7 @@ use Magento\Framework\Model\AbstractModel; use Magento\User\Model\Backend\Config\ObserverConfig; use Magento\User\Model\User as ModelUser; +use Magento\Framework\Encryption\EncryptorInterface; /** * ACL user resource @@ -49,6 +50,11 @@ class User extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb */ private $observerConfig; + /** + * @var EncryptorInterface|null + */ + private $encryptor; + /** * Construct * @@ -58,20 +64,24 @@ class User extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb * @param string $connectionName * @param CacheInterface $aclDataCache * @param ObserverConfig|null $observerConfig + * @param EncryptorInterface|null $encryptor */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Authorization\Model\RoleFactory $roleFactory, \Magento\Framework\Stdlib\DateTime $dateTime, $connectionName = null, CacheInterface $aclDataCache = null, - ObserverConfig $observerConfig = null + ObserverConfig $observerConfig = null, + EncryptorInterface $encryptor = null ) { parent::__construct($context, $connectionName); $this->_roleFactory = $roleFactory; $this->dateTime = $dateTime; $this->aclDataCache = $aclDataCache ?: ObjectManager::getInstance()->get(CacheInterface::class); $this->observerConfig = $observerConfig ?: ObjectManager::getInstance()->get(ObserverConfig::class); + $this->encryptor = $encryptor ?? + ObjectManager::getInstance()->get(EncryptorInterface::class); } /** @@ -180,6 +190,10 @@ protected function _beforeSave(AbstractModel $user) if ($user->hasRoleId()) { $user->setReloadAclFlag(1); } + if ($user->getData('rp_token')) { + $rpToken = $user->getData('rp_token'); + $user->setRpToken($this->encryptor->encrypt($rpToken)); + } return parent::_beforeSave($user); } @@ -197,6 +211,10 @@ protected function _afterSave(AbstractModel $user) $this->_clearUserRoles($user); $this->_createUserRole($user->getRoleId(), $user); } + if ($user->getData('rp_token')) { + $rpToken = $user->getData('rp_token'); + $user->setRpToken($this->encryptor->decrypt($rpToken)); + } return $this; } @@ -255,6 +273,10 @@ protected function _afterLoad(AbstractModel $user) if (is_string($user->getExtra())) { $user->setExtra($this->getSerializer()->unserialize($user->getExtra())); } + if ($user->getData('rp_token')) { + $rpToken = $user->getData('rp_token'); + $user->setRpToken($this->encryptor->decrypt($rpToken)); + } return parent::_afterLoad($user); }
app/code/Magento/Usps/composer.json+16 −14 modified@@ -1,27 +1,28 @@ { "name": "magento/module-usps", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-catalog": "103.0.*", + "magento/module-catalog-inventory": "100.3.*", + "magento/module-config": "101.1.*", + "magento/module-directory": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-shipping": "100.3.*", + "magento/module-store": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Variable/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-variable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-config": "*", - "magento/module-ui": "*" + "magento/framework": "102.0.*", + "magento/module-backend": "101.0.*", + "magento/module-store": "101.0.*", + "magento/module-config": "101.1.*", + "magento/module-ui": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Variable/Model/Variable.php+30 −2 modified@@ -5,6 +5,10 @@ */ namespace Magento\Variable\Model; +use Magento\Framework\Model\AbstractModel; +use Magento\Framework\Validator\HTML\WYSIWYGValidatorInterface; +use Magento\Framework\App\ObjectManager; + /** * Custom variable model * @@ -16,7 +20,7 @@ * @api * @since 100.0.2 */ -class Variable extends \Magento\Framework\Model\AbstractModel +class Variable extends AbstractModel { const TYPE_TEXT = 'text'; @@ -32,24 +36,33 @@ class Variable extends \Magento\Framework\Model\AbstractModel */ protected $_escaper = null; + /** + * @var WYSIWYGValidatorInterface + */ + private $wysiwygValidator; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Escaper $escaper * @param \Magento\Variable\Model\ResourceModel\Variable $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data + * @param WYSIWYGValidatorInterface|null $wysiwygValidator */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Escaper $escaper, \Magento\Variable\Model\ResourceModel\Variable $resource, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, - array $data = [] + array $data = [], + ?WYSIWYGValidatorInterface $wysiwygValidator = null ) { $this->_escaper = $escaper; parent::__construct($context, $registry, $resource, $resourceCollection, $data); + $this->wysiwygValidator = $wysiwygValidator + ?? ObjectManager::getInstance()->get(WYSIWYGValidatorInterface::class); } /** @@ -122,6 +135,21 @@ public function getValue($type = null) return $this->getData('html_value'); } + /** + * @inheritDoc + */ + public function beforeSave() + { + $html_field = $this->getValue(self::TYPE_HTML); + parent::beforeSave(); + + //Validating HTML content. + if ($html_field && $html_field !== $this->getOrigData('html_value')) { + $this->wysiwygValidator->validate($html_field); + } + return $this; + } + /** * Validation of object data. Checking for unique variable code *
app/code/Magento/Variable/Test/Unit/Model/VariableTest.php+76 −8 modified@@ -5,48 +5,62 @@ */ namespace Magento\Variable\Test\Unit\Model; +use Magento\Framework\Escaper; +use Magento\Framework\Phrase; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Variable\Model\ResourceModel\Variable; use Magento\Variable\Model\ResourceModel\Variable\Collection; +use Magento\Framework\Validator\HTML\WYSIWYGValidatorInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase as TestCase; +use Magento\Framework\Validation\ValidationException; +use Throwable; -class VariableTest extends \PHPUnit\Framework\TestCase +class VariableTest extends TestCase { /** * @var \Magento\Variable\Model\Variable */ private $model; /** - * @var \Magento\Framework\Escaper|\PHPUnit\Framework\MockObject\MockObject + * @var Escaper|MockObject */ private $escaperMock; /** - * @var \Magento\Variable\Model\ResourceModel\Variable|\PHPUnit\Framework\MockObject\MockObject + * @var Variable|MockObject */ private $resourceMock; /** - * @var \Magento\Variable\Model\ResourceModel\Variable\Collection|\PHPUnit\Framework\MockObject\MockObject + * @var Collection|MockObject */ private $resourceCollectionMock; /** - * @var \Magento\Framework\Phrase + * @var Phrase */ private $validationFailedPhrase; /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * @var ObjectManager */ private $objectManager; + /** + * @var WYSIWYGValidatorInterface + */ + private $wysiwygValidator; + protected function setUp(): void { + $this->wysiwygValidator = $this->createMock(WYSIWYGValidatorInterface::class); $this->objectManager = new ObjectManager($this); - $this->escaperMock = $this->getMockBuilder(\Magento\Framework\Escaper::class) + $this->escaperMock = $this->getMockBuilder(Escaper::class) ->disableOriginalConstructor() ->getMock(); - $this->resourceMock = $this->getMockBuilder(\Magento\Variable\Model\ResourceModel\Variable::class) + $this->resourceMock = $this->getMockBuilder(Variable::class) ->disableOriginalConstructor() ->getMock(); $this->resourceCollectionMock = $this->getMockBuilder(Collection::class) @@ -58,6 +72,7 @@ protected function setUp(): void 'escaper' => $this->escaperMock, 'resource' => $this->resourceMock, 'resourceCollection' => $this->resourceCollectionMock, + 'wysiwygValidator' => $this->wysiwygValidator ] ); $this->validationFailedPhrase = __('Validation has failed.'); @@ -188,4 +203,57 @@ public function validateMissingInfoDataProvider() 'Missing name' => ['some-code', ''], ]; } + + /** + * Test Variable validation. + * + * @param string $value + * @param bool $isChanged + * @param bool $isValidated + * @param bool $exceptionThrown + * @dataProvider getWysiwygValidationCases + */ + public function testBeforeSave(string $value, bool $isChanged, bool $isValidated, bool $exceptionThrown): void + { + $actuallyThrown = false; + + if (!$isValidated) { + $this->wysiwygValidator->expects($this->any()) + ->method('validate') + ->willThrowException(new ValidationException(__('HTML is invalid'))); + } else { + $this->wysiwygValidator->expects($this->any())->method('validate'); + } + + $this->model->setData('html_value', $value); + + if (!$isChanged) { + $this->model->setOrigData('html_value', $value); + } else { + $this->model->setOrigData('html_value', $value . '-OLD'); + } + + try { + $this->model->beforeSave(); + } catch (Throwable $exception) { + $actuallyThrown = true; + } + + $this->assertEquals($exceptionThrown, $actuallyThrown); + } + + /** + * Validation cases. + * + * @return array + */ + public function getWysiwygValidationCases(): array + { + return [ + 'changed-html-value-without-exception' => ['<b>Test Html</b>',true,true,false], + 'changed-html-value-with-exception' => ['<b>Test Html</b>',true,false,true], + 'no-changed-html-value-without-exception' => ['<b>Test Html</b>',false,false,false], + 'no-html-value-with-exception' => ['',true,false,false] + ]; + } }
app/code/Magento/Vault/composer.json+15 −14 modified@@ -1,25 +1,25 @@ { "name": "magento/module-vault", - "description": "", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.7-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "102.0.*", + "magento/module-checkout": "100.3.*", + "magento/module-customer": "102.0.*", + "magento/module-payment": "100.3.*", + "magento/module-quote": "101.1.*", + "magento/module-sales": "102.0.*", + "magento/module-store": "101.0.*", + "magento/module-theme": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +29,4 @@ } } } +
app/code/Magento/VaultGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-vault-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-vault": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.3.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "102.0.*", + "magento/module-vault": "101.1.*", + "magento/module-graph-ql": "100.3.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Version/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-version", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.5", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Webapi/composer.json+14 −12 modified@@ -1,26 +1,27 @@ { "name": "magento/module-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.3.6-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-integration": "*", - "magento/module-store": "*" + "magento/framework": "102.0.*", + "magento/module-authorization": "100.3.*", + "magento/module-backend": "101.0.*", + "magento/module-integration": "100.3.*", + "magento/module-store": "101.0.*" }, "suggest": { - "magento/module-user": "*", - "magento/module-customer": "*" + "magento/module-user": "101.1.*", + "magento/module-customer": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php+59 −4 modified@@ -6,12 +6,18 @@ namespace Magento\Webapi\Controller\Rest; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Reflection\MethodsMap; +use Magento\Framework\Webapi\Exception; use Magento\Framework\Webapi\ServiceInputProcessor; use Magento\Framework\Webapi\Rest\Request as RestRequest; use Magento\Webapi\Controller\Rest\Router\Route; /** * This class is responsible for retrieving resolved input data + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class InputParamsResolver { @@ -46,33 +52,40 @@ class InputParamsResolver private $requestValidator; /** - * Initialize dependencies - * + * @var MethodsMap + */ + private $methodsMap; + + /** * @param RestRequest $request * @param ParamsOverrider $paramsOverrider * @param ServiceInputProcessor $serviceInputProcessor * @param Router $router * @param RequestValidator $requestValidator + * @param MethodsMap|null $methodsMap */ public function __construct( RestRequest $request, ParamsOverrider $paramsOverrider, ServiceInputProcessor $serviceInputProcessor, Router $router, - RequestValidator $requestValidator + RequestValidator $requestValidator, + MethodsMap $methodsMap = null ) { $this->request = $request; $this->paramsOverrider = $paramsOverrider; $this->serviceInputProcessor = $serviceInputProcessor; $this->router = $router; $this->requestValidator = $requestValidator; + $this->methodsMap = $methodsMap ?: ObjectManager::getInstance() + ->get(MethodsMap::class); } /** * Process and resolve input parameters * * @return array - * @throws \Magento\Framework\Webapi\Exception + * @throws Exception */ public function resolve() { @@ -81,6 +94,7 @@ public function resolve() $serviceMethodName = $route->getServiceMethod(); $serviceClassName = $route->getServiceClass(); $inputData = $this->getInputData(); + return $this->serviceInputProcessor->process($serviceClassName, $serviceMethodName, $inputData); } @@ -108,6 +122,7 @@ public function getInputData() } else { $inputData = $this->request->getRequestData(); } + $this->validateParameters($serviceClassName, $serviceMethodName, array_keys($route->getParameters())); return $this->paramsOverrider->override($inputData, $route->getParameters()); } @@ -122,6 +137,46 @@ public function getRoute() if (!$this->route) { $this->route = $this->router->match($this->request); } + return $this->route; } + + /** + * Validate that parameters are really used in the current request. + * + * @param string $serviceClassName + * @param string $serviceMethodName + * @param array $paramOverriders + */ + private function validateParameters( + string $serviceClassName, + string $serviceMethodName, + array $paramOverriders + ): void { + $methodParams = $this->methodsMap->getMethodParams($serviceClassName, $serviceMethodName); + foreach ($paramOverriders as $key => $param) { + $arrayKeys = explode('.', $param); + $value = array_shift($arrayKeys); + + foreach ($methodParams as $serviceMethodParam) { + $serviceMethodParamName = $serviceMethodParam[MethodsMap::METHOD_META_NAME]; + $serviceMethodType = $serviceMethodParam[MethodsMap::METHOD_META_TYPE]; + + $camelCaseValue = SimpleDataObjectConverter::snakeCaseToCamelCase($value); + if ($serviceMethodParamName === $value || $serviceMethodParamName === $camelCaseValue) { + if (count($arrayKeys) > 0) { + $camelCaseKey = SimpleDataObjectConverter::snakeCaseToCamelCase('set_' . $arrayKeys[0]); + $this->validateParameters($serviceMethodType, $camelCaseKey, [implode('.', $arrayKeys)]); + } + unset($paramOverriders[$key]); + break; + } + } + } + if (!empty($paramOverriders)) { + throw new \UnexpectedValueException( + __('The current request does not expect the next parameters: ' . implode(', ', $paramOverriders)) + ); + } + } }
5f07eba87829Magento Release 2.4.3-p3
300 files changed · +5289 −2136
app/code/Magento/AdminAnalytics/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-admin-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-release-notification": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-release-notification": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/AdminAnalytics/i18n/en_US.csv+3 −0 added@@ -0,0 +1,3 @@ +"Allow Adobe to collect usage data to improve user experience and offer in-product guidance", "Allow Adobe to collect usage data to improve user experience and offer in-product guidance" +"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>" +
app/code/Magento/AdminAnalytics/view/adminhtml/layout/adminhtml_dashboard_index.xml+1 −1 modified@@ -19,4 +19,4 @@ </block> </referenceContainer> </body> -</page> \ No newline at end of file +</page>
app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml+2 −6 modified@@ -49,7 +49,7 @@ <state>true</state> <options> <option name="modalClass" xsi:type="string">admin-usage-notification</option> - <option name="title" xsi:type="string" translate="true">Allow admin usage data collection</option> + <option name="title" xsi:type="string" translate="true">Allow Adobe to collect usage data to improve user experience and offer in-product guidance</option> <option name="autoOpen" xsi:type="boolean">true</option> <option name="type" xsi:type="string">popup</option> <option name="clickableOverlay" xsi:type="boolean">false</option> @@ -82,11 +82,7 @@ <item name="config" xsi:type="array"> <item name="label" xsi:type="string"/> <item name="additionalClasses" xsi:type="string">release-notification-text</item> - <item name="text" xsi:type="string" translate="true"><![CDATA[ - <p>Help us improve Magento Admin by allowing us to collect usage data.</p> - <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin and related products and services.</p> - <p>You can learn more and opt out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/stores/admin.html" target="_blank" tabindex="0">merchant documentation</a>.</p> -]]></item> + <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage">merchant documentation</a>.</p>]]></item> </item> </argument> </container>
app/code/Magento/AdminNotification/composer.json+13 −11 modified@@ -1,24 +1,25 @@ { "name": "magento/module-admin-notification", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/AdvancedPricingImportExport/composer.json+16 −14 modified@@ -1,26 +1,27 @@ { "name": "magento/module-advanced-pricing-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/AdvancedSearch/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-advanced-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-search": "*", - "magento/module-store": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Amqp/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-amqp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-amqp": "100.4.*", + "magento/framework-message-queue": "100.4.*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/AmqpStore/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-amqp-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/module-store": "*", + "magento/framework": "103.0.*", + "magento/framework-amqp": "100.4.*", + "magento/module-store": "101.1.*", "php": "~7.3.0||~7.4.0" }, "suggest": { - "magento/module-asynchronous-operations": "*", - "magento/framework-message-queue": "*" + "magento/module-asynchronous-operations": "100.4.*", + "magento/framework-message-queue": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Analytics/composer.json+10 −8 modified@@ -1,19 +1,20 @@ { "name": "magento/module-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AsynchronousOperations/composer.json+14 −12 modified@@ -1,27 +1,28 @@ { "name": "magento/module-asynchronous-operations", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", - "magento/framework-bulk": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/framework-bulk": "101.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", "php": "~7.3.0||~7.4.0" }, "suggest": { - "magento/module-admin-notification": "*", + "magento/module-admin-notification": "100.4.*", "magento/module-logging": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Authorization/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-authorization", "description": "Authorization module provides access to Magento ACL functionality.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AwsS3/composer.json+8 −6 modified@@ -1,20 +1,21 @@ { "name": "magento/module-aws-s3", "description": "N/A", + "type": "magento2-module", + "license": [ + "proprietary" + ], "config": { "sort-packages": true }, + "version": "100.4.1-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-remote-storage": "*", + "magento/framework": "103.0.*", + "magento/module-remote-storage": "100.4.*", "league/flysystem": "^2.0", "league/flysystem-aws-s3-v3": "^2.0" }, - "type": "magento2-module", - "license": [ - "proprietary" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/AwsS3/Test/Mftf/Helper/S3FileAssertions.php+7 −7 modified@@ -134,7 +134,7 @@ public function createDirectory($path, $permissions = 0777): void */ public function deleteDirectory($path): void { - if ($this->driver->isExists($path)) { + if ($this->driver->isDirectory($path)) { $this->driver->deleteDirectory($path); } } @@ -169,31 +169,31 @@ public function assertGlobbedFileExists($path, $pattern, $message = ''): void } /** - * Asserts that a file or directory exists on the remote storage system + * Asserts that a directory exists on the remote storage system * * @param string $path * @param string $message * @return void * * @throws \Magento\Framework\Exception\FileSystemException */ - public function assertPathExists($path, $message = ''): void + public function assertDirectoryExists($path, $message = ''): void { - $this->assertTrue($this->driver->isExists($path), "Failed asserting $path exists. " . $message); + $this->assertTrue($this->driver->isDirectory($path), "Failed asserting $path exists. " . $message); } /** - * Asserts that a file or directory does not exist on the remote storage system + * Asserts that a directory does not exist on the remote storage system * * @param string $path * @param string $message * @return void * * @throws \Magento\Framework\Exception\FileSystemException */ - public function assertPathDoesNotExist($path, $message = ''): void + public function assertDirectoryDoesNotExist($path, $message = ''): void { - $this->assertFalse($this->driver->isExists($path), "Failed asserting $path does not exist. " . $message); + $this->assertFalse($this->driver->isDirectory($path), "Failed asserting $path does not exist. " . $message); } /**
app/code/Magento/AwsS3/Test/Mftf/Suite/RemoteStorageAwsS3EnabledMediaGalleryUiSuite.xml+45 −0 added@@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> + <suite name="RemoteStorageAwsS3EnabledMediaGalleryUiSuite"> + <before> + <actionGroup ref="AdminDisableWYSIWYGActionGroup" stepKey="disableWYSIWYG" /> + <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="enableEnhancedMediaGallery"/> + <magentoCLI command="config:set {{MediaGalleryRenditionsDataEnabled.path}} {{MediaGalleryRenditionsDataEnabled.value}}" stepKey="enableMediaGalleryRenditions"/> + + <!-- Create Media Gallery Directories for `catalog/category` and `wysiwyg` --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromCategoryImage"/> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + + <!-- Enable AWS S3 Remote Storage --> + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/> + <magentoCLI command="remote-storage:sync" timeout="120" stepKey="syncRemoteStorage"/> + </before> + <after> + <magentoCLI command="config:set {{MediaGalleryRenditionsDataDisabled.path}} {{MediaGalleryRenditionsDataDisabled.value}}" stepKey="disableMediaGalleryRenditions"/> + <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="disableEnhancedMediaGallery"/> + <actionGroup ref="AdminEnableWYSIWYGActionGroup" stepKey="enableWYSIWYG" /> + + <!-- Disable Remote Storage --> + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/> + </after> + <include> + <group name="remote_storage_aws_s3_media_gallery_ui"/> + </include> + <exclude> + <group name="remote_storage_disabled"/> + <group name="remote_storage_aws_s3_pagebuilder"/> + </exclude> + </suite> +</suites>
app/code/Magento/AwsS3/Test/Mftf/Test/AdminAwsS3MediaGalleryDeleteFolderTest.xml+151 −0 added@@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminAwsS3MediaGalleryDeleteFolderTest"> + <annotations> + <features value="AwsS3"/> + <stories value="Media Gallery"/> + <title value="Verify Deleting Folder Deletes S3 and Local File Storage Directories"/> + <description value="Verify that when a user deletes a folder in Media Gallery that the directory gets + deleted in S3 and in the local file system."/> + <severity value="CRITICAL"/> + <group value="remote_storage_aws_s3_media_gallery_ui"/> + </annotations> + + <before> + <createData entity="_emptyCmsPage" stepKey="createCMSPage"/> + + <!-- Create Media Gallery Directories --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminBefore"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm2"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder2"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + </before> + + <after> + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> + + <!-- Delete Created Directories --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="select1stCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="delete1stCreatedFolder"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + </after> + + + <!-- Verify Images & Directories in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3BaseImageExists"> + <argument name="filePath">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3ThumbnailImageExists"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalBaseImageDirectoryDoesNotExist"> + <argument name="path">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalThumbnailImageExists"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + + <!-- Create CMS Page w/ Uploaded Image & Trigger Local Sync --> + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> + <argument name="CMSPage" value="$$createCMSPage$$"/> + </actionGroup> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expand1stCreatedFolder"> + <argument name="FolderName" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="select2ndCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectUploadedImage"> + <argument name="imageName" value="{{ImageUpload.file}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelected"/> + <actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="savePage"/> + <actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToPageOnStorefront"> + <argument name="page" value="$$createCMSPage.identifier$$"/> + </actionGroup> + + <!-- Verify Images in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3BaseImageExists2"> + <argument name="filePath">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3ThumbnailImageExists2"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalBaseImageExists2"> + <argument name="filePath">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalThumbnailImageExists2"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + + <!-- Delete 2nd Created Folder --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder2"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expand1stCreatedFolder2"> + <argument name="FolderName" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="select2ndCreatedFolder2"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> + <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + + <!-- Verify Images & Directories in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertDirectoryExists" stepKey="assertS31stCreatedBaseFolderExists"> + <argument name="path">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertS32ndCreatedBaseFolderDoesNotExist"> + <argument name="path">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3ThumbnailImageExists3"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertLocal1stCreatedBaseFolderExists"> + <argument name="path">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocal2ndCreatedBaseFolderDoesNotExist"> + <argument name="path">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalThumbnailImageExists3"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{AdminMediaGalleryFolder2Data.name}}/{{ImageUpload.file}}</argument> + </helper> + </test> +</tests>
app/code/Magento/AwsS3/Test/Mftf/Test/AdminAwsS3MediaGalleryDeleteImageTest.xml+149 −0 added@@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminAwsS3MediaGalleryDeleteImageTest"> + <annotations> + <features value="AwsS3"/> + <stories value="Media Gallery"/> + <title value="Verify Deleting Image Deletes S3 and Local File Storage Image"/> + <description value="Verify that when a user deletes an image in Media Gallery that the image gets deleted + in S3 and in the local file system."/> + <severity value="CRITICAL"/> + <group value="remote_storage_aws_s3_media_gallery_ui"/> + </annotations> + + <before> + <createData entity="_emptyCmsPage" stepKey="createCMSPage"/> + + <!-- Create Media Gallery Image --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminBefore"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + </before> + + <after> + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> + + <!-- Delete Created Directory --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + </after> + + + <!-- Verify Images & Directories in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3BaseImageExists"> + <argument name="filePath">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3ThumbnailImageExists"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalBaseImageDirectoryDoesNotExist"> + <argument name="path">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalThumbnailImageExists"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + + <!-- Create CMS Page w/ Uploaded Image & Trigger Local Sync --> + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> + <argument name="CMSPage" value="$$createCMSPage$$"/> + </actionGroup> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectUploadedImage"> + <argument name="imageName" value="{{ImageUpload.file}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelected"/> + <actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="savePage"/> + <actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToPageOnStorefront"> + <argument name="page" value="$$createCMSPage.identifier$$"/> + </actionGroup> + + <!-- Verify Images in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3BaseImageExists2"> + <argument name="filePath">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileExists" stepKey="assertS3ThumbnailImageExists2"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalBaseImageExists2"> + <argument name="filePath">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileExists" stepKey="assertLocalThumbnailImageExists2"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + + <!-- Delete Uploaded Image --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder2"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder2"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"> + <argument name="imageName" value="{{ImageUpload.file}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertImageNotExistsInTheGridActionGroup" stepKey="assertImageDeleted"> + <argument name="title" value="ImageUpload.file"/> + </actionGroup> + + <!-- Verify Images & Directories in S3 & Local File System --> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertDirectoryExists" stepKey="assertS3CreatedBaseFolderExists"> + <argument name="path">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileDoesNotExist" stepKey="assertS3BaseImageDoesNotExist"> + <argument name="filePath">media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertDirectoryExists" stepKey="assertS3ThumbnailDirectoryExists"> + <argument name="path">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertFileDoesNotExist" stepKey="assertS3ThumbnailImageDoesNotExist"> + <argument name="filePath">media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertLocalCreatedBaseFolderExists"> + <argument name="path">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalBaseImageDoesNotExist"> + <argument name="filePath">pub/media/wysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertLocalThumbnailDirectoryExists"> + <argument name="path">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalThumbnailImageDoesNotExist"> + <argument name="filePath">pub/media/.thumbswysiwyg/{{AdminMediaGalleryFolderData.name}}/{{ImageUpload.file}}</argument> + </helper> + </test> +</tests>
app/code/Magento/AwsS3/Test/Mftf/Test/AdminAwsS3SyncMediaFilesTest.xml+16 −16 modified@@ -125,19 +125,19 @@ <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteFileIfExists" stepKey="deleteLocalImage1"> <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage1IsDeleted"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage1IsDeleted"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> </helper> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteFileIfExists" stepKey="deleteLocalImage2"> <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage2IsDeleted"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage2IsDeleted"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> </helper> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> <argument name="path">pub/media/catalog/product/cache/</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalCacheDirectoryDeleted"> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalCacheDirectoryDeleted"> <argument name="path">pub/media/catalog/product/cache/</argument> </helper> @@ -152,13 +152,13 @@ </actionGroup> <!-- Assert Local File System Images & Cached Images Are Still Non-Existent --> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage1IsDeleted2"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage1IsDeleted2"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage2IsDeleted2"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage2IsDeleted2"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalCacheDirectoryDeleted2"> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalCacheDirectoryDeleted2"> <argument name="path">pub/media/catalog/product/cache/</argument> </helper> @@ -175,13 +175,13 @@ <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="assertDirectoryNotEmpty" stepKey="assertS3CacheDirectoryNotEmpty2"> <argument name="path">media/catalog/product/cache/</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage1IsDeleted3"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage1IsDeleted3"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage1FileName}/{$secondCharacterImage1FileName}/$createProductImage1.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalImage2IsDeleted3"> - <argument name="path">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertFileDoesNotExist" stepKey="assertLocalImage2IsDeleted3"> + <argument name="filePath">pub/media/catalog/product/{$firstCharacterImage2FileName}/{$secondCharacterImage2FileName}/$createProductImage2.entry[content][name]$</argument> </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalCacheDirectoryGone"> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalCacheDirectoryGone"> <argument name="path">pub/media/catalog/product/cache/</argument> </helper> @@ -206,7 +206,7 @@ <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/> <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage3"/> <actionGroup ref="AdminClickFlushCatalogImagesCacheActionGroup" stepKey="clearCatalogImageCache3"/> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertPathDoesNotExist" stepKey="assertLocalCacheDirectoryEmpty2"> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryDoesNotExist" stepKey="assertLocalCacheDirectoryEmpty2"> <argument name="path">pub/media/catalog/product/cache/</argument> </helper> <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushPageCache3">
app/code/Magento/AwsS3/Test/Mftf/Test/AwsS3ConfigurableProductChildImageShouldBeShownOnWishListTest.xml+1 −1 modified@@ -12,12 +12,12 @@ <annotations> <features value="Wishlist"/> <stories value="Configurable product child image should be Shown on wishlist"/> - <group value="wishlist"/> <title value="AWS S3 when user add Configurable child product to WIshlist then child product image should be shown in Wishlist"/> <description value="When user add Configurable child product to WIshlist then child product image should be shown in Wishlist"/> <severity value="MAJOR"/> <testCaseId value="MC-38708"/> <group value="remote_storage_aws_s3"/> + <group value="wishlist"/> </annotations> <before> <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
app/code/Magento/AwsS3/Test/Mftf/Test/AwsS3StorefrontPrintOrderGuestTest.xml+3 −0 modified@@ -15,6 +15,9 @@ <description value="Print Order from Guest on Frontend"/> <severity value="BLOCKER"/> <testCaseId value="MC-38689"/> + <skip> + <issueId value="MQE-2834" /> + </skip> <group value="remote_storage_aws_s3"/> </annotations> <before>
app/code/Magento/Backend/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-backend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backup": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-developer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-sales": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-backup": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-developer": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-translation": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php", @@ -43,3 +44,4 @@ } } } +
app/code/Magento/Backup/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-backup", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Bundle/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-bundle", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-webapi": "*", - "magento/module-bundle-sample-data": "*", - "magento/module-sales-rule": "*" + "magento/module-webapi": "100.4.*", + "magento/module-bundle-sample-data": "Sample Data version: 100.4.*", + "magento/module-sales-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/BundleGraphQl/composer.json+14 −12 modified@@ -2,22 +2,23 @@ "name": "magento/module-bundle-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-store": "*", - "magento/module-sales": "*", - "magento/module-sales-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-catalog": "104.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/BundleImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-bundle-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-bundle": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/CacheInvalidate/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-cache-invalidate", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-page-cache": "*" + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Captcha/composer.json+14 −12 modified@@ -1,27 +1,28 @@ { "name": "magento/module-captcha", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-authorization": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-authorization": "100.4.*", "laminas/laminas-captcha": "^2.10", "laminas/laminas-db": "^2.8.2", "laminas/laminas-session": "^2.10" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Captcha/Test/Mftf/Data/CaptchaConfigData.xml+12 −0 modified@@ -115,6 +115,18 @@ <data key="label">No</data> <data key="value">0</data> </entity> + <entity name="AdminCaptchaAdminLoginConfigData"> + <data key="path">admin/captcha/forms</data> + <data key="scope_id">0</data> + <data key="label">Admin Login</data> + <data key="value">backend_login</data> + </entity> + <entity name="AdminCaptchaAdminForgotPasswordConfigData"> + <data key="path">admin/captcha/forms</data> + <data key="scope_id">0</data> + <data key="label">Admin Forgot Password</data> + <data key="value">backend_forgotpassword</data> + </entity> <entity name="AdminCaptchaLength3ConfigData"> <data key="path">admin/captcha/length</data> <data key="scope">admin</data>
app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml+4 −0 modified@@ -21,13 +21,17 @@ </annotations> <before> + <magentoCLI command="config:set {{AdminCaptchaEnableConfigData.path}} {{AdminCaptchaEnableConfigData.value}} " stepKey="enableAdminCaptcha"/> + <magentoCLI command="config:set {{AdminCaptchaAdminLoginConfigData.path}} {{AdminCaptchaAdminLoginConfigData.value}}" stepKey="enableCaptchaOnAdminLogin"/> <magentoCLI command="config:set {{AdminCaptchaLength3ConfigData.path}} {{AdminCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> <magentoCLI command="config:set {{AdminCaptchaSymbols1ConfigData.path}} {{AdminCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" /> <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> <argument name="tags" value="config full_page"/> </actionGroup> </before> <after> + <magentoCLI command="config:set {{AdminCaptchaEnableConfigData.path}} {{AdminCaptchaEnableConfigData.value}} " stepKey="enableAdminCaptcha"/> + <magentoCLI command="config:set {{AdminCaptchaAdminLoginConfigData.path}} {{AdminCaptchaAdminLoginConfigData.value}},{{AdminCaptchaAdminForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms"/> <magentoCLI command="config:set {{AdminCaptchaDefaultLengthConfigData.path}} {{AdminCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" /> <magentoCLI command="config:set {{AdminCaptchaDefaultSymbolsConfigData.path}} {{AdminCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" /> <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaEditCustomerEmailTest.xml+2 −0 modified@@ -21,6 +21,7 @@ </annotations> <before> <!-- Setup CAPTCHA for testing --> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerChangePasswordConfigData.path}} {{StorefrontCaptchaOnCustomerChangePasswordConfigData.value}}" stepKey="enableUserEditCaptcha"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaSymbols1ConfigData.path}} {{StorefrontCustomerCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" /> @@ -36,6 +37,7 @@ </before> <after> <!-- Revert Captcha forms configurations --> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.path}} {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" />
app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnContactUsTest.xml+2 −0 modified@@ -20,6 +20,7 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaSymbols1ConfigData.path}} {{StorefrontCustomerCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" /> <magentoCLI command="config:set {{StorefrontCaptchaOnContactUsFormConfigData.path}} {{StorefrontCaptchaOnContactUsFormConfigData.value}}" stepKey="enableUserEditCaptcha"/> @@ -28,6 +29,7 @@ </actionGroup> </before> <after> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.path}} {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" /> <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms" />
app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnCustomerLoginTest.xml+4 −0 modified@@ -20,6 +20,8 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> + <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}}" stepKey="enableCaptchaOnCustomerLogin"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaSymbols1ConfigData.path}} {{StorefrontCustomerCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" /> <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> @@ -28,6 +30,8 @@ <createData entity="Simple_US_Customer" stepKey="customer"/> </before> <after> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> + <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.path}} {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" /> <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml+3 −1 modified@@ -32,6 +32,7 @@ <magentoCLI command="config:set {{BankTransferEnableConfigData.path}} {{BankTransferEnableConfigData.value}}" stepKey="enableBankTransfer"/> <!-- Enable captcha for Checkout/Placing Order --> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCaptchaOnOnepageCheckoutConfigData.path}} {{StorefrontCaptchaOnOnepageCheckoutConfigData.value}}" stepKey="enableOnOpageCheckoutCaptcha" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaModeAlwaysConfigData.path}} {{StorefrontCustomerCaptchaModeAlwaysConfigData.value}}" stepKey="alwaysEnableCaptcha" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> @@ -45,7 +46,8 @@ <magentoCLI command="config:set {{BankTransferDisabledConfigData.path}} {{BankTransferDisabledConfigData.value}}" stepKey="disabledBankTransfer"/> <!-- Set default configuration for captcha --> - <magentoCLI command="config:set {{StorefrontCaptchaOnOnepageCheckoutConfigData.path}} {{StorefrontCaptchaOnOnepageCheckoutConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms" /> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> + <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms"/> <magentoCLI command="config:set {{StorefrontCustomerCaptchaModeAfterFailConfigData.path}} {{StorefrontCustomerCaptchaModeAfterFailConfigData.value}}" stepKey="defaultCaptchaMode" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.path}} {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" />
app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaRegisterNewCustomerTest.xml+2 −0 modified@@ -21,6 +21,7 @@ </annotations> <before> <!-- Enable captcha for customer. --> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerCreateFormConfigData.path}} {{StorefrontCaptchaOnCustomerCreateFormConfigData.value}}" stepKey="enableUserRegistrationCaptcha" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaModeAlwaysConfigData.path}} {{StorefrontCustomerCaptchaModeAlwaysConfigData.value}}" stepKey="alwaysEnableCaptcha" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" /> @@ -31,6 +32,7 @@ </before> <after> <!-- Set default configuration. --> + <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/> <magentoCLI command="config:set {{StorefrontCaptchaOnCustomerLoginConfigData.path}} {{StorefrontCaptchaOnCustomerLoginConfigData.value}},{{StorefrontCaptchaOnCustomerForgotPasswordConfigData.value}}" stepKey="enableCaptchaOnDefaultForms" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaModeAfterFailConfigData.path}} {{StorefrontCustomerCaptchaModeAfterFailConfigData.value}}" stepKey="defaultCaptchaMode" /> <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" />
app/code/Magento/CardinalCommerce/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cardinal-commerce", "description": "Provides a possibility to enable 3-D Secure 2.0 support for payment methods.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CatalogAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-catalog-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/CatalogCmsGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-catalog-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Catalog/composer.json+36 −34 modified@@ -1,48 +1,49 @@ { "name": "magento/module-catalog", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.3-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-checkout": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-indexer": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-product-alert": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-indexer": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-product-alert": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-catalog-sample-data": "*" + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-catalog-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -52,3 +53,4 @@ } } } +
app/code/Magento/CatalogCustomerGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-catalog-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-catalog-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Catalog/etc/config.xml+3 −0 modified@@ -68,6 +68,9 @@ <allowed_resources> <tmp_images_folder>tmp</tmp_images_folder> <catalog_images_folder>catalog</catalog_images_folder> + <media_gallery_image_folders> + <category_image_folder>catalog/category</category_image_folder> + </media_gallery_image_folders> <product_custom_options_fodler>custom_options</product_custom_options_fodler> </allowed_resources> </media_storage_configuration>
app/code/Magento/CatalogGraphQl/composer.json+18 −16 modified@@ -2,27 +2,28 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-eav": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-catalog-search": "*", - "magento/framework": "*", - "magento/module-graph-ql": "*" + "magento/module-eav": "102.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-eav-graph-ql": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/framework": "103.0.*", + "magento/module-graph-ql": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/CatalogImportExport/composer.json+18 −16 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.3", "require": { "php": "~7.3.0||~7.4.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogInventory/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ }, "abandoned": "magento/inventory-composer-metapackage" } +
app/code/Magento/CatalogInventoryGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-inventory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/CatalogRule/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-import-export": "*", - "magento/module-catalog-rule-sample-data": "*" + "magento/module-import-export": "101.0.*", + "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogRuleConfigurable/composer.json+12 −10 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-rule-configurable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-configurable-product": "*" + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-configurable-product": "100.4.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/CatalogRuleGraphQl/composer.json+8 −6 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-rule-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/CatalogSearch/composer.json+20 −18 modified@@ -1,32 +1,33 @@ { "name": "magento/module-catalog-search", "description": "Catalog search", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-indexer": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-indexer": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } +
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddCategoryImageActionGroup.xml+2 −2 modified@@ -20,8 +20,8 @@ <waitForPageLoad time="30" stepKey="waitForPageLoad"/> <waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/> <attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/> - <waitForAjaxLoad time="30" stepKey="waitForAjaxUpload"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoading"/> + <comment userInput="BIC workaround" stepKey="waitForAjaxUpload"/> + <waitForPageLoad stepKey="waitForLoading"/> <grabTextFrom selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="grabCategoryFileName"/> <assertRegExp stepKey="assertEquals" message="pass"> <expectedResult type="string">/magento-logo(_[0-9]+)*?\.png$/</expectedResult>
app/code/Magento/Catalog/Test/Mftf/ActionGroup/NavigateToCreatedProductEditPageActionGroup.xml+2 −2 modified@@ -22,9 +22,9 @@ <waitForPageLoad stepKey="waitForClearFilters"/> <dontSeeElement selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="dontSeeClearFilters"/> <click selector="{{AdminProductGridFilterSection.viewDropdown}}" stepKey="openViewBookmarksTab"/> - <click selector="{{AdminProductGridFilterSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/> + <click selector="{{AdminProductGridFilterSection.viewBookmark(DefaultGridView.name)}}" stepKey="resetToDefaultGridView"/> <waitForPageLoad stepKey="waitForResetToDefaultView"/> - <see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/> + <see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="{{DefaultGridView.name}}" stepKey="seeDefaultViewSelected"/> <click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/> <fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/> <click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
app/code/Magento/Catalog/Test/Mftf/ActionGroup/ResetProductGridToDefaultViewActionGroup.xml+2 −2 modified@@ -16,8 +16,8 @@ <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> <click selector="{{AdminProductGridFilterSection.viewDropdown}}" stepKey="openViewBookmarksTab"/> - <click selector="{{AdminProductGridFilterSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/> + <click selector="{{AdminProductGridFilterSection.viewBookmark(DefaultGridView.name)}}" stepKey="resetToDefaultGridView"/> <waitForPageLoad stepKey="waitForProductGridLoad"/> - <see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/> + <see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="{{DefaultGridView.name}}" stepKey="seeDefaultViewSelected"/> </actionGroup> </actionGroups>
app/code/Magento/Catalog/Test/Mftf/Helper/LocalFileAssertions.php+7 −7 modified@@ -80,7 +80,7 @@ public function deleteFileIfExists($filePath): void public function deleteDirectory($path): void { $realPath = $this->expandPath($path); - if ($this->driver->isExists($realPath)) { + if ($this->driver->isDirectory($realPath)) { $this->driver->deleteDirectory($realPath); } } @@ -151,33 +151,33 @@ public function assertGlobbedFileExists($path, $pattern, $message = ''): void } /** - * Asserts that a file or directory exists + * Asserts that a directory exists * * @param string $path * @param string $message * @return void * * @throws \Magento\Framework\Exception\FileSystemException */ - public function assertPathExists($path, $message = ''): void + public function assertDirectoryExists($path, $message = ''): void { $realPath = $this->expandPath($path); - $this->assertTrue($this->driver->isExists($realPath), "Failed asserting $path exists. " . $message); + $this->assertTrue($this->driver->isDirectory($realPath), "Failed asserting $path exists. " . $message); } /** - * Asserts that a file or directory does not exist + * Asserts that a directory does not exist * * @param string $path * @param string $message * @return void * * @throws \Magento\Framework\Exception\FileSystemException */ - public function assertPathDoesNotExist($path, $message = ''): void + public function assertDirectoryDoesNotExist($path, $message = ''): void { $realPath = $this->expandPath($path); - $this->assertFalse($this->driver->isExists($realPath), "Failed asserting $path does not exist. " . $message); + $this->assertFalse($this->driver->isDirectory($realPath), "Failed asserting $path does not exist. " . $message); } /**
app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml+14 −4 modified@@ -23,7 +23,7 @@ <testCaseId value="MAGETWO-84373"/> </annotations> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToNewCatalog"/> - <waitForLoadingMaskToDisappear stepKey="wait2" /> + <comment userInput="BIC workaround" stepKey="wait2"/> <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/> <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="enterCategoryName"/> <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/> @@ -32,11 +32,15 @@ <waitForPageLoad stepKey="waitForPageLoad" /> <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> <actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="VerifyMediaGalleryStorageBtn"/> - <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder"> - <argument name="FolderName" value="Storage Root"/> + <comment userInput="BIC workaround" stepKey="navigateToFolder"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> </actionGroup> <actionGroup ref="CreateImageFolderActionGroup" stepKey="CreateImageFolder"> - <argument name="ImageFolder" value="ImageFolder"/> + <argument name="ImageFolder" value="ImageFolder"/> </actionGroup> <actionGroup ref="AttachImageActionGroup" stepKey="attachImage1"> <argument name="Image" value="ImageUpload3"/> @@ -54,6 +58,12 @@ <seeElementInDOM selector="{{StorefrontCategoryMainSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource"/> <after> <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> <argument name="ImageFolder" value="ImageFolder"/> </actionGroup>
app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml+29 −15 modified@@ -26,11 +26,21 @@ <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> + <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteFolderFromMediaGallery"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/> - <waitForPageLoad stepKey="waitForPageLoadProductCreatePage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"/> + <comment userInput="BIC workaround" stepKey="waitForPageLoadProductCreatePage"/> <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillBasicProductInfo" /> <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab" /> @@ -83,28 +93,32 @@ <click userInput="Storage Root" stepKey="clickOnRootFolder" /> <waitForLoadingMaskToDisappear stepKey="waitForLoading15"/> <dontSeeElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertFile}}" stepKey="dontSeeAddSelectedBtn3" /> - <attachFile selector="{{ProductShortDescriptionWYSIWYGToolbarSection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage3"/> - <waitForLoadingMaskToDisappear stepKey="waitForFileUpload3"/> - <waitForElementVisible selector="{{ProductShortDescriptionWYSIWYGToolbarSection.image(ImageUpload3.value)}}" stepKey="waitForUploadImage3" /> - <waitForElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.DeleteSelectedBtn}}" stepKey="waitForDeletebtn" /> - <see selector="{{ProductShortDescriptionWYSIWYGToolbarSection.DeleteSelectedBtn}}" userInput="Delete Selected" stepKey="seeDeleteBtn2"/> - <click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.DeleteSelectedBtn}}" stepKey="clickDeleteSelected2" /> - <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForConfirm3"/> - <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete2" /> - <dontSeeElement selector="{{ProductDescriptionWYSIWYGToolbarSection.InsertFile}}" stepKey="dontSeeAddSelectedBtn4" /> + <comment userInput="BIC workaround" stepKey="uploadImage3"/> + <comment userInput="BIC workaround" stepKey="waitForFileUpload3"/> + <comment userInput="BIC workaround" stepKey="waitForUploadImage3"/> + <comment userInput="BIC workaround" stepKey="waitForDeletebtn"/> + <comment userInput="BIC workaround" stepKey="seeDeleteBtn2"/> + <comment userInput="BIC workaround" stepKey="clickDeleteSelected2"/> + <comment userInput="BIC workaround" stepKey="waitForConfirm3"/> + <comment userInput="BIC workaround" stepKey="confirmDelete2"/> + <comment userInput="BIC workaround" stepKey="dontSeeAddSelectedBtn4"/> + <click userInput="{{ImageFolder.name}}" stepKey="selectCreatedFolder2" /> + <waitForPageLoad stepKey="waitForSelectFolder2"/> <attachFile selector="{{ProductShortDescriptionWYSIWYGToolbarSection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage4"/> - <waitForLoadingMaskToDisappear stepKey="waitForFileUpload4"/> + <waitForPageLoad stepKey="waitForFileUpload4"/> <waitForElementVisible selector="{{ProductShortDescriptionWYSIWYGToolbarSection.image(ImageUpload3.value)}}" stepKey="waitForUploadImage4" /> <click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertFile}}" stepKey="clickInsertBtn" /> - <waitForLoadingMaskToDisappear stepKey="waitForLoading11" /> + <waitForPageLoad stepKey="waitForLoading11" /> <waitForElementVisible selector="{{ProductShortDescriptionWYSIWYGToolbarSection.OkBtn}}" stepKey="waitForOkBtn2" /> <fillField selector="{{ProductShortDescriptionWYSIWYGToolbarSection.ImageDescription}}" userInput="{{ImageUpload3.content}}" stepKey="fillImageDescription2" /> <fillField selector="{{ProductShortDescriptionWYSIWYGToolbarSection.Height}}" userInput="{{ImageUpload3.height}}" stepKey="fillImageHeight2" /> <click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.OkBtn}}" stepKey="clickOkBtn2" /> <waitForPageLoad stepKey="waitForPageLoad6"/> <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/> - <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="navigateToProductPage"/> - <waitForPageLoad stepKey="waitForPageLoad7"/> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="navigateToProductPage"> + <argument name="productUrl" value="{{_defaultProduct.urlKey}}"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="waitForPageLoad7"/> <seeElement selector="{{StorefrontProductInfoMainSection.mediaDescription}}" stepKey="assertMediaDescription"/> <seeElementInDOM selector="{{StorefrontCategoryMainSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource3"/> <seeElementInDOM selector="{{StorefrontCategoryMainSection.imageSource(ImageUpload1.fileName)}}" stepKey="assertMediaSource1"/>
app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml+4 −4 modified@@ -49,17 +49,17 @@ <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seePrice"> <argument name="row" value="1"/> <argument name="column" value="Price"/> - <argument name="value" value="${{SimpleOutOfStockProduct.price}}"/> + <argument name="value" value="{{SimpleOutOfStockProduct.price}}"/> </actionGroup> <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectSpecialPrice"> <argument name="row" value="1"/> <argument name="column" value="Special Price"/> - <argument name="value" value="${{ApiProductSpecialPrice.value}}"/> + <argument name="value" value="{{ApiProductSpecialPrice.value}}"/> </actionGroup> <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectCost"> <argument name="row" value="1"/> <argument name="column" value="Cost"/> - <argument name="value" value="${{ApiProductCost.value}}"/> + <argument name="value" value="{{ApiProductCost.value}}"/> </actionGroup> </test> -</tests> +</tests> \ No newline at end of file
app/code/Magento/CatalogUrlRewrite/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogUrlRewriteGraphQl/composer.json+14 −12 modified@@ -2,23 +2,24 @@ "name": "magento/module-catalog-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*" + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/CatalogWidget/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-catalog-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/CheckoutAgreements/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-checkout-agreements", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/CheckoutAgreementsGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-checkout-agreements-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-checkout-agreements": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-checkout-agreements": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Checkout/composer.json+29 −27 modified@@ -1,41 +1,42 @@ { "name": "magento/module-checkout", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-security": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-security": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-authorization": "100.4.*" }, "suggest": { - "magento/module-cookie": "*" + "magento/module-cookie": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } +
app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php+14 −2 modified@@ -3,19 +3,25 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Checkout\Controller\Sidebar; use Magento\Checkout\Model\Cart\RequestQuantityProcessor; use Magento\Checkout\Model\Sidebar; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; +use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\App\Response\Http; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Json\Helper\Data; use Psr\Log\LoggerInterface; -class UpdateItemQty extends Action +/** + * Class used to update item quantity. + */ +class UpdateItemQty extends Action implements HttpPostActionInterface { /** * @var Sidebar @@ -61,12 +67,18 @@ public function __construct( } /** + * Action for Quantity update + * * @return $this */ public function execute() { $itemId = (int)$this->getRequest()->getParam('item_id'); - $itemQty = $this->getRequest()->getParam('item_qty') * 1; + $itemQty = (int)$this->getRequest()->getParam('item_qty'); + + if ($itemQty <= 0) { + return $this->jsonResponse(__('Invalid Item Quantity Requested.')); + } $itemQty = $this->quantityProcessor->prepareQuantity($itemQty); try {
app/code/Magento/Checkout/i18n/en_US.csv+1 −0 modified@@ -186,3 +186,4 @@ Payment,Payment "Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" "You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>." "The shipping method is missing. Select the shipping method and try again.","The shipping method is missing. Select the shipping method and try again." +"Invalid Item Quantity Requested.","Invalid Item Quantity Requested."
app/code/Magento/Checkout/Model/DefaultConfigProvider.php+17 −8 modified@@ -31,6 +31,7 @@ use Magento\Quote\Model\QuoteIdMaskFactory; use Magento\Store\Model\ScopeInterface; use Magento\Ui\Component\Form\Element\Multiline; +use Magento\Framework\Escaper; /** * Default Config Provider for checkout @@ -97,7 +98,7 @@ class DefaultConfigProvider implements ConfigProviderInterface private $configurationPool; /** - * @param QuoteIdMaskFactory + * @var QuoteIdMaskFactory */ protected $quoteIdMaskFactory; @@ -191,6 +192,11 @@ class DefaultConfigProvider implements ConfigProviderInterface */ private $configPostProcessor; + /** + * @var Escaper + */ + private $escaper; + /** * @param CheckoutHelper $checkoutHelper * @param Session $checkoutSession @@ -222,6 +228,7 @@ class DefaultConfigProvider implements ConfigProviderInterface * @param AddressMetadataInterface $addressMetadata * @param AttributeOptionManagementInterface $attributeOptionManager * @param CustomerAddressDataProvider|null $customerAddressData + * @param Escaper|null $escaper * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -255,7 +262,8 @@ public function __construct( CaptchaConfigPostProcessorInterface $configPostProcessor, AddressMetadataInterface $addressMetadata = null, AttributeOptionManagementInterface $attributeOptionManager = null, - CustomerAddressDataProvider $customerAddressData = null + CustomerAddressDataProvider $customerAddressData = null, + Escaper $escaper = null ) { $this->checkoutHelper = $checkoutHelper; $this->checkoutSession = $checkoutSession; @@ -289,6 +297,7 @@ public function __construct( $this->customerAddressData = $customerAddressData ?: ObjectManager::getInstance()->get(CustomerAddressDataProvider::class); $this->configPostProcessor = $configPostProcessor; + $this->escaper = $escaper ?? ObjectManager::getInstance()->get(Escaper::class); } /** @@ -338,17 +347,17 @@ public function getConfig() $output['imageData'] = $this->imageProvider->getImages($quoteId); $output['totalsData'] = $this->getTotalsData(); + $policyContent = $this->scopeConfig->getValue( + 'shipping/shipping_policy/shipping_policy_content', + ScopeInterface::SCOPE_STORE + ); + $policyContent = $this->escaper->escapeHtml($policyContent); $output['shippingPolicy'] = [ 'isEnabled' => $this->scopeConfig->isSetFlag( 'shipping/shipping_policy/enable_shipping_policy', ScopeInterface::SCOPE_STORE ), - 'shippingPolicyContent' => nl2br( - $this->scopeConfig->getValue( - 'shipping/shipping_policy/shipping_policy_content', - ScopeInterface::SCOPE_STORE - ) - ) + 'shippingPolicyContent' => $policyContent ? nl2br($policyContent) : '' ]; $output['useQty'] = $this->scopeConfig->isSetFlag( 'checkout/cart_link/use_qty',
app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest/CheckCheckoutSuccessPageAsRegisterCustomerTest.xml+3 −0 modified@@ -15,6 +15,9 @@ <description value="To be sure that other elements of Success page are shown for placed order as registered Customer."/> <severity value="CRITICAL"/> <testCaseId value="MC-16488"/> + <skip> + <issueId value="MQE-2834" /> + </skip> <group value="checkout"/> </annotations>
app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/UpdateItemQtyTest.php+35 −0 modified@@ -19,6 +19,9 @@ use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +/** + * Class used to execute test cases for update item quantity + */ class UpdateItemQtyTest extends TestCase { /** @var UpdateItemQty */ @@ -228,4 +231,36 @@ public function testExecuteWithException() $this->assertEquals('json represented', $this->updateItemQty->execute()); } + + /** + * @return void + */ + public function testExecuteWithInvalidItemQty(): void + { + $error = [ + 'success' => false, + 'error_message' => 'Invalid Item Quantity Requested.' + ]; + $jsonResult = json_encode($error); + $this->requestMock + ->method('getParam') + ->withConsecutive(['item_id', null], ['item_qty', null]) + ->willReturnOnConsecutiveCalls('1', '{{7+2}}'); + + $this->sidebarMock->expects($this->once()) + ->method('getResponseData') + ->with('Invalid Item Quantity Requested.') + ->willReturn($error); + + $this->jsonHelperMock->expects($this->once()) + ->method('jsonEncode') + ->with($error) + ->willReturn($jsonResult); + + $this->responseMock->expects($this->once()) + ->method('representJson') + ->willReturn($jsonResult); + + $this->assertEquals($jsonResult, $this->updateItemQty->execute()); + } }
app/code/Magento/Cms/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-cms", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.3-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-variable": "*", - "magento/module-widget": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "magento/module-widget": "101.2.*" }, "suggest": { - "magento/module-cms-sample-data": "*" + "magento/module-cms-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php+2 −3 modified@@ -61,7 +61,7 @@ public function __construct( public function execute() { $resultJson = $this->resultJsonFactory->create(); - + $result = []; if (!$this->getRequest()->isPost()) { $result = ['error' => true, 'message' => __('Wrong request.')]; /** @var \Magento\Framework\Controller\Result\Json $resultJson */ @@ -94,8 +94,7 @@ public function execute() // phpcs:ignore Magento2.Exceptions.ThrowCatch } catch (\Exception $e) { $result = ['error' => true, 'message' => $e->getMessage()]; - - return $resultJson->setData($result); } + return $resultJson->setData($result); } }
app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php+5 −6 modified@@ -60,17 +60,16 @@ public function __construct( */ public function execute() { + $result = []; try { $path = $this->getStorage()->getCmsWysiwygImages()->getCurrentPath(); $this->getStorage()->deleteDirectory($path); - - return $this->resultRawFactory->create(); } catch (\Exception $e) { $result = ['error' => true, 'message' => $e->getMessage()]; - /** @var \Magento\Framework\Controller\Result\Json $resultJson */ - $resultJson = $this->resultJsonFactory->create(); - - return $resultJson->setData($result); } + /** @var \Magento\Framework\Controller\Result\Json $resultJson */ + $resultJson = $this->resultJsonFactory->create(); + + return $resultJson->setData($result); } }
app/code/Magento/Cms/etc/config.xml+3 −1 modified@@ -30,7 +30,9 @@ <system> <media_storage_configuration> <allowed_resources> - <wysiwyg_image_folder>wysiwyg</wysiwyg_image_folder> + <media_gallery_image_folders> + <wysiwyg_image_folder>wysiwyg</wysiwyg_image_folder> + </media_gallery_image_folders> <preview_folder>.thumbs</preview_folder> </allowed_resources> </media_storage_configuration>
app/code/Magento/CmsGraphQl/composer.json+13 −11 modified@@ -2,22 +2,23 @@ "name": "magento/module-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-widget": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-widget": "101.2.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Cms/i18n/en_US.csv+4 −1 modified@@ -79,7 +79,7 @@ Pages,Pages "Please rename the folder using only Latin letters, numbers, underscores and dashes.","Please rename the folder using only Latin letters, numbers, underscores and dashes." "We found a directory with the same name. Please try another folder name.","We found a directory with the same name. Please try another folder name." "We cannot create a new directory.","We cannot create a new directory." -"We cannot delete directory %1.","We cannot delete directory %1." +"We cannot delete the selected directory.","We cannot delete the selected directory." "We can't upload the file right now.","We can't upload the file right now." "We can't delete root directory %1 right now.","We can't delete root directory %1 right now." "Directory %1 is not under storage root path.","Directory %1 is not under storage root path." @@ -157,3 +157,6 @@ Enable,Enable "Custom Theme","Custom Theme" "Custom Layout","Custom Layout" "Edit Page Design","Edit Page Design" +"We cannot create the folder under the selected directory.","We cannot create the folder under the selected directory." +"We can't delete the file right now.", "We can't delete the file right now." +"We can't upload the file to the current folder right now. Please try another folder.","We can't upload the file to the current folder right now. Please try another folder."
app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php+167 −24 modified@@ -9,8 +9,10 @@ namespace Magento\Cms\Model\Wysiwyg\Images; use Magento\Cms\Helper\Wysiwyg\Images; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Exception\LocalizedException; /** * Wysiwyg Images model. @@ -35,6 +37,9 @@ class Storage extends \Magento\Framework\DataObject const THUMB_PLACEHOLDER_PATH_SUFFIX = 'Magento_Cms::images/placeholder_thumbnail.jpg'; + private const MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH + = 'system/media_storage_configuration/allowed_resources/media_gallery_image_folders'; + /** * Config object * @@ -158,6 +163,21 @@ class Storage extends \Magento\Framework\DataObject */ private $mime; + /** + * @var ScopeConfigInterface + */ + private $coreConfig; + + /** + * @var string + */ + private $allowedPathPattern; + + /** + * @var array + */ + private $allowedDirs; + /** * Construct * @@ -181,6 +201,7 @@ class Storage extends \Magento\Framework\DataObject * @param \Magento\Framework\Filesystem\Io\File|null $ioFile * @param \Psr\Log\LoggerInterface|null $logger * @param \Magento\Framework\File\Mime $mime + * @param ScopeConfigInterface $coreConfig * * @throws \Magento\Framework\Exception\FileSystemException * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -205,7 +226,8 @@ public function __construct( \Magento\Framework\Filesystem\DriverInterface $file = null, \Magento\Framework\Filesystem\Io\File $ioFile = null, \Psr\Log\LoggerInterface $logger = null, - \Magento\Framework\File\Mime $mime = null + \Magento\Framework\File\Mime $mime = null, + ScopeConfigInterface $coreConfig = null ) { $this->_session = $session; $this->_backendUrl = $backendUrl; @@ -226,7 +248,31 @@ public function __construct( $this->file = $file ?: ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Driver\File::class); $this->ioFile = $ioFile ?: ObjectManager::getInstance()->get(\Magento\Framework\Filesystem\Io\File::class); $this->mime = $mime ?: ObjectManager::getInstance()->get(\Magento\Framework\File\Mime::class); + $this->coreConfig = $coreConfig ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class); parent::__construct($data); + $this->initStorage(); + } + + /** + * Initialize storage by creating wysiwyg image folders + * + * @return void + */ + private function initStorage(): void + { + $imageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + foreach ($imageFolders as $folder) { + try { + $this->_directory->create($folder); + } catch (LocalizedException $e) { + $this->logger->error( + sprintf("Creating media gallery image folder %s caused error: %s", $folder, $e->getMessage()) + ); + } + } } /** @@ -254,6 +300,7 @@ protected function createSubDirectories($path) * Prepare and get conditions for exclude directories * * @return array + * @deprecated */ protected function getConditionsForExcludeDirs() { @@ -281,6 +328,7 @@ protected function getConditionsForExcludeDirs() * @param \Magento\Framework\Data\Collection\Filesystem $collection * @param array $conditions * @return \Magento\Framework\Data\Collection\Filesystem + * @deprecated */ protected function removeItemFromCollection($collection, $conditions) { @@ -318,9 +366,11 @@ public function getDirsCollection($path) ->setCollectRecursively(false) ->setOrder('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC); - $conditions = $this->getConditionsForExcludeDirs(); + if (!$this->isDirectoryAllowed($path)) { + $collection->setDirsFilter($this->getAllowedDirMask($path)); + } - return $this->removeItemFromCollection($collection, $conditions); + return $collection; } /** @@ -335,6 +385,8 @@ public function getDirsCollection($path) */ public function getFilesCollection($path, $type = null) { + $collectFiles = $this->isDirectoryAllowed($path); + if ($this->_coreFileStorageDb->checkDbUsage()) { $files = $this->_storageDatabaseFactory->create()->getDirectoryFiles($path); @@ -350,7 +402,7 @@ public function getFilesCollection($path, $type = null) )->setCollectDirs( false )->setCollectFiles( - true + $collectFiles )->setCollectRecursively( false )->setOrder( @@ -436,6 +488,12 @@ public function createDirectory($name, $path) ); } + if (!($this->isDirectoryAllowed(rtrim($path, '/') . '/' . $name))) { + throw new \Magento\Framework\Exception\LocalizedException( + __('We cannot create the folder under the selected directory.') + ); + } + $relativePath = (string) $this->_directory->getRelativePath($path); if (!$this->_directory->isDirectory($relativePath) || !$this->_directory->isWritable($relativePath)) { $path = $this->_cmsWysiwygImages->getStorageRoot(); @@ -477,14 +535,16 @@ public function createDirectory($name, $path) */ public function deleteDirectory($path) { - if ($this->_coreFileStorageDb->checkDbUsage()) { - $this->_directoryDatabaseFactory->create()->deleteDirectory($path); - } - if (!$this->isPathAllowed($path, $this->getConditionsForExcludeDirs())) { + if (!$this->isDirectoryAllowed(dirname($path))) { throw new \Magento\Framework\Exception\LocalizedException( - __('We cannot delete directory %1.', $this->_getRelativePathToRoot($path)) + __('We cannot delete the selected directory.') ); } + + if ($this->_coreFileStorageDb->checkDbUsage()) { + $this->_directoryDatabaseFactory->create()->deleteDirectory($path); + } + try { $this->_deleteByPath($path); $path = $this->getThumbnailRoot() . $this->_getRelativePathToRoot($path); @@ -524,6 +584,11 @@ protected function _deleteByPath($path) */ public function deleteFile($target) { + if (!$this->isDirectoryAllowed(dirname($target))) { + throw new \Magento\Framework\Exception\LocalizedException( + __('We can\'t delete the file right now.') + ); + } $relativePath = $this->_directory->getRelativePath($target); if ($this->_directory->isFile($relativePath)) { $this->_directory->delete($relativePath); @@ -551,9 +616,9 @@ public function deleteFile($target) */ public function uploadFile($targetPath, $type = null) { - if (!$this->isPathAllowed($targetPath, $this->getConditionsForExcludeDirs())) { + if (!($this->isDirectoryAllowed($targetPath))) { throw new \Magento\Framework\Exception\LocalizedException( - __('We can\'t upload the file to current folder right now. Please try another folder.') + __('We can\'t upload the file to the current folder right now. Please try another folder.') ); } /** @var \Magento\MediaStorage\Model\File\Uploader $uploader */ @@ -574,7 +639,7 @@ public function uploadFile($targetPath, $type = null) } // create thumbnail - $this->resizeFile($targetPath . '/' . ltrim($uploader->getUploadedFileName(), '/'), true); + $this->resizeFile(rtrim($targetPath, '/') . '/' . ltrim($uploader->getUploadedFileName(), '/'), true); return $result; } @@ -903,27 +968,105 @@ private function getExtensionsList($type = null): array } /** - * Check if path is not in excluded dirs. + * Check if directory is allowed * - * @param string $path Absolute path - * @param array $conditions Exclude conditions + * @param string $directoryPath Absolute path to a directory * @return bool */ - private function isPathAllowed($path, array $conditions): bool + private function isDirectoryAllowed($directoryPath): bool { - $isAllowed = true; - $regExp = $conditions['reg_exp'] ? '~' . implode('|', array_keys($conditions['reg_exp'])) . '~i' : null; $storageRoot = $this->_cmsWysiwygImages->getStorageRoot(); $storageRootLength = strlen($storageRoot); + $mediaSubPathname = substr($directoryPath, $storageRootLength); + if (!$mediaSubPathname) { + return false; + } + $mediaSubPathname = ltrim($mediaSubPathname, '/'); + return preg_match($this->getAllowedPathPattern(), $mediaSubPathname) == 1; + } - $mediaSubPathname = substr($path, $storageRootLength); - $rootChildParts = explode('/', '/' . ltrim($mediaSubPathname, '/')); + /** + * Get allowed path pattern + * + * @return string + */ + private function getAllowedPathPattern() + { + if (null === $this->allowedPathPattern) { + $mediaGalleryImageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + $regExp = '/^('; + $or = ''; + foreach($mediaGalleryImageFolders as $folder) { + $folderPattern = str_replace('/', '[\/]+', $folder); + $regExp .= $or . $folderPattern . '\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$'; + $or = '|'; + } + $regExp .= ')/'; + $this->allowedPathPattern = $regExp; + } + return $this->allowedPathPattern; + } + + /** + * Get allowed media gallery image folders + * + * example: + * [ + * [0 => 'wysiwyg'], + * [0 => 'catalog', 1 => 'category'] + * ]; + * + * @return array + */ + private function getAllowedDirs(): array + { + if (null == $this->allowedDirs) { + $imageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + + $this->allowedDirs = []; + foreach ($imageFolders as $folder) { + $this->allowedDirs[] = explode('/', $folder); + } + } + return $this->allowedDirs; + } - if (array_key_exists($rootChildParts[1], $conditions['plain']) - || ($regExp && preg_match($regExp, $path))) { - $isAllowed = false; + /** + * Get allowed dir mask. + * + * @param string $path + * @return string + */ + private function getAllowedDirMask(string $path) + { + $allowedDirs = $this->getAllowedDirs(); + // subfolder level under storage root + $subfolderLevel = 1; + $storageRoot = $this->_cmsWysiwygImages->getStorageRoot(); + $storageRootLength = strlen($storageRoot); + $mediaSubPathname = substr($path, $storageRootLength); + // Filter out the irrelevant allowed dirs for the path from the $allowedDirs array + if ($mediaSubPathname) { + $pathSegments = explode('/', trim($mediaSubPathname, '/')); + foreach ($pathSegments as $index => $pathSegment) { + // Find indexes of the relevant allowed dirs based on the path segment + $subDirKeys = array_keys(array_column($allowedDirs, $index), $pathSegment); + $dirs = []; + // Rebuild the allowed dirs based on the found indexes + foreach ($subDirKeys as $subDirKey) { + $dirs[] = $allowedDirs[$subDirKey]; + } + $allowedDirs = $dirs; + $subfolderLevel++; + } } - return $isAllowed; + return '/^(' . implode('|', array_unique(array_column($allowedDirs, $subfolderLevel - 1))) . ')$/'; } }
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminExpandMediaGalleryFolderActionGroup.xml+22 −0 added@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminExpandMediaGalleryFolderActionGroup"> + <annotations> + <description>Expands the provided Folder Name in the Media Gallery.</description> + </annotations> + <arguments> + <argument name="FolderName" type="string"/> + </arguments> + <conditionalClick selector="{{MediaGallerySection.mediaGalleryFolderTreeIconCollapsed(FolderName)}}" dependentSelector="{{MediaGallerySection.mediaGalleryFolderTreeIconCollapsed(FolderName)}}" visible="true" stepKey="clickFolderIfCollapsed"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <waitForElement selector="{{MediaGallerySection.mediaGalleryFolderTreeIconExpanded(FolderName)}}" stepKey="waitForExpandedFolder"/> + </actionGroup> +</actionGroups>
app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteFolderActionGroup.xml+2 −2 modified@@ -17,8 +17,8 @@ </arguments> <click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoading"/> - <see selector="{{MediaGallerySection.DeleteFolder}}" userInput="Delete Folder" stepKey="seeDeleteFolderBtn"/> + <waitForPageLoad stepKey="waitForLoading"/> + <waitForText selector="{{MediaGallerySection.DeleteFolder}}" userInput="Delete Folder" stepKey="seeDeleteFolderBtn"/> <click selector="{{MediaGallerySection.DeleteFolder}}" stepKey="clickDeleteFolderBtn"/> <waitForText userInput="OK" stepKey="waitForConfirm"/> <click selector="{{MediaGallerySection.confirmDelete}}" stepKey="confirmDelete"/>
app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/MediaGallerySection.xml+2 −0 modified@@ -36,5 +36,7 @@ <element name="confirmDelete" type="button" selector=".action-primary.action-accept"/> <element name="imageBlockByName" type="block" selector="//div[@data-row='file'][contains(., '{{imageName}}')]" parameterized="true"/> <element name="insertEditImageModalWindow" type="block" selector=".mce-floatpanel.mce-window[aria-label='Insert/edit image']"/> + <element name="mediaGalleryFolderTreeIconCollapsed" type="button" parameterized="true" selector="//a[text()='{{folderName}}']/parent::li[contains(@class,'jstree-closed')]/ins"/> + <element name="mediaGalleryFolderTreeIconExpanded" type="button" parameterized="true" selector="//a[text()='{{folderName}}']/parent::li[contains(@class,'jstree-open')]/ins"/> </section> </sections>
app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml+11 −1 modified@@ -37,9 +37,13 @@ <waitForPageLoad stepKey="waitForPageLoad2" /> <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> <actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="VerifyMediaGalleryStorageBtn"/> - <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder"> + <comment userInput="BIC workaround" stepKey="navigateToFolder"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> <argument name="FolderName" value="Storage Root"/> </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="CreateImageFolderActionGroup" stepKey="CreateImageFolder"> <argument name="ImageFolder" value="ImageFolder"/> </actionGroup> @@ -60,6 +64,12 @@ <seeElementInDOM selector="{{StorefrontBlockSection.imageSource(ImageUpload.fileName)}}" stepKey="assertMediaSource"/> <after> <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> <argument name="ImageFolder" value="ImageFolder"/> </actionGroup>
app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml+12 −2 modified@@ -25,6 +25,12 @@ </before> <after> <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> <argument name="ImageFolder" value="ImageFolder"/> </actionGroup> @@ -43,8 +49,12 @@ <waitForPageLoad stepKey="waitForPageLoad" /> <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> <actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="VerifyMediaGalleryStorageBtn"/> - <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder"> - <argument name="FolderName" value="Storage Root"/> + <comment userInput="BIC workaround" stepKey="navigateToFolder"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> </actionGroup> <actionGroup ref="CreateImageFolderActionGroup" stepKey="CreateImageFolder"> <argument name="ImageFolder" value="ImageFolder"/>
app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml+43 −4 modified@@ -33,16 +33,41 @@ <comment userInput="Disable WYSIWYG options" stepKey="commentDisableWYSIWYG"/> <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> <deleteData createDataKey="createBlock" stepKey="deleteBlock" /> + <!-- Delete Uploaded Images --> + <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open created block page and add image--> <comment userInput="Open create block page and add image" stepKey="commentOpenBlockPage"/> <actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage1"> <argument name="CMSBlockPage" value="$$createBlock$$"/> </actionGroup> - <actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImage"> - <argument name="image" value="TestImageNew"/> + <comment userInput="BIC workaround" stepKey="addImage"/> + <actionGroup ref="ClickInsertEditImageTinyMCEButtonActionGroup" stepKey="clickInsertImage"/> + <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> + <argument name="FolderName" value="Storage Root"/> </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="CreateImageFolderActionGroup" stepKey="createImageFolder"> + <argument name="ImageFolder" value="ImageFolder"/> + </actionGroup> + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage"> + <argument name="Image" value="ImageUpload3"/> + </actionGroup> + <actionGroup ref="SaveImageActionGroup" stepKey="insertImage"/> + <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOk"/> <click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnFirstTime"/> <click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnSecondTime"/> <waitForPageLoad stepKey="waitForPageLoad"/> @@ -53,9 +78,23 @@ <switchToIFrame stepKey="switchBack"/> <!--Add image second time and assert--> <comment userInput="Add image second time and assert" stepKey="commentAddImageAndAssert"/> - <actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImageSecondTime"> - <argument name="image" value="MagentoLogo"/> + <comment userInput="BIC workaround" stepKey="addImageSecondTime"/> + <actionGroup ref="ClickInsertEditImageTinyMCEButtonActionGroup" stepKey="clickInsertImage2"/> + <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="openMediaGallery2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder2"> + <argument name="FolderName" value="Storage Root"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder2"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToTestFolder2"> + <argument name="FolderName" value="{{ImageFolder.name}}"/> + </actionGroup> + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage2"> + <argument name="Image" value="ImageUpload3"/> </actionGroup> + <actionGroup ref="SaveImageActionGroup" stepKey="insertImage2"/> + <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOk2"/> <switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrameSecondTime"/> <seeElement selector="{{BlockContentSection.image}}" stepKey="seeImageElement"/> </test>
app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php+81 −110 modified@@ -14,8 +14,8 @@ use Magento\Cms\Model\Wysiwyg\Images\Storage; use Magento\Cms\Model\Wysiwyg\Images\Storage\Collection as StorageCollection; use Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\DataObject; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\Directory\Write; @@ -49,92 +49,92 @@ class StorageTest extends TestCase /** * @var Storage */ - protected $imagesStorage; + private $imagesStorage; /** * @var MockObject */ - protected $filesystemMock; + private $filesystemMock; /** * @var MockObject */ - protected $adapterFactoryMock; + private $adapterFactoryMock; /** * @var MockObject */ - protected $imageHelperMock; + private $imageHelperMock; /** * @var array() */ - protected $resizeParameters; + private $resizeParameters; /** * @var CollectionFactory|MockObject */ - protected $storageCollectionFactoryMock; + private $storageCollectionFactoryMock; /** * @var FileFactory|MockObject */ - protected $storageFileFactoryMock; + private $storageFileFactoryMock; /** * @var DatabaseFactory|MockObject */ - protected $storageDatabaseFactoryMock; + private $storageDatabaseFactoryMock; /** * @var \Magento\MediaStorage\Model\File\Storage\Directory\DatabaseFactory|MockObject */ - protected $directoryDatabaseFactoryMock; + private $directoryDatabaseFactoryMock; /** * @var Database|MockObject */ - protected $directoryCollectionMock; + private $directoryCollectionMock; /** * @var UploaderFactory|MockObject */ - protected $uploaderFactoryMock; + private $uploaderFactoryMock; /** * @var Session|MockObject */ - protected $sessionMock; + private $sessionMock; /** * @var Url|MockObject */ - protected $backendUrlMock; + private $backendUrlMock; /** * @var Write|MockObject */ - protected $directoryMock; + private $directoryMock; /** * @var DriverInterface|MockObject */ - protected $driverMock; + private $driverMock; /** * @var \Magento\MediaStorage\Helper\File\Storage\Database|MockObject */ - protected $coreFileStorageMock; + private $coreFileStorageMock; /** * @var ObjectManager|MockObject */ - protected $objectManagerHelper; + private $objectManagerHelper; /** * @var File|MockObject */ - protected $ioFileMock; + private $ioFileMock; /** * @var \Magento\Framework\Filesystem\Driver\File|MockObject @@ -148,6 +148,11 @@ class StorageTest extends TestCase 'gif' => 'image/png', ]; + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface|MockObject + */ + private $coreConfigMock; + /** * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) @@ -252,6 +257,21 @@ function ($path) { 'image_allowed' => $this->allowedImageExtensions, ]; + $this->coreConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $config = [ + 'target', + 'folder1', + 'folder2/subfolder21', + 'folder2/subfolder22', + 'folder3/subfolder31/subfolder32' + ]; + $this->coreConfigMock->expects($this->any()) + ->method('getValue') + ->with('system/media_storage_configuration/allowed_resources/media_gallery_image_folders') + ->willReturn($config); + $this->imagesStorage = $this->objectManagerHelper->getObject( Storage::class, [ @@ -275,7 +295,8 @@ function ($path) { ], 'data' => [], 'file' => $this->fileMock, - 'ioFile' => $this->ioFileMock + 'ioFile' => $this->ioFileMock, + 'coreConfig' => $this->coreConfigMock ] ); } @@ -302,9 +323,7 @@ public function testGetResizeHeight() public function testDeleteDirectoryOverRoot() { $this->expectException('Magento\Framework\Exception\LocalizedException'); - $this->expectExceptionMessage('Directory /storage/some/another/dir is not under storage root path.'); - $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->willReturnArgument(0); - $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->willReturnArgument(0); + $this->expectExceptionMessage('We cannot delete the selected directory.'); $this->imagesStorage->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT); } @@ -314,9 +333,7 @@ public function testDeleteDirectoryOverRoot() public function testDeleteRootDirectory() { $this->expectException('Magento\Framework\Exception\LocalizedException'); - $this->expectExceptionMessage('We can\'t delete root directory /storage/root/dir right now.'); - $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->willReturnArgument(0); - $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->willReturnArgument(0); + $this->expectExceptionMessage('We cannot delete the selected directory.'); $this->imagesStorage->deleteDirectory(self::STORAGE_ROOT_DIR); } @@ -341,7 +358,11 @@ public function testGetDirsCollectionCreateSubDirectories() ->method('create') ->with(rtrim(self::STORAGE_ROOT_DIR, '/') . '/' . $directoryName); - $this->generalTestGetDirsCollection(self::STORAGE_ROOT_DIR); + $this->generalTestGetDirsCollection( + self::STORAGE_ROOT_DIR, + 1, + '/^(target|folder1|folder2|folder3)$/' + ); } /** @@ -351,45 +372,9 @@ public function testGetDirsCollectionCreateSubDirectories() * @param array $expectedRemoveKeys * @dataProvider dirsCollectionDataProvider */ - public function testGetDirsCollection($exclude, $include, $fileNames, $expectedRemoveKeys) + public function testGetDirsCollection($path, $callNum, $dirsFilter='') { - $this->imagesStorage = $this->objectManagerHelper->getObject( - Storage::class, - [ - 'session' => $this->sessionMock, - 'backendUrl' => $this->backendUrlMock, - 'cmsWysiwygImages' => $this->imageHelperMock, - 'coreFileStorageDb' => $this->coreFileStorageMock, - 'filesystem' => $this->filesystemMock, - 'imageFactory' => $this->adapterFactoryMock, - 'assetRepo' => $this->createMock(Repository::class), - 'storageCollectionFactory' => $this->storageCollectionFactoryMock, - 'storageFileFactory' => $this->storageFileFactoryMock, - 'storageDatabaseFactory' => $this->storageDatabaseFactoryMock, - 'directoryDatabaseFactory' => $this->directoryDatabaseFactoryMock, - 'uploaderFactory' => $this->uploaderFactoryMock, - 'resizeParameters' => $this->resizeParameters, - 'dirs' => [ - 'exclude' => $exclude, - 'include' => $include, - ], - ] - ); - - $collection = []; - foreach ($fileNames as $filename) { - /** @var DataObject|MockObject $objectMock */ - $objectMock = $this->getMockBuilder(DataObject::class) - ->addMethods(['getFilename']) - ->disableOriginalConstructor() - ->getMock(); - $objectMock->expects($this->any()) - ->method('getFilename') - ->willReturn(self::STORAGE_ROOT_DIR . $filename); - $collection[] = $objectMock; - } - - $this->generalTestGetDirsCollection(self::STORAGE_ROOT_DIR, $collection, $expectedRemoveKeys); + $this->generalTestGetDirsCollection($path, $callNum, $dirsFilter); } /** @@ -399,48 +384,36 @@ public function dirsCollectionDataProvider() { return [ [ - 'exclude' => [ - ['name' => 'dress'], - ], - 'include' => [], - 'filenames' => [], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR, + 'callNum' => 1, + 'dirsFilter' => '/^(target|folder1|folder2|folder3)$/' ], [ - 'exclude' => [], - 'include' => [], - 'filenames' => [ - '/dress', - ], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR . 'target', + 'callNum' => 0, ], [ - 'exclude' => [ - ['name' => 'dress'], - ], - 'include' => [], - 'filenames' => [ - '/collection', - ], - 'expectRemoveKeys' => [], + 'path' => self::STORAGE_ROOT_DIR . 'folder1/subfolder', + 'callNum' => 0, ], [ - 'exclude' => [ - ['name' => 'gear', 'regexp' => 1], - ['name' => 'home', 'regexp' => 1], - ['name' => 'collection'], - ['name' => 'dress'], - ], - 'include' => [ - ['name' => 'home', 'regexp' => 1], - ['name' => 'collection'], - ], - 'filenames' => [ - '/dress', - '/collection', - '/gear', - ], - 'expectRemoveKeys' => [[0], [2]], + 'path' => self::STORAGE_ROOT_DIR . 'folder2', + 'callNum' => 1, + 'dirsFilter' => '/^(subfolder21|subfolder22)$/' + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'folder3/subfolder31', + 'callNum' => 1, + 'dirsFilter' => '/^(subfolder32)$/' + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'folder3/subfolder31/subfolder32', + 'callNum' => 0, + ], + [ + 'path' => self::STORAGE_ROOT_DIR . 'unknown', + 'callNum' => 1, + 'dirsFilter' => '/^()$/' ], ]; } @@ -449,10 +422,11 @@ public function dirsCollectionDataProvider() * General conditions for testGetDirsCollection tests * * @param string $path - * @param array $collectionArray - * @param array $expectedRemoveKeys + * @param int $callNum + * @param string $dirsFilter + * @throws \Exception */ - protected function generalTestGetDirsCollection($path, $collectionArray = [], $expectedRemoveKeys = []) + protected function generalTestGetDirsCollection(string $path, int $callNum, string $dirsFilter) { /** @var StorageCollection|MockObject $storageCollectionMock */ $storageCollectionMock = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Images\Storage\Collection::class) @@ -474,12 +448,9 @@ protected function generalTestGetDirsCollection($path, $collectionArray = [], $e ->method('setOrder') ->with('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC) ->willReturnSelf(); - $storageCollectionMock->expects($this->once()) - ->method('getIterator') - ->willReturn(new \ArrayIterator($collectionArray)); - $storageCollectionInvMock = $storageCollectionMock->expects($this->exactly(count($expectedRemoveKeys))) - ->method('removeItemByKey'); - call_user_func_array([$storageCollectionInvMock, 'withConsecutive'], $expectedRemoveKeys); + $storageCollectionMock->expects($this->exactly($callNum)) + ->method('setDirsFilter') + ->with($dirsFilter); $this->storageCollectionFactoryMock->expects($this->once()) ->method('create')
app/code/Magento/CmsUrlRewrite/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cms-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CmsUrlRewriteGraphQl/composer.json+13 −11 modified@@ -2,22 +2,23 @@ "name": "magento/module-cms-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-cms-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CompareListGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-compare-list-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Config/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-config", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/ConfigurableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-configurable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/ConfigurableProduct/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-msrp": "*", - "magento/module-webapi": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-product-video": "*", - "magento/module-configurable-sample-data": "*", - "magento/module-product-links-sample-data": "*", - "magento/module-tax": "*" + "magento/module-msrp": "100.4.*", + "magento/module-webapi": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-product-video": "100.4.*", + "magento/module-configurable-sample-data": "Sample Data version: 100.4.*", + "magento/module-product-links-sample-data": "Sample Data version: 100.4.*", + "magento/module-tax": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/ConfigurableProductGraphQl/composer.json+13 −11 modified@@ -2,21 +2,22 @@ "name": "magento/module-configurable-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-catalog": "*", - "magento/module-configurable-product": "*", - "magento/module-graph-ql": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-catalog": "104.0.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/ConfigurableProductSales/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-configurable-product-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-configurable-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-configurable-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Contact/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-contact", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Contact/etc/frontend/di.xml+8 −0 modified@@ -13,4 +13,12 @@ </argument> </arguments> </type> + <type name="Magento\Contact\Plugin\UserDataProvider\ViewModel"> + <arguments> + <argument name="viewModel" xsi:type="object">Magento\Contact\ViewModel\UserDataProvider</argument> + </arguments> + </type> + <type name="Magento\Contact\Block\ContactForm"> + <plugin name="set_view_model" type="Magento\Contact\Plugin\UserDataProvider\ViewModel" /> + </type> </config>
app/code/Magento/Contact/Plugin/UserDataProvider/ViewModel.php+51 −0 added@@ -0,0 +1,51 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Contact\Plugin\UserDataProvider; + +use Magento\Framework\DataObject; +use Magento\Framework\View\Element\Block\ArgumentInterface; +use Magento\Framework\View\Element\BlockInterface; + +/** + * Sets the view model + */ +class ViewModel +{ + /** + * Key `view_model` + */ + private const VIEW_MODEL = 'view_model'; + + /** + * @var ArgumentInterface + */ + private $viewModel; + + /** + * @param ArgumentInterface $viewModel + */ + public function __construct(ArgumentInterface $viewModel) + { + $this->viewModel = $viewModel; + } + + /** + * Sets the view model before rendering to HTML + * + * @param DataObject|BlockInterface $block + * @return null + */ + public function beforeToHtml(DataObject $block) + { + if (!$block->hasData(self::VIEW_MODEL)) { + $block->setData(self::VIEW_MODEL, $this->viewModel); + } + + return null; + } +}
app/code/Magento/Contact/Test/Unit/Plugin/UserDataProvider/ViewModelTest.php+77 −0 added@@ -0,0 +1,77 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Contact\Test\Unit\Plugin\UserDataProvider; + +use Magento\Contact\Plugin\UserDataProvider\ViewModel as ViewModelPlugin; +use Magento\Framework\DataObject; +use Magento\Framework\View\Element\Block\ArgumentInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Unit test for the ViewModelPlugin class + */ +class ViewModelTest extends TestCase +{ + /** + * @var ArgumentInterface|MockObject + */ + private $viewModelMock; + + /** + * @var DataObject|MockObject + */ + private $blockMock; + + /** + * @var ViewModelPlugin + */ + private $plugin; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->viewModelMock = $this->getMockForAbstractClass(ArgumentInterface::class); + $this->blockMock = $this->createMock(DataObject::class); + + $this->plugin = new ViewModelPlugin($this->viewModelMock); + } + + /** + * @dataProvider dataProvider + */ + public function testBeforeToHtml($hasDataResult, $setDataExpects) + { + $this->blockMock->expects($this->once()) + ->method('hasData') + ->with('view_model') + ->willReturn($hasDataResult); + + $this->blockMock->expects($setDataExpects) + ->method('setData') + ->with('view_model', $this->viewModelMock); + + $this->plugin->beforeToHtml($this->blockMock); + } + + public function dataProvider(): array + { + return [ + 'view model was not preset before' => [ + 'hasData' => false, + 'setData' => $this->once(), + ], + 'view model was pre-installed before' => [ + 'hasData' => true, + 'setData' => $this->never(), + ] + ]; + } +}
app/code/Magento/Contact/view/frontend/layout/contact_index_index.xml+0 −3 modified@@ -13,9 +13,6 @@ <referenceContainer name="content"> <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"> <container name="form.additional.info" label="Form Additional Info"/> - <arguments> - <argument name="view_model" xsi:type="object">Magento\Contact\ViewModel\UserDataProvider</argument> - </arguments> </block> </referenceContainer> </body>
app/code/Magento/Cookie/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cookie", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-backend": "*" + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cron/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cron", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Csp/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-csp", "description": "CSP module enables Content Security Policies for Magento", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Csp/etc/config.xml+1 −1 modified@@ -106,7 +106,7 @@ <frame-ancestors> <policy_id>frame-ancestors</policy_id> <self>1</self> - <inline>1</inline> + <inline>0</inline> <eval>0</eval> <dynamic>0</dynamic> </frame-ancestors>
app/code/Magento/CurrencySymbol/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-currency-symbol", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-page-cache": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CustomerAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-customer-analytics", "description": "N/A", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-customer": "103.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Customer/Api/SessionCleanerInterface.php+1 −1 modified@@ -13,7 +13,7 @@ interface SessionCleanerInterface { /** - * Destroy all active customer sessions related to given customer except current session. + * Destroy all active customer sessions related to given customer id, including current session. * * @param int $customerId * @return void
app/code/Magento/Customer/composer.json+29 −27 modified@@ -1,41 +1,42 @@ { "name": "magento/module-customer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.3-p3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-integration": "*", - "magento/module-media-storage": "*", - "magento/module-newsletter": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-integration": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-customer-sample-data": "*", - "magento/module-webapi": "*" + "magento/module-cookie": "100.4.*", + "magento/module-customer-sample-data": "Sample Data version: 100.4.*", + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } +
app/code/Magento/Customer/Controller/Account/Confirmation.php+36 −26 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Customer\Controller\Account; use Magento\Customer\Api\AccountManagementInterface; @@ -13,22 +15,26 @@ use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\App\Action\Context; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Controller\Result\Redirect; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; use Magento\Store\Model\StoreManagerInterface; /** - * Class Confirmation. Send confirmation link to specified email + * Send confirmation link to specified email */ class Confirmation extends AbstractAccount implements HttpGetActionInterface, HttpPostActionInterface { /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $storeManager; /** - * @var \Magento\Customer\Api\AccountManagementInterface + * @var AccountManagementInterface */ protected $customerAccountManagement; @@ -53,7 +59,7 @@ class Confirmation extends AbstractAccount implements HttpGetActionInterface, Ht * @param PageFactory $resultPageFactory * @param StoreManagerInterface $storeManager * @param AccountManagementInterface $customerAccountManagement - * @param Url $customerUrl + * @param Url|null $customerUrl */ public function __construct( Context $context, @@ -74,48 +80,52 @@ public function __construct( /** * Send confirmation link to specified email * - * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page + * @return Redirect|Page + * @throws LocalizedException */ public function execute() { if ($this->session->isLoggedIn()) { - /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultRedirectFactory->create(); - $resultRedirect->setPath('*/*/'); - return $resultRedirect; + return $this->getRedirect('*/*/'); } - // try to confirm by email $email = $this->getRequest()->getPost('email'); - if ($email) { - /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultRedirectFactory->create(); + if ($email) { try { $this->customerAccountManagement->resendConfirmation( $email, $this->storeManager->getStore()->getWebsiteId() ); $this->messageManager->addSuccessMessage(__('Please check your email for confirmation key.')); + return $this->getRedirect('*/*/index', ['_secure' => true]); } catch (InvalidTransitionException $e) { $this->messageManager->addSuccessMessage(__('This email does not require confirmation.')); - } catch (\Exception $e) { - $this->messageManager->addExceptionMessage($e, __('Wrong email.')); - $resultRedirect->setPath('*/*/*', ['email' => $email, '_secure' => true]); - return $resultRedirect; + return $this->getRedirect('*/*/index', ['_secure' => true]); + } catch (NoSuchEntityException $e) { + $this->messageManager->addErrorMessage(__('Wrong email.')); } - $this->session->setUsername($email); - $resultRedirect->setPath('*/*/index', ['_secure' => true]); - return $resultRedirect; } - /** @var \Magento\Framework\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); - $resultPage->getLayout()->getBlock('accountConfirmation')->setEmail( - $this->getRequest()->getParam('email', $email) - )->setLoginUrl( - $this->customerUrl->getLoginUrl() - ); + $resultPage->getLayout()->getBlock('accountConfirmation') + ->setEmail($email) + ->setLoginUrl($this->customerUrl->getLoginUrl()); return $resultPage; } + + /** + * Returns redirect object + * + * @param string $path + * @param array $params + * @return Redirect + */ + private function getRedirect(string $path, array $params = []): Redirect + { + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath($path, $params); + + return $resultRedirect; + } }
app/code/Magento/Customer/Controller/Account/CreatePassword.php+26 −12 modified@@ -14,11 +14,10 @@ use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\Action\Context; use Magento\Framework\App\ObjectManager; +use Magento\Customer\Api\CustomerRepositoryInterface; /** - * Class CreatePassword - * - * @package Magento\Customer\Controller\Account + * Class to Generate a New Customer Password */ class CreatePassword extends \Magento\Customer\Controller\AbstractAccount implements HttpGetActionInterface { @@ -43,24 +42,33 @@ class CreatePassword extends \Magento\Customer\Controller\AbstractAccount implem private $confirmByToken; /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory - * @param \Magento\Customer\Api\AccountManagementInterface $accountManagement - * @param \Magento\Customer\Model\ForgotPasswordToken\ConfirmCustomerByToken $confirmByToken + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @param Context $context + * @param Session $customerSession + * @param PageFactory $resultPageFactory + * @param AccountManagementInterface $accountManagement + * @param ConfirmCustomerByToken|null $confirmByToken + * @param CustomerRepositoryInterface|null $customerRepository */ public function __construct( Context $context, Session $customerSession, PageFactory $resultPageFactory, AccountManagementInterface $accountManagement, - ConfirmCustomerByToken $confirmByToken = null + ConfirmCustomerByToken $confirmByToken = null, + CustomerRepositoryInterface $customerRepository = null ) { $this->session = $customerSession; $this->resultPageFactory = $resultPageFactory; $this->accountManagement = $accountManagement; $this->confirmByToken = $confirmByToken ?? ObjectManager::getInstance()->get(ConfirmCustomerByToken::class); + $this->customerRepository = $customerRepository + ?? ObjectManager::getInstance()->get(CustomerRepositoryInterface::class); parent::__construct($context); } @@ -73,18 +81,23 @@ public function __construct( public function execute() { $resetPasswordToken = (string)$this->getRequest()->getParam('token'); + $customerId = (int)$this->getRequest()->getParam('id'); $isDirectLink = $resetPasswordToken != ''; if (!$isDirectLink) { $resetPasswordToken = (string)$this->session->getRpToken(); + $customerId = (int)$this->session->getRpCustomerId(); } try { - $this->accountManagement->validateResetPasswordLinkToken(null, $resetPasswordToken); + $this->accountManagement->validateResetPasswordLinkToken($customerId, $resetPasswordToken); + $this->confirmByToken->resetCustomerConfirmation($customerId); - $this->confirmByToken->execute($resetPasswordToken); + $customer = $this->customerRepository->getById($customerId); + $this->accountManagement->changeResetPasswordLinkToken($customer, $resetPasswordToken); if ($isDirectLink) { $this->session->setRpToken($resetPasswordToken); + $this->session->setRpCustomerId($customerId); $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('*/*/createpassword'); @@ -94,7 +107,8 @@ public function execute() $resultPage = $this->resultPageFactory->create(); $resultPage->getLayout() ->getBlock('resetPassword') - ->setResetPasswordLinkToken($resetPasswordToken); + ->setResetPasswordLinkToken($resetPasswordToken) + ->setRpCustomerId($customerId); return $resultPage; }
app/code/Magento/Customer/Controller/Account/EditPost.php+8 −5 modified@@ -4,6 +4,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Controller\Account; @@ -226,7 +227,7 @@ public function execute() try { // whether a customer enabled change email option - $this->processChangeEmailRequest($currentCustomerDataObject); + $isEmailChanged = $this->processChangeEmailRequest($currentCustomerDataObject); // whether a customer enabled change password option $isPasswordChanged = $this->changeCustomerPassword($currentCustomerDataObject->getEmail()); @@ -242,8 +243,8 @@ public function execute() ); $this->dispatchSuccessEvent($customerCandidateDataObject); $this->messageManager->addSuccessMessage(__('You saved the account information.')); - // logout from current session if password changed. - if ($isPasswordChanged) { + // logout from current session if password or email changed. + if ($isPasswordChanged || $isEmailChanged) { $this->session->logout(); $this->session->start(); return $resultRedirect->setPath('customer/account/login'); @@ -364,7 +365,7 @@ protected function changeCustomerPassword($email) * Process change email request * * @param CustomerInterface $currentCustomerDataObject - * @return void + * @return bool * @throws InvalidEmailOrPasswordException * @throws UserLockedException */ @@ -377,13 +378,15 @@ private function processChangeEmailRequest(CustomerInterface $currentCustomerDat $currentCustomerDataObject->getId(), $this->getRequest()->getPost('current_password') ); - $this->sessionCleaner->clearFor($currentCustomerDataObject->getId()); + $this->sessionCleaner->clearFor((int) $currentCustomerDataObject->getId()); + return true; } catch (InvalidEmailOrPasswordException $e) { throw new InvalidEmailOrPasswordException( __("The password doesn't match this account. Verify the password and try again.") ); } } + return false; } /**
app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php+9 −2 modified@@ -14,7 +14,7 @@ use Magento\Customer\Model\Customer\CredentialsValidator; /** - * Customer reset password controller + * Class to Process Password Reset form and successfully redirect */ class ResetPasswordPost extends \Magento\Customer\Controller\AbstractAccount implements HttpPostActionInterface { @@ -67,8 +67,10 @@ public function execute() /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $resetPasswordToken = (string)$this->getRequest()->getQuery('token'); + $customerId = (string)$this->getRequest()->getQuery('id'); $password = (string)$this->getRequest()->getPost('password'); $passwordConfirmation = (string)$this->getRequest()->getPost('password_confirmation'); + $email = null; if ($password !== $passwordConfirmation) { $this->messageManager->addErrorMessage(__("New Password and Confirm New Password values didn't match.")); @@ -83,9 +85,13 @@ public function execute() return $resultRedirect; } + if ($customerId && $this->customerRepository->getById($customerId)) { + $email = $this->customerRepository->getById($customerId)->getEmail(); + } + try { $this->accountManagement->resetPassword( - null, + $email, $resetPasswordToken, $password ); @@ -95,6 +101,7 @@ public function execute() $this->session->start(); } $this->session->unsRpToken(); + $this->session->unsRpCustomerId(); $this->messageManager->addSuccessMessage(__('You updated your password.')); $resultRedirect->setPath('*/*/login');
app/code/Magento/CustomerDownloadableGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-customer-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-downloadable-graph-ql": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" + "magento/module-downloadable-graph-ql": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Customer/etc/db_schema_whitelist.json+3 −1 modified@@ -29,7 +29,8 @@ "failures_num": true, "first_failure": true, "lock_expired": true, - "lock_expires": true + "lock_expires": true, + "session_cutoff": true }, "index": { "CUSTOMER_ENTITY_STORE_ID": true, @@ -328,6 +329,7 @@ "visitor_id": true, "customer_id": true, "session_id": true, + "created_at": true, "last_visit_at": true }, "index": {
app/code/Magento/Customer/etc/db_schema.xml+6 −1 modified@@ -50,6 +50,8 @@ <column xsi:type="timestamp" name="first_failure" on_update="false" nullable="true" comment="First Failure"/> <column xsi:type="timestamp" name="lock_expires" on_update="false" nullable="true" comment="Lock Expiration Date"/> + <column xsi:type="timestamp" name="session_cutoff" on_update="false" nullable="true" + comment="Session Cutoff Time"/> <constraint xsi:type="primary" referenceId="PRIMARY"> <column name="entity_id"/> </constraint> @@ -508,7 +510,10 @@ comment="Visitor ID"/> <column xsi:type="int" name="customer_id" unsigned="false" nullable="true" identity="false" comment="Customer ID"/> - <column xsi:type="varchar" name="session_id" nullable="true" length="64" comment="Session ID"/> + <column xsi:type="varchar" name="session_id" nullable="true" length="1" + comment="Deprecated: Session ID value no longer used"/> + <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" + comment="Created At"/> <column xsi:type="timestamp" name="last_visit_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Last Visit Time"/> <constraint xsi:type="primary" referenceId="PRIMARY">
app/code/Magento/Customer/etc/di.xml+11 −0 modified@@ -65,13 +65,24 @@ <preference for="Magento\Customer\Api\SessionCleanerInterface" type="Magento\Customer\Model\Session\SessionCleaner"/> <preference for="Magento\Customer\Api\GroupExcludedWebsiteRepositoryInterface" type="Magento\Customer\Model\ResourceModel\GroupExcludedWebsiteRepository" /> + <virtualType name="SessionValidator" type="Magento\Framework\Session\CompositeValidator"> + <arguments> + <argument name="validators" xsi:type="array"> + <item name="validator" xsi:type="object">Magento\Framework\Session\Validator</item> + <item name="cutoff_validator" xsi:type="object"> + Magento\Customer\Model\Session\Validators\CutoffValidator + </item> + </argument> + </arguments> + </virtualType> <type name="Magento\Customer\Model\Session"> <arguments> <argument name="configShare" xsi:type="object">Magento\Customer\Model\Config\Share\Proxy</argument> <argument name="customerUrl" xsi:type="object">Magento\Customer\Model\Url\Proxy</argument> <argument name="customerResource" xsi:type="object">Magento\Customer\Model\ResourceModel\Customer\Proxy</argument> <argument name="storage" xsi:type="object">Magento\Customer\Model\Session\Storage</argument> <argument name="customerRepository" xsi:type="object">Magento\Customer\Api\CustomerRepositoryInterface\Proxy</argument> + <argument name="validator" xsi:type="object">SessionValidator</argument> </arguments> </type> <type name="Magento\Customer\Helper\Address">
app/code/Magento/CustomerGraphQl/composer.json+14 −12 modified@@ -2,22 +2,23 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-authorization": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-graph-ql": "*", - "magento/module-newsletter": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*", - "magento/module-directory": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-authorization": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*", + "magento/module-directory": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CustomerImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-customer-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Customer/Model/AccountManagement.php+5 −12 modified@@ -714,8 +714,8 @@ private function handleUnknownTemplate($template) public function resetPassword($email, $resetToken, $newPassword) { if (!$email) { - $customer = $this->getByToken->execute($resetToken); - $email = $customer->getEmail(); + $params = ['fieldName' => 'email']; + throw new InputException(__('"%fieldName" is required. Enter and try again.', $params)); } else { $customer = $this->customerRepository->get($email); } @@ -1186,24 +1186,17 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) * @throws NoSuchEntityException If customer doesn't exist * @SuppressWarnings(PHPMD.LongVariable) */ - private function validateResetPasswordToken($customerId, $resetPasswordLinkToken) + private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): bool { - if ($customerId !== null && $customerId <= 0) { + if (!$customerId) { throw new InputException( __( 'Invalid value of "%value" provided for the %fieldName field.', ['value' => $customerId, 'fieldName' => 'customerId'] ) ); } - - if ($customerId === null) { - //Looking for the customer. - $customerId = $this->getByToken - ->execute($resetPasswordLinkToken) - ->getId(); - } - if (!is_string($resetPasswordLinkToken) || empty($resetPasswordLinkToken)) { + if (!$resetPasswordLinkToken) { $params = ['fieldName' => 'resetPasswordLinkToken']; throw new InputException(__('"%fieldName" is required. Enter and try again.', $params)); }
app/code/Magento/Customer/Model/ForgotPasswordToken/ConfirmCustomerByToken.php+19 −0 modified@@ -42,6 +42,7 @@ public function __construct(GetCustomerByToken $getByToken, CustomerRepositoryIn * @param string $resetPasswordToken * @return void * @throws LocalizedException + * @deprecated rp tokens cannot be looked up directly from db */ public function execute(string $resetPasswordToken): void { @@ -65,4 +66,22 @@ private function resetConfirmation(CustomerInterface $customer): void $this->customerRepository->save($customer); } + + /** + * Check if customer confirmation needs to be reset + * + * @param int $customerId + * @return void + */ + public function resetCustomerConfirmation(int $customerId): void + { + $customer = $this->customerRepository->getById($customerId); + + if ($customer && $customer->getConfirmation()) { + // skip unnecessary address and customer validation + $customer->setData('ignore_validation_flag', true); + $customer->setConfirmation(null); + $this->customerRepository->save($customer); + } + } }
app/code/Magento/Customer/Model/ForgotPasswordToken/GetCustomerByToken.php+1 −0 modified@@ -17,6 +17,7 @@ /** * Get Customer By reset password token * @SuppressWarnings(PHPMD.LongVariable) + * @deprecated Rp Tokens cannot be looked up directly */ class GetCustomerByToken {
app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php+15 −3 modified@@ -11,6 +11,8 @@ use Magento\Framework\Webapi\Rest\Request as RestRequest; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\App\ObjectManager; /** * Update customer by id from request param @@ -22,12 +24,18 @@ class UpdateCustomer */ private $request; + /** + * @var UserContextInterface + */ + private $userContext; + /** * @param RestRequest $request */ - public function __construct(RestRequest $request) + public function __construct(RestRequest $request, ?UserContextInterface $userContext = null) { $this->request = $request; + $this->userContext = $userContext ?? ObjectManager::getInstance()->get(UserContextInterface::class); } /** @@ -43,10 +51,14 @@ public function beforeSave( CustomerInterface $customer, ?string $passwordHash = null ): array { - $customerId = $this->request->getParam('customerId'); + $customerSessionId = $this->userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER ? + (int)$this->userContext->getUserId() : 0; + $customerId = (int)$this->request->getParam('customerId'); $bodyParams = $this->request->getBodyParams(); if (!isset($bodyParams['customer']['Id']) && $customerId) { - $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); + if ($customerId === $customerSessionId || $customerSessionId === 0) { + $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); + } } return [$customer, $passwordHash];
app/code/Magento/Customer/Model/ResourceModel/Customer.php+76 −2 modified@@ -3,14 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model\ResourceModel; use Magento\Customer\Model\AccountConfirmation; use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Framework\App\ObjectManager; -use Magento\Framework\Validator\Exception as ValidatorException; use Magento\Framework\Exception\AlreadyExistsException; +use Magento\Framework\Validator\Exception as ValidatorException; +use Magento\Framework\Encryption\EncryptorInterface; /** * Customer entity resource model @@ -53,6 +55,11 @@ class Customer extends \Magento\Eav\Model\Entity\VersionControl\AbstractEntity */ private $notificationStorage; + /** + * @var EncryptorInterface + */ + private $encryptor; + /** * Customer constructor. * @@ -65,6 +72,8 @@ class Customer extends \Magento\Eav\Model\Entity\VersionControl\AbstractEntity * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data * @param AccountConfirmation $accountConfirmation + * @param EncryptorInterface|null $encryptor + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Eav\Model\Entity\Context $context, @@ -75,7 +84,8 @@ public function __construct( \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Store\Model\StoreManagerInterface $storeManager, $data = [], - AccountConfirmation $accountConfirmation = null + AccountConfirmation $accountConfirmation = null, + EncryptorInterface $encryptor = null ) { parent::__construct($context, $entitySnapshot, $entityRelationComposite, $data); @@ -87,6 +97,8 @@ public function __construct( $this->setType('customer'); $this->setConnection('customer_read'); $this->storeManager = $storeManager; + $this->encryptor = $encryptor ?? ObjectManager::getInstance() + ->get(EncryptorInterface::class); } /** @@ -175,6 +187,11 @@ protected function _beforeSave(\Magento\Framework\DataObject $customer) $this->_validate($customer); } + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->encrypt($rpToken)); + } + return $this; } @@ -223,6 +240,10 @@ protected function _afterSave(\Magento\Framework\DataObject $customer) NotificationStorage::UPDATE_CUSTOMER_SESSION, $customer->getId() ); + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->decrypt($rpToken)); + } return parent::_afterSave($customer); } @@ -403,4 +424,57 @@ public function changeResetPasswordLinkToken(\Magento\Customer\Model\Customer $c } return $this; } + + /** + * Gets the session cut off timestamp string for provided customer id. + * + * @param int $customerId + * @return int|null + */ + public function findSessionCutOff(int $customerId): ?int + { + $connection = $this->getConnection(); + $select = $connection->select()->from( + ['customer_table' => $this->getTable('customer_entity')], + ['session_cutoff' => 'customer_table.session_cutoff'] + )->where( + 'entity_id =?', + $customerId + )->limit( + 1 + ); + $lookup = $connection->fetchRow($select); + if (empty($lookup) || $lookup['session_cutoff'] == null) { + return null; + } + return strtotime($lookup['session_cutoff']); + } + + /** + * Update session cutoff column value for customer + * + * @param int $customerId + * @param int $timestamp + * @return void + */ + public function updateSessionCutOff(int $customerId, int $timestamp): void + { + $this->getConnection()->update( + $this->getTable('customer_entity'), + ['session_cutoff' => $this->dateTime->formatDate($timestamp)], + $this->getConnection()->quoteInto('entity_id = ?', $customerId) + ); + } + + /** + * @inheritDoc + */ + protected function _afterLoad(\Magento\Framework\DataObject $customer) + { + if ($customer->getData('rp_token')) { + $rpToken = $customer->getData('rp_token'); + $customer->setRpToken($this->encryptor->decrypt($rpToken)); + } + return parent::_afterLoad($customer); // + } }
app/code/Magento/Customer/Model/ResourceModel/Visitor.php+42 −1 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model\ResourceModel; @@ -59,7 +60,6 @@ protected function _prepareDataForSave(\Magento\Framework\Model\AbstractModel $v { return [ 'customer_id' => $visitor->getCustomerId(), - 'session_id' => $visitor->getSessionId(), 'last_visit_at' => $visitor->getLastVisitAt() ]; } @@ -95,4 +95,45 @@ public function clean(\Magento\Customer\Model\Visitor $object) return $this; } + + /** + * Gets created at value for the visitor id. + * + * @param int $visitorId + * @return int|null + */ + public function fetchCreatedAt(int $visitorId): ?int + { + $connection = $this->getConnection(); + $select = $connection->select()->from( + ['visitor_table' => $this->getTable('customer_visitor')], + ['created_at' => 'visitor_table.created_at'] + )->where( + 'visitor_table.visitor_id = ?', + (string) $visitorId + )->limit( + 1 + ); + $lookup = $connection->fetchRow($select); + if (empty($lookup) || $lookup['created_at'] == null) { + return null; + } + return strtotime($lookup['created_at']); + } + + /** + * Update visitor session created at column value + * + * @param int $visitorId + * @param int $timestamp + * @return void + */ + public function updateCreatedAt(int $visitorId, int $timestamp): void + { + $this->getConnection()->update( + $this->getTable('customer_visitor'), + ['created_at' => $this->dateTime->formatDate($timestamp)], + $this->getConnection()->quoteInto('visitor_id = ?', $visitorId) + ); + } }
app/code/Magento/Customer/Model/Session.php+11 −7 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Customer\Model; use Magento\Customer\Api\CustomerRepositoryInterface; @@ -11,6 +13,7 @@ use Magento\Customer\Model\Config\Share; use Magento\Customer\Model\ResourceModel\Customer as ResourceCustomer; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Session\Generic; /** * Customer session model @@ -70,7 +73,7 @@ class Session extends \Magento\Framework\Session\SessionManager protected $_configShare; /** - * @var \Magento\Framework\Session\Generic + * @var Generic */ protected $_session; @@ -132,7 +135,7 @@ class Session extends \Magento\Framework\Session\SessionManager * @param ResourceCustomer $customerResource * @param CustomerFactory $customerFactory * @param \Magento\Framework\UrlFactory $urlFactory - * @param \Magento\Framework\Session\Generic $session + * @param Generic $session * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Framework\App\Http\Context $httpContext * @param CustomerRepositoryInterface $customerRepository @@ -158,7 +161,7 @@ public function __construct( ResourceCustomer $customerResource, CustomerFactory $customerFactory, \Magento\Framework\UrlFactory $urlFactory, - \Magento\Framework\Session\Generic $session, + Generic $session, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\App\Http\Context $httpContext, CustomerRepositoryInterface $customerRepository, @@ -176,6 +179,10 @@ public function __construct( $this->customerRepository = $customerRepository; $this->_eventManager = $eventManager; $this->_httpContext = $httpContext; + $this->groupManagement = $groupManagement; + $this->response = $response; + $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance() + ->get(AccountConfirmation::class); parent::__construct( $request, $sidResolver, @@ -187,10 +194,6 @@ public function __construct( $cookieMetadataFactory, $appState ); - $this->groupManagement = $groupManagement; - $this->response = $response; - $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance() - ->get(AccountConfirmation::class); $this->_eventManager->dispatch('customer_session_init', ['customer_session' => $this]); } @@ -510,6 +513,7 @@ public function logout() * * @param bool|null $loginUrl * @return bool + * @throws \Magento\Framework\Exception\SessionException */ public function authenticate($loginUrl = null) {
app/code/Magento/Customer/Model/Session/SessionCleaner.php+34 −23 modified@@ -8,14 +8,14 @@ namespace Magento\Customer\Model\Session; use Magento\Customer\Api\SessionCleanerInterface; +use Magento\Customer\Model\ResourceModel\Customer as CustomerResourceModel; +use Magento\Customer\Model\ResourceModel\Visitor as VisitorResourceModel; use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory as VisitorCollectionFactory; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Intl\DateTimeFactory; -use Magento\Framework\Session\Config; use Magento\Framework\Session\SaveHandlerInterface; use Magento\Framework\Session\SessionManagerInterface; -use Magento\Framework\Stdlib\DateTime; -use Magento\Store\Model\ScopeInterface; /** * Deletes all session data which relates to customer, including current session data. @@ -50,46 +50,57 @@ class SessionCleaner implements SessionCleanerInterface private $saveHandler; /** - * @inheritdoc + * @var CustomerResourceModel + */ + private $customerResourceModel; + + /** + * @var VisitorResourceModel + */ + private $visitorResourceModel; + + /** + * @param ScopeConfigInterface $scopeConfig + * @param DateTimeFactory $dateTimeFactory + * @param VisitorCollectionFactory $visitorCollectionFactory + * @param SessionManagerInterface $sessionManager + * @param SaveHandlerInterface $saveHandler + * @param CustomerResourceModel|null $customerResourceModel + * @param VisitorResourceModel|null $visitorResourceModel */ public function __construct( ScopeConfigInterface $scopeConfig, DateTimeFactory $dateTimeFactory, VisitorCollectionFactory $visitorCollectionFactory, SessionManagerInterface $sessionManager, - SaveHandlerInterface $saveHandler + SaveHandlerInterface $saveHandler, + CustomerResourceModel $customerResourceModel = null, + VisitorResourceModel $visitorResourceModel = null ) { $this->scopeConfig = $scopeConfig; $this->dateTimeFactory = $dateTimeFactory; $this->visitorCollectionFactory = $visitorCollectionFactory; $this->sessionManager = $sessionManager; $this->saveHandler = $saveHandler; + $this->customerResourceModel = $customerResourceModel + ?: ObjectManager::getInstance()->get(CustomerResourceModel::class); + + $this->visitorResourceModel = $visitorResourceModel + ?: ObjectManager::getInstance()->get(VisitorResourceModel::class); } /** * @inheritdoc */ public function clearFor(int $customerId): void { - $sessionLifetime = $this->scopeConfig->getValue( - Config::XML_PATH_COOKIE_LIFETIME, - ScopeInterface::SCOPE_STORE - ); $dateTime = $this->dateTimeFactory->create(); - $activeSessionsTime = $dateTime->setTimestamp($dateTime->getTimestamp() - $sessionLifetime) - ->format(DateTime::DATETIME_PHP_FORMAT); - /** @var \Magento\Customer\Model\ResourceModel\Visitor\Collection $visitorCollection */ - $visitorCollection = $this->visitorCollectionFactory->create(); - $visitorCollection->addFieldToFilter('customer_id', $customerId); - $visitorCollection->addFieldToFilter('last_visit_at', ['from' => $activeSessionsTime]); - $visitorCollection->addFieldToFilter('session_id', ['neq' => $this->sessionManager->getSessionId()]); - - /** @var \Magento\Customer\Model\Visitor $visitor */ - foreach ($visitorCollection->getItems() as $visitor) { - $sessionId = $visitor->getSessionId(); - $this->sessionManager->start(); - $this->saveHandler->destroy($sessionId); - $this->sessionManager->writeClose(); + $timestamp = $dateTime->getTimestamp(); + $this->customerResourceModel->updateSessionCutOff($customerId, $timestamp); + if ($this->sessionManager->getVisitorData() !== null) { + $visitorId = $this->sessionManager->getVisitorData()['visitor_id']; + $this->visitorResourceModel->updateCreatedAt((int) $visitorId, $timestamp + 1); } } } +
app/code/Magento/Customer/Model/Session/Validators/CutoffValidator.php+83 −0 added@@ -0,0 +1,83 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Customer\Model\Session\Validators; + +use Magento\Customer\Model\ResourceModel\Customer as ResourceCustomer; +use Magento\Customer\Model\ResourceModel\Visitor as ResourceVisitor; +use Magento\Framework\Exception\SessionException; +use Magento\Framework\Phrase; +use Magento\Framework\Session\SessionManagerInterface; +use Magento\Framework\Session\ValidatorInterface; +use Magento\Framework\Session\Generic; + +/** + * Session Validator + */ +class CutoffValidator implements ValidatorInterface +{ + /** + * @var ResourceCustomer + */ + private $customerResource; + + /** + * @var ResourceVisitor + */ + private $visitorResource; + + /** + * @var Generic + */ + private $visitorSession; + + /** + * Cutoff validator constructor. + * + * @param ResourceCustomer $customerResource + * @param ResourceVisitor $visitorResource + * @param Generic $visitorSession + */ + public function __construct( + ResourceCustomer $customerResource, + ResourceVisitor $visitorResource, + Generic $visitorSession + ) { + $this->customerResource = $customerResource; + $this->visitorResource = $visitorResource; + $this->visitorSession = $visitorSession; + } + + /** + * Validate session + * + * @param SessionManagerInterface $session + * @return void + * @throws SessionException + */ + public function validate(SessionManagerInterface $session): void + { + try { + $visitor = $this->visitorSession->getVisitorData(); + if ($visitor !== null + && array_key_exists('customer_id', $visitor) + && array_key_exists('visitor_id', $visitor) + ) { + $cutoff = $this->customerResource->findSessionCutOff((int) $visitor['customer_id']); + $sessionCreationTime = $this->visitorResource->fetchCreatedAt((int) $visitor['visitor_id']); + if (isset($cutoff, $sessionCreationTime) && $cutoff > $sessionCreationTime) { + throw new SessionException( + new Phrase('The session has expired, please login again.') + ); + } + } + } catch (SessionException $e) { + $session->destroy(['clear_storage' => false]); + // throw core session exception + throw $e; + } + } +}
app/code/Magento/Customer/Model/Visitor.php+20 −1 modified@@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Model; @@ -103,7 +104,6 @@ class Visitor extends AbstractModel * @param array $ignores * @param array $data * @param RequestSafetyInterface|null $requestSafety - * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -195,6 +195,25 @@ public function initByRequest($observer) return $this; } + /** + * @inheritdoc + */ + public function beforeSave() + { + $this->unsetData("session_id"); + return parent::beforeSave(); + } + + /** + * @inheritdoc + */ + public function afterSave() + { + $this->setSessionId($this->session->getSessionId()); + return parent::afterSave(); + } + + /** * Save visitor by request *
app/code/Magento/Customer/Setup/Patch/Data/SessionIDColumnCleanUp.php+102 −0 added@@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Customer\Setup\Patch\Data; + +use Magento\Framework\DB\Adapter\Pdo\Mysql; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Psr\Log\LoggerInterface; + +/** + * Class Clean Up Data Removes unused data + */ +class SessionIDColumnCleanUp implements DataPatchInterface +{ + /** + * @var ModuleDataSetupInterface + */ + private $moduleDataSetup; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * RemoveData constructor. + * @param ModuleDataSetupInterface $moduleDataSetup + * @param LoggerInterface $logger + */ + public function __construct( + ModuleDataSetupInterface $moduleDataSetup, + LoggerInterface $logger + ) { + $this->moduleDataSetup = $moduleDataSetup; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + try { + $this->cleanCustomerVisitorTable(); + } catch (\Throwable $e) { + $this->logger->warning( + 'Customer module SessionIDColumnCleanUp patch experienced an error and could not be completed.' + . ' Please submit a support ticket or email us at security@magento.com.' + ); + + return $this; + } + + return $this; + } + + /** + * Remove session id from customer_visitor table. + * + * @throws \Zend_Db_Statement_Exception + */ + private function cleanCustomerVisitorTable() + { + $tableName = $this->moduleDataSetup->getTable('customer_visitor'); + // phpcs:ignore Magento2.SQL.RawQuery + $rawQuery = sprintf( + 'UPDATE %s SET session_id = NULL WHERE session_id IS NOT NULL LIMIT 1000', + $tableName + ); + + $adapter = $this->moduleDataSetup->getConnection(); + if ($adapter instanceof Mysql) { + do { + $result = $adapter->rawQuery($rawQuery)->rowCount(); + } while ($result > 0); + } else { + do { + $result = $adapter->query($rawQuery)->rowCount(); + } while ($result > 0); + } + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminResetFilterInCustomerAddressGridActionGroup.xml+3 −3 modified@@ -13,11 +13,11 @@ <annotations> <description>Clears the Admin Customer Address grid Filters. Sets the grid view to 'Default View'.</description> </annotations> - + <conditionalClick selector="{{AdminCustomerAddressFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerAddressFiltersSection.clearAll}}" visible="true" stepKey="clickClearFilters"/> <click selector="{{AdminCustomerAddressFiltersSection.viewDropdown}}" stepKey="openViewBookmarksTab"/> - <click selector="{{AdminCustomerAddressFiltersSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/> + <click selector="{{AdminCustomerAddressFiltersSection.viewBookmark(DefaultGridView.name)}}" stepKey="resetToDefaultGridView"/> <waitForPageLoad stepKey="waitForGridLoad"/> - <see selector="{{AdminCustomerFiltersSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/> + <see selector="{{AdminCustomerFiltersSection.viewDropdown}}" userInput="{{DefaultGridView.name}}" stepKey="seeDefaultViewSelected"/> </actionGroup> </actionGroups>
app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminResetFilterInCustomerGridActionGroup.xml+2 −2 modified@@ -16,8 +16,8 @@ <conditionalClick selector="{{AdminCustomerFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerFiltersSection.clearAll}}" visible="true" stepKey="clickClearFilters"/> <click selector="{{AdminCustomerFiltersSection.viewDropdown}}" stepKey="openViewBookmarksTab"/> - <click selector="{{AdminCustomerFiltersSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/> + <click selector="{{AdminCustomerFiltersSection.viewBookmark(DefaultGridView.name)}}" stepKey="resetToDefaultGridView"/> <waitForPageLoad stepKey="waitForGridLoad"/> - <see selector="{{AdminCustomerFiltersSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/> + <see selector="{{AdminCustomerFiltersSection.viewDropdown}}" userInput="{{DefaultGridView.name}}" stepKey="seeDefaultViewSelected"/> </actionGroup> </actionGroups>
app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php+1 −1 modified@@ -1679,7 +1679,7 @@ public function testValidateResetPasswordTokenBadResetPasswordLinkToken() $this->expectException(InputException::class); $this->expectExceptionMessage('"resetPasswordLinkToken" is required. Enter and try again.'); - $this->accountManagement->validateResetPasswordLinkToken(22, null); + $this->accountManagement->validateResetPasswordLinkToken(22, ''); } /**
app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php+2 −0 modified@@ -9,6 +9,7 @@ use Magento\Customer\Model\ResourceModel\Visitor as VisitorResourceModel; use Magento\Customer\Model\Session; +use Magento\Customer\Model\Visitor; use Magento\Customer\Model\Visitor as VisitorModel; use Magento\Framework\App\Request\Http as HttpRequest; use Magento\Framework\DataObject; @@ -74,6 +75,7 @@ protected function setUp(): void 'addCommitCallback', 'commit', 'clean', + 'load', ])->disableOriginalConstructor() ->getMock(); $this->visitorResourceModelMock->expects($this->any())->method('getIdFieldName')->willReturn('visitor_id');
app/code/Magento/Customer/view/frontend/email/password_reset_confirmation.html+2 −2 modified@@ -8,7 +8,7 @@ <!--@vars { "var store.frontend_name":"Store Name", "var customer.name":"Customer Name", -"var this.getUrl($store,'customer/account/createPassword/',[_query:[token:$customer.rp_token],_nosid:1])":"Reset Password URL" +"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Reset Password URL" } @--> {{template config_path="design/email/header_template"}} @@ -22,7 +22,7 @@ <table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"> - <a href="{{var this.getUrl($store,'customer/account/createPassword/',[_query:[token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a> + <a href="{{var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a> </td> </tr> </table>
app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml+4 −3 modified@@ -3,12 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - +// phpcs:disable Generic.Files.LineLength.TooLong +//phpcs:disable Magento2.Legacy.PhtmlTemplate /** @var \Magento\Customer\Block\Account\Resetpassword $block */ ?> -<form action="<?= $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['token' => $block->getResetPasswordLinkToken()]])) ?>" +<form action="<?= $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['id'=>$block->getRpCustomerId(),'token' => $block->getResetPasswordLinkToken()]])) ?>" method="post" - <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> + <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> id="form-validate" class="form password reset" data-mage-init='{"validation":{}}'>
app/code/Magento/Deploy/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-deploy", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Developer/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-developer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Dhl/composer.json+18 −16 modified@@ -1,31 +1,32 @@ { "name": "magento/module-dhl", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-checkout": "*" + "magento/module-checkout": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/Directory/composer.json+11 −9 modified@@ -1,22 +1,23 @@ { "name": "magento/module-directory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/DirectoryGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-directory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-directory": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Downloadable/composer.json+25 −23 modified@@ -1,37 +1,38 @@ { "name": "magento/module-downloadable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-downloadable-sample-data": "*" + "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/DownloadableGraphQl/composer.json+15 −13 modified@@ -2,24 +2,25 @@ "name": "magento/module-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-quote-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*", - "magento/module-sales-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-sales-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/DownloadableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-downloadable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Eav/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-eav", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.1.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/EavGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-eav-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-eav": "*" + "magento/framework": "103.0.*", + "magento/module-eav": "102.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Elasticsearch6/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-6", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-search": "101.1.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.11.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch7/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-7", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.11.0", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*" + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*" }, "suggest": { - "magento/module-config": "*", - "magento/module-search": "*" + "magento/module-config": "101.2.*", + "magento/module-search": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-elasticsearch", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "101.0.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-advanced-search": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*", "elasticsearch/elasticsearch": "~7.11.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Email/Block/Adminhtml/Template/Preview.php+1 −1 modified@@ -67,7 +67,7 @@ protected function _toHtml() $template->setTemplateType($request->getParam('type')); $template->setTemplateText($request->getParam('text')); $template->setTemplateStyles($request->getParam('styles')); - $template->setData('is_legacy', false); + } \Magento\Framework\Profiler::start($this->profilerName);
app/code/Magento/Email/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-email", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.3-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-require-js": "*", - "magento/module-media-storage": "*", - "magento/module-variable": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-variable": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Email/Console/Command/DatabaseTemplateCompatibilityCommand.php+126 −0 added@@ -0,0 +1,126 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Email\Console\Command; + +use Magento\Email\Model\AbstractTemplate; +use Magento\Email\Model\ResourceModel\Template\CollectionFactory; +use Magento\Email\Model\Template\VariableCompatibilityChecker; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Magento\Framework\Console\Cli; + +/** + * Scan DB templates for directive incompatibilities + */ +class DatabaseTemplateCompatibilityCommand extends Command +{ + /** + * @var CollectionFactory + */ + private CollectionFactory $templateCollection; + + /** + * @var VariableCompatibilityChecker + */ + private VariableCompatibilityChecker $compatibilityChecker; + + /** + * @var bool + */ + protected bool $hasErrors = false; + + /** + * Constructor + * + * @param VariableCompatibilityChecker $compatibilityChecker + * @param CollectionFactory $templateCollection + * @param string $name + */ + public function __construct( + VariableCompatibilityChecker $compatibilityChecker, + CollectionFactory $templateCollection, + string $name = null + ) { + parent::__construct($name); + $this->templateCollection = $templateCollection; + $this->compatibilityChecker = $compatibilityChecker; + } + + /** + * @inheritdoc + */ + protected function configure() + { + $this->setName('dev:email:override-compatibility-check') + ->setDescription('Scans email template overrides for potential variable usage compatibility issues'); + } + + /** + * @inheritDoc + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $collection = $this->templateCollection->create(); + $collection->load(); + + $this->hasErrors = false; + foreach ($collection as $template) { + $this->checkTemplate($template, $output); + } + + if (!$this->hasErrors) { + $output->writeln('<info>No errors detected</info>'); + } + return $this->hasErrors ? Cli::RETURN_FAILURE : Cli::RETURN_SUCCESS; + } + + /** + * Check the given template for compatibility issues + * + * @param AbstractTemplate $template + * @param OutputInterface $output + */ + protected function checkTemplate(AbstractTemplate $template, OutputInterface $output): void + { + $errors = $this->compatibilityChecker->getCompatibilityIssues($template->getTemplateText()); + $templateName = $template->getTemplateCode(); + if (!empty($errors)) { + $this->hasErrors = true; + $output->writeln( + '<error>Template "' . $templateName . '" has the following compatibility issues:</error>' + ); + $this->renderErrors($output, $errors); + } + $errors = $this->compatibilityChecker->getCompatibilityIssues($template->getTemplateSubject()); + if (!empty($errors)) { + $this->hasErrors = true; + $output->writeln( + '<error>Template "' . $templateName . '" subject has the following compatibility issues:</error>' + ); + $this->renderErrors($output, $errors); + } + } + + /** + * Render given errors + * + * @param OutputInterface $output + * @param array $errors + */ + private function renderErrors(OutputInterface $output, array $errors): void + { + foreach ($errors as $error) { + $error = str_replace(PHP_EOL, PHP_EOL . ' ', $error); + $output->writeln( + '<error> - ' . $error . '</error>' + ); + } + $output->writeln(''); + } +}
app/code/Magento/Email/etc/di.xml+7 −0 modified@@ -90,4 +90,11 @@ </argument> </arguments> </type> + <type name="Magento\Framework\Console\CommandListInterface"> + <arguments> + <argument name="commands" xsi:type="array"> + <item name="emailTemplateCheck" xsi:type="object">Magento\Email\Console\Command\DatabaseTemplateCompatibilityCommand</item> + </argument> + </arguments> + </type> </config>
app/code/Magento/Email/Model/AbstractTemplate.php+8 −21 modified@@ -31,32 +31,32 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn /** * Default design area for emulation */ - const DEFAULT_DESIGN_AREA = 'frontend'; + public const DEFAULT_DESIGN_AREA = 'frontend'; /** * Default path to email logo */ - const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png'; + public const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png'; /** * Email logo url */ - const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo'; + public const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo'; /** * Email logo alt text */ - const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt'; + public const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt'; /** * Email logo width */ - const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width'; + public const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width'; /** * Email logo height */ - const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height'; + public const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height'; /** * Configuration of design package for template @@ -144,8 +144,6 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn protected $filesystem; /** - * Scope config - * * @var \Magento\Framework\App\Config\ScopeConfigInterface */ protected $scopeConfig; @@ -361,24 +359,11 @@ public function getProcessedTemplate(array $variables = []) $variables = $this->addEmailVariables($variables, $storeId); $processor->setVariables($variables); - // Type legacy id strict - // db legacy true numeric false - // db new false numeric true - // filesystem false string false - // preview false null true - $isLegacy = $this->getData('is_legacy'); - $templateId = $this->getTemplateId(); - $previousStrictMode = $processor->setStrictMode( - !$isLegacy && (is_numeric($templateId) || empty($templateId)) - ); - try { $result = $processor->filter($this->getTemplateText()); } catch (\Exception $e) { $this->cancelDesignConfig(); throw new \LogicException(__($e->getMessage()), $e->getCode(), $e); - } finally { - $processor->setStrictMode($previousStrictMode); } if ($isDesignApplied) { @@ -468,6 +453,8 @@ protected function addEmailVariables($variables, $storeId) if (!isset($variables['store'])) { $variables['store'] = $store; } + $storeAddress = $variables['store']->getFormattedAddress(); + $variables['store']->setData('formatted_address', $storeAddress); if (!isset($variables['store']['frontend_name'])) { $variables['store']['frontend_name'] = $store->getFrontendName(); }
app/code/Magento/Email/Model/Template.php+3 −11 modified@@ -45,20 +45,20 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ * @deprecated * @see \Magento\Email\Model\Transport::XML_PATH_SENDING_SET_RETURN_PATH */ - const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path'; + public const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path'; /** * Configuration path for custom Return-Path email * @deprecated * @see \Magento\Email\Model\Transport::XML_PATH_SENDING_RETURN_PATH_EMAIL */ - const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email'; + public const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email'; /** * Config path to mail sending setting that shows if email communications are disabled * @deprecated */ - const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; + public const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; /** * BCC list @@ -68,8 +68,6 @@ class Template extends AbstractTemplate implements \Magento\Framework\Mail\Templ protected $_bcc = []; /** - * Return path - * * @var string */ protected $_returnPath = ''; @@ -247,17 +245,11 @@ public function getProcessedTemplateSubject(array $variables) $this->applyDesignConfig(); $storeId = $this->getDesignConfig()->getStore(); - $previousStrictMode = $processor->setStrictMode( - !$this->getData('is_legacy') && is_numeric($this->getTemplateId()) - ); - try { $processedResult = $processor->setStoreId($storeId)->filter(__($this->getTemplateSubject())); } catch (\Exception $e) { $this->cancelDesignConfig(); throw new \Magento\Framework\Exception\MailException(__($e->getMessage()), $e); - } finally { - $processor->setStrictMode($previousStrictMode); } $this->cancelDesignConfig();
app/code/Magento/Email/Model/Template/VariableCompatibilityChecker.php+204 −0 added@@ -0,0 +1,204 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Email\Model\Template; + +use Magento\Framework\Filter\Template\Tokenizer\Parameter; +use Magento\Framework\Filter\Template\Tokenizer\Variable; + +/** + * Scan an email template for compatibility with the strict resolver + */ +class VariableCompatibilityChecker +{ + private const CONSTRUCTION_DEPEND_PATTERN = '/{{depend\s*(.*?)}}(.*?){{\\/depend\s*}}/si'; + private const CONSTRUCTION_IF_PATTERN = '/{{if\s*(.*?)}}(.*?)({{else}}(.*?))?{{\\/if\s*}}/si'; + private const LOOP_PATTERN = '/{{for(?P<loopItem>.*? )(in)(?P<loopData>.*?)}}(?P<loopBody>.*?){{\/for}}/si'; + private const CONSTRUCTION_PATTERN = '/{{([a-z]{0,10})(.*?)}}(?:(.*?)(?:{{\/(?:\\1)}}))?/si'; + + /** + * @var array + */ + private array $errors = []; + + /** + * @var Variable + */ + private Variable $variableTokenizer; + + /** + * @var Parameter + */ + private Parameter $parameterTokenizer; + + /** + * Constructor + * + * @param Variable $variableTokenizer + * @param Parameter $parameterTokenizer + */ + public function __construct(Variable $variableTokenizer, Parameter $parameterTokenizer) + { + $this->variableTokenizer = $variableTokenizer; + $this->parameterTokenizer = $parameterTokenizer; + } + + /** + * Detect invalid usage of template filter directives + * + * @param string $template + */ + public function getCompatibilityIssues(string $template): array + { + $this->errors = []; + + if (empty($template)) { + return []; + } + + $template = $this->processIfDirectives($template); + $template = $this->processDependDirectives($template); + $template = $this->processForDirectives($template); + $this->processVarDirectivesAndParams($template); + + return $this->errors; + } + + /** + * Process the {{if}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processIfDirectives(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_IF_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{if <var>}} + $this->validateVariableUsage($construction[1]); + $html = str_replace($construction[0], $construction[2] . ($construction[4] ?? ''), $html); + } + } + + return $html; + } + + /** + * Process the {{depend}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processDependDirectives(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_DEPEND_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{depend <var>}} + $this->validateVariableUsage($construction[1]); + $html = str_replace($construction[0], $construction[2], $html); + } + } + + return $html; + } + + /** + * Process the {{for}} directives in the file + * + * @param string $html + * @return string The processed template + */ + private function processForDirectives(string $html): string + { + if (preg_match_all(self::LOOP_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + // validate {{for in <var>}} + $this->validateVariableUsage($construction['loopData']); + $html = str_replace($construction[0], $construction['loopBody'], $html); + } + } + + return $html; + } + + /** + * Process the all var directives and var directive params in the file + * + * @param string $html + * @return string The processed template + */ + private function processVarDirectivesAndParams(string $html): string + { + if (preg_match_all(self::CONSTRUCTION_PATTERN, $html, $constructions, PREG_SET_ORDER)) { + foreach ($constructions as $construction) { + if (empty($construction[2])) { + continue; + } + + if ($construction[1] === 'var') { + $this->validateVariableUsage($construction[2]); + } else { + $this->validateDirectiveBody($construction[2]); + } + } + } + + return $html; + } + + /** + * Validate directive body is valid. e.g. {{somedir <directive body>}} + * + * @param string $body + */ + private function validateDirectiveBody(string $body): void + { + $this->parameterTokenizer->setString($body); + $params = $this->parameterTokenizer->tokenize(); + + foreach ($params as $param) { + if (substr($param, 0, 1) === '$') { + $this->validateVariableUsage(substr($param, 1)); + } + } + } + + /** + * Validate directive variable usage is valid. e.g. {{var <variable body>}} or {{somedir some_param="$foo.bar()"}} + * + * @param string $body + */ + private function validateVariableUsage(string $body): void + { + $this->variableTokenizer->setString($body); + $stack = $this->variableTokenizer->tokenize(); + + if (empty($stack)) { + return; + } + + foreach ($stack as $token) { + // As a static analyzer there are no data types to know if this is a DataObject so allow all get* methods + if ($token['type'] === 'method' && substr($token['name'], 0, 3) !== 'get') { + $this->addError( + 'Template directives may not invoke methods. Only scalar array access is allowed.' . PHP_EOL + . 'Found "' . trim($body) . '"' + ); + } + } + } + + /** + * Add an error to the current processing template + * + * @param string $error + */ + private function addError(string $error): void + { + $this->errors[] = $error; + } +}
app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php+4 −11 modified@@ -97,7 +97,7 @@ protected function setUp(): void ->getMockForAbstractClass(); $this->store = $this->getMockBuilder(Store::class) - ->setMethods(['getFrontendName', 'getId']) + ->setMethods(['getFrontendName', 'getId', 'getFormattedAddress']) ->disableOriginalConstructor() ->getMock(); $this->store->expects($this->any()) @@ -106,6 +106,9 @@ protected function setUp(): void $this->store->expects($this->any()) ->method('getFrontendName') ->willReturn('storeId'); + $this->store->expects($this->any()) + ->method('getFormattedAddress') + ->willReturn("Test Store\n Street 1"); $this->storeManager->expects($this->any()) ->method('getStore') ->willReturn($this->store); @@ -188,7 +191,6 @@ public function testGetProcessedTemplate($variables, $templateType, $storeId, $e 'filter', 'getStoreId', 'getInlineCssFiles', - 'setStrictMode', ] ) ->disableOriginalConstructor() @@ -209,10 +211,6 @@ public function testGetProcessedTemplate($variables, $templateType, $storeId, $e $filterTemplate->expects($this->any()) ->method('getStoreId') ->willReturn($storeId); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(true)], [$this->equalTo(false)]) - ->willReturnOnConsecutiveCalls(false, true); $expectedVariables['store'] = $this->store; @@ -271,7 +269,6 @@ public function testGetProcessedTemplateException() 'filter', 'getStoreId', 'getInlineCssFiles', - 'setStrictMode', ] ) ->disableOriginalConstructor() @@ -288,10 +285,6 @@ public function testGetProcessedTemplateException() $filterTemplate->expects($this->any()) ->method('getStoreId') ->willReturn(1); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(false)], [$this->equalTo(true)]) - ->willReturnOnConsecutiveCalls(true, false); $model = $this->getModelMock( [
app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php+3 −3 modified@@ -25,7 +25,7 @@ use Magento\Framework\Filter\DirectiveProcessor\IfDirective; use Magento\Framework\Filter\DirectiveProcessor\LegacyDirective; use Magento\Framework\Filter\DirectiveProcessor\TemplateDirective; -use Magento\Framework\Filter\VariableResolver\StrategyResolver; +use Magento\Framework\Filter\VariableResolver\StrictResolver; use Magento\Framework\Stdlib\StringUtils; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\View\Asset\ContentProcessorInterface; @@ -134,7 +134,7 @@ class FilterTest extends TestCase private $pubDirectoryRead; /** - * @var MockObject|StrategyResolver + * @var MockObject|StrictResolver */ private $variableResolver; @@ -209,7 +209,7 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); $this->variableResolver = - $this->getMockBuilder(StrategyResolver::class) + $this->getMockBuilder(StrictResolver::class) ->disableOriginalConstructor() ->getMock();
app/code/Magento/Email/Test/Unit/Model/TemplateTest.php+1 −5 modified@@ -523,16 +523,12 @@ public function testGetProcessedTemplateSubject() class_exists(Template::class, true); $filterTemplate = $this->getMockBuilder(\Magento\Framework\Filter\Template::class) - ->setMethods(['setVariables', 'setStoreId', 'filter', 'setStrictMode']) + ->setMethods(['setVariables', 'setStoreId', 'filter']) ->disableOriginalConstructor() ->getMock(); $model->expects($this->once()) ->method('getTemplateFilter') ->willReturn($filterTemplate); - $filterTemplate->expects($this->exactly(2)) - ->method('setStrictMode') - ->withConsecutive([$this->equalTo(true)], [$this->equalTo(false)]) - ->willReturnOnConsecutiveCalls(false, true); $model->expects($this->once()) ->method('applyDesignConfig');
app/code/Magento/EncryptionKey/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-encryption-key", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Fedex/composer.json+16 −14 modified@@ -1,27 +1,28 @@ { "name": "magento/module-fedex", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/GiftMessage/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-gift-message", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-eav": "*", - "magento/module-multishipping": "*" + "magento/module-eav": "102.1.*", + "magento/module-multishipping": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/GiftMessageGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-gift-message-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-gift-message": "*" + "magento/framework": "103.0.*", + "magento/module-gift-message": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/GoogleAdwords/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-google-adwords", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/GoogleAnalytics/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GoogleOptimizer/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-optimizer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-google-analytics": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-google-analytics": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GraphQlCache/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-graph-ql-cache", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-page-cache": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/GraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-eav": "*", - "magento/framework": "*", - "magento/module-webapi": "*" + "magento/module-eav": "102.1.*", + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql-cache": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/GraphQl/etc/adminhtml/system.xml+32 −0 added@@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +/** + * Representation of Webapi module in System Configuration (Magento admin panel). + * + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> + <system> + <section id="webapi"> + <group id="graphql_validation" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>GraphQl Input Limits</label> + <field id="input_limit_enabled" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <label>Enable Input Limits</label> + <config_path>graphql/validation/input_limit_enabled</config_path> + </field> + <field id="maximum_page_size" translate="label comment" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Page Size</label> + <comment>Maximum number of items allowed in a paginated search result.</comment> + <config_path>graphql/validation/maximum_page_size</config_path> + <depends> + <field id="input_limit_enabled">1</field> + </depends> + </field> + </group> + </section> + </system> +</config> +
app/code/Magento/GroupedCatalogInventory/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-grouped-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-grouped-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-grouped-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/GroupedImportExport/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-grouped-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-grouped-product": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/GroupedProduct/composer.json+22 −20 modified@@ -1,34 +1,35 @@ { "name": "magento/module-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-grouped-product-sample-data": "*" + "magento/module-grouped-product-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -38,3 +39,4 @@ } } } +
app/code/Magento/GroupedProductGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-grouped-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-grouped-product": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-grouped-product": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/ImportExport/composer.json+14 −12 modified@@ -1,25 +1,26 @@ { "name": "magento/module-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.3", "require": { "php": "~7.3.0||~7.4.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Indexer/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-indexer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/InstantPurchase/composer.json+10 −8 modified@@ -6,16 +6,17 @@ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-quote": "*", - "magento/module-vault": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-vault": "101.2.*", + "magento/framework": "103.0.*" }, "autoload": { "files": [ @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Integration/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-integration", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3-p2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-user": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Integration/etc/db_schema.xml+2 −2 modified@@ -16,7 +16,7 @@ comment="Updated At"/> <column xsi:type="varchar" name="name" nullable="false" length="255" comment="Name of consumer"/> <column xsi:type="varchar" name="key" nullable="false" length="32" comment="Key code"/> - <column xsi:type="varchar" name="secret" nullable="false" length="32" comment="Secret code"/> + <column xsi:type="varchar" name="secret" nullable="false" length="128" comment="Secret code"/> <column xsi:type="text" name="callback_url" nullable="true" comment="Callback URL"/> <column xsi:type="text" name="rejected_callback_url" nullable="false" comment="Rejected callback URL"/> <constraint xsi:type="primary" referenceId="PRIMARY"> @@ -46,7 +46,7 @@ comment="Customer user ID"/> <column xsi:type="varchar" name="type" nullable="false" length="16" comment="Token Type"/> <column xsi:type="varchar" name="token" nullable="false" length="32" comment="Token"/> - <column xsi:type="varchar" name="secret" nullable="false" length="32" comment="Token Secret"/> + <column xsi:type="varchar" name="secret" nullable="false" length="128" comment="Token Secret"/> <column xsi:type="varchar" name="verifier" nullable="true" length="32" comment="Token Verifier"/> <column xsi:type="text" name="callback_url" nullable="false" comment="Token Callback URL"/> <column xsi:type="smallint" name="revoked" unsigned="true" nullable="false" identity="false"
app/code/Magento/Integration/Model/Oauth/Token.php+1 −0 modified@@ -318,6 +318,7 @@ public function loadByConsumerIdAndUserType($consumerId, $userType) { $tokenData = $this->getResource()->selectTokenByConsumerIdAndUserType($consumerId, $userType); $this->setData($tokenData ? $tokenData : []); + $this->getResource()->afterLoad($this); return $this; }
app/code/Magento/Integration/Model/Oauth/Token/Provider.php+7 −7 modified@@ -44,7 +44,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function validateConsumer($consumer) { @@ -58,7 +58,7 @@ public function validateConsumer($consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function createRequestToken($consumer) { @@ -99,7 +99,7 @@ public function validateRequestToken($requestToken, $consumer, $oauthVerifier) } /** - * {@inheritdoc} + * @inheritdoc */ public function getAccessToken($consumer) { @@ -118,7 +118,7 @@ public function getAccessToken($consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateAccessTokenRequest($accessToken, $consumer) { @@ -144,7 +144,7 @@ public function validateAccessTokenRequest($accessToken, $consumer) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateAccessToken($accessToken) { @@ -168,15 +168,15 @@ public function validateAccessToken($accessToken) } /** - * {@inheritdoc} + * @inheritdoc */ public function validateOauthToken($oauthToken) { return strlen($oauthToken) == \Magento\Framework\Oauth\Helper\Oauth::LENGTH_TOKEN; } /** - * {@inheritdoc} + * @inheritdoc */ public function getConsumerByKey($consumerKey) {
app/code/Magento/Integration/Model/ResourceModel/Oauth/Consumer.php+49 −1 modified@@ -5,17 +5,29 @@ */ namespace Magento\Integration\Model\ResourceModel\Oauth; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Encryption\Encryptor; + class Consumer extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { + + /** + * @var Encryptor + */ + private $encryptor; + /** * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param string $connectionName + * @param Encryptor $encryptor */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, - $connectionName = null + $connectionName = null, + Encryptor $encryptor = null ) { parent::__construct($context, $connectionName); + $this->encryptor = $encryptor ?? ObjectManager::getInstance()->get(Encryptor::class); } /** @@ -61,4 +73,40 @@ public function getTimeInSecondsSinceCreation($consumerId) return $connection->fetchOne($select); } + + /** + * @inheritdoc + */ + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->encrypt($object->getSecret())); + } + + return parent::_beforeSave($object); + } + + /** + * @inheritdoc + */ + protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterLoad($object); + } + + /** + * @inheritdoc + */ + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getSecret()) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterSave($object); + } }
app/code/Magento/Integration/Model/ResourceModel/Oauth/Token.php+50 −1 modified@@ -6,6 +6,9 @@ namespace Magento\Integration\Model\ResourceModel\Oauth; use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\App\ObjectManager; /** * OAuth token resource model @@ -24,20 +27,28 @@ class Token extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb */ protected $date; + /** + * @var Encryptor + */ + private $encryptor; + /** * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param string $connectionName + * @param Encryptor $encryptor */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Stdlib\DateTime\DateTime $date, - $connectionName = null + $connectionName = null, + $encryptor = null ) { $this->_dateTime = $dateTime; $this->date = $date; + $this->encryptor = $encryptor ?? ObjectManager::getInstance()->get(Encryptor::class); parent::__construct($context, $connectionName); } @@ -195,4 +206,42 @@ public function selectTokenByCustomerId($customerId) ->where('user_type = ?', UserContextInterface::USER_TYPE_CUSTOMER); return $connection->fetchRow($select); } + + /** + * @inheritdoc + */ + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + + if (!empty($object->getSecret())) { + $object->setSecret($this->encryptor->encrypt($object->getSecret())); + } + } + return parent::_beforeSave($object); + } + + /** + * @inheritdoc + */ + protected function _afterLoad(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterLoad($object); + } + + /** + * @inheritdoc + */ + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) + { + if ($object->getType() === \Magento\Integration\Model\Oauth\Token::TYPE_ACCESS) { + $object->setSecret($this->encryptor->decrypt($object->getSecret())); + } + + return parent::_afterSave($object); + } }
app/code/Magento/Integration/Setup/Patch/Data/UpgradeConsumerSecret.php+133 −0 added@@ -0,0 +1,133 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Integration\Setup\Patch\Data; + +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Magento\Framework\Setup\Patch\PatchVersionInterface; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer\Collection as ConsumerCollection; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer\CollectionFactory as ConsumerCollectionFactory; +use Magento\Integration\Model\ResourceModel\Oauth\Consumer; +use Psr\Log\LoggerInterface; + +/** + * Upgrades Oauth Consumer Secret if not encrypted + */ +class UpgradeConsumerSecret implements DataPatchInterface, PatchVersionInterface +{ + + /** + * @var ConsumerCollection + */ + private $consumerCollection; + + /** + * @var Encryptor + */ + private $encryptor; + + /** + * @var Consumer + */ + private $consumerResourceModel; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /**#@+ + * Constant for batch size limit + */ + private const BATCH_SIZE = 100; + /**#@-*/ + + /** + * Constructor + * + * @param ConsumerCollectionFactory $consumerCollectionFactory + * @param Encryptor $encryptor + * @param Consumer $consumerResourceModel + * @param LoggerInterface $logger + */ + public function __construct( + ConsumerCollectionFactory $consumerCollectionFactory, + Encryptor $encryptor, + Consumer $consumerResourceModel, + LoggerInterface $logger + ) { + + $this->consumerCollection= $consumerCollectionFactory->create(); + $this->encryptor = $encryptor; + $this->consumerResourceModel = $consumerResourceModel; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + $this->consumerCollection->addFieldToSelect('entity_id'); + $this->consumerCollection->addFieldToSelect('secret'); + $connection = $this->consumerResourceModel->getConnection(); + $this->consumerCollection->setPageSize(self::BATCH_SIZE); + $pages = $this->consumerCollection->getLastPageNumber(); + $tableName = $this->consumerResourceModel->getMainTable(); + + for ($currentPage = 1; $currentPage <= $pages; $currentPage++) { + $this->consumerCollection->setCurPage($currentPage); + + /** @var $consumer Consumer */ + foreach ($this->consumerCollection as $consumer) { + $existingSecret = $consumer->getSecret(); + $entityId = $consumer->getEntityId(); + + if ($entityId && $existingSecret) { + if (strlen($existingSecret) <= OauthHelper::LENGTH_TOKEN_SECRET) { + $data = ['secret' => $this->encryptor->encrypt($existingSecret)]; + $where = ['entity_id = ?' => $entityId]; + try { + $connection->update($tableName, $data, $where); + } catch (\Exception $exception) { + $this->logger->critical($exception->getMessage()); + return $this; + } + } + } + } + $this->consumerCollection->clear(); + } + + return $this; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public static function getVersion() + { + return '2.0.0'; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Integration/Setup/Patch/Data/UpgradeOauthToken.php+136 −0 added@@ -0,0 +1,136 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Integration\Setup\Patch\Data; + +use Magento\Framework\Encryption\Encryptor; +use Magento\Framework\Oauth\Helper\Oauth as OauthHelper; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Magento\Framework\Setup\Patch\PatchVersionInterface; +use Magento\Integration\Model\ResourceModel\Oauth\Token\Collection as TokenCollection; +use Magento\Integration\Model\ResourceModel\Oauth\Token\CollectionFactory as TokenCollectionFactory; +use Magento\Integration\Model\ResourceModel\Oauth\Token; +use Magento\Integration\Model\Oauth\Token as TokenModel; +use Psr\Log\LoggerInterface; + +/** + * Upgrades Oauth Access Token Secret if not encrypted + */ +class UpgradeOauthToken implements DataPatchInterface, PatchVersionInterface +{ + + /** + * @var TokenCollection + */ + private $tokenCollection; + + /** + * @var Encryptor + */ + private $encryptor; + + /** + * @var Token + */ + private $tokenResourceModel; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /**#@+ + * Constant for batch size limit + */ + private const BATCH_SIZE = 100; + /**#@-*/ + + /** + * Constructor + * + * @param TokenCollectionFactory $tokenCollectionFactory + * @param Encryptor $encryptor + * @param Token $tokenResourceModel + * @param LoggerInterface $logger + */ + public function __construct( + TokenCollectionFactory $tokenCollectionFactory, + Encryptor $encryptor, + Token $tokenResourceModel, + LoggerInterface $logger + ) { + + $this->tokenCollection= $tokenCollectionFactory->create(); + $this->encryptor = $encryptor; + $this->tokenResourceModel = $tokenResourceModel; + $this->logger = $logger; + } + + /** + * @inheritdoc + */ + public function apply() + { + $this->tokenCollection->addFieldToSelect('entity_id'); + $this->tokenCollection->addFieldToSelect('secret'); + $this->tokenCollection->addFieldToSelect('type'); + $this->tokenCollection->setPageSize(self::BATCH_SIZE); + $connection = $this->tokenResourceModel->getConnection(); + $pages = $this->tokenCollection->getLastPageNumber(); + $tableName = $this->tokenResourceModel->getMainTable(); + + for ($currentPage = 1; $currentPage <= $pages; $currentPage++) { + $this->tokenCollection->setCurPage($currentPage); + + /** @var $token Token */ + foreach ($this->tokenCollection as $token) { + $existingSecret = $token->getSecret(); + $entityId = $token->getEntityId(); + $type = strtolower($token->getType()); + + if ($entityId && $existingSecret && $type === TokenModel::TYPE_ACCESS) { + if (strlen($existingSecret) <= OauthHelper::LENGTH_TOKEN_SECRET) { + $data = ['secret' => $this->encryptor->encrypt($existingSecret)]; + $where = ['entity_id = ?' => $entityId, 'type = ?' => 'access']; + try { + $connection->update($tableName, $data, $where); + } catch (\Exception $exception) { + $this->logger->critical($exception->getMessage()); + return $this; + } + } + } + } + $this->tokenCollection->clear(); + } + return $this; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public static function getVersion() + { + return '2.0.0'; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +}
app/code/Magento/Integration/Test/Unit/Model/Oauth/TokenTest.php+2 −1 modified@@ -134,7 +134,8 @@ protected function setUp(): void 'selectTokenByConsumerIdAndUserType', 'selectTokenByAdminId', 'selectTokenByCustomerId', - 'load' + 'load', + 'afterLoad' ] ) ->disableOriginalConstructor()
app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php+54 −18 modified@@ -23,6 +23,8 @@ use Magento\Integration\Model\Oauth\TokenFactory; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +use Magento\Integration\Model\ResourceModel\Oauth\Token as TokenResourceModel; +use PHPUnit\Framework\MockObject\MockObject; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -61,25 +63,46 @@ class OauthTest extends TestCase */ private $_loggerMock; + /** + * @var string + */ private $_oauthToken; + /** + * @var string + */ private $_oauthSecret; + /** + * @var string + */ private $_oauthVerifier; - const CONSUMER_ID = 1; + /**#@+ + * Constants + */ + private const CONSUMER_ID = 1; + + private const REQUEST_URL = 'http://magento.ll'; + /**#@-*/ - const REQUEST_URL = 'http://magento.ll'; + /** @var MockObject */ + private $tokenResourceModelMock; + /** + * Initialize dependencies. + * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ protected function setUp(): void { $this->_consumerFactory = $this->getMockBuilder(ConsumerFactory::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMock(); $this->_consumerMock = $this->getMockBuilder(Consumer::class) ->disableOriginalConstructor() - ->setMethods( + ->onlyMethods( [ 'getCreatedAt', 'loadByKey', @@ -99,39 +122,43 @@ protected function setUp(): void ->willReturn($this->_consumerMock); $this->_nonceFactory = $this->getMockBuilder(NonceFactory::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMock(); $this->_tokenFactory = $this->getMockBuilder( TokenFactory::class )->disableOriginalConstructor() - ->setMethods(['create'])->getMock(); + ->onlyMethods(['create'])->getMock(); $this->_tokenMock = $this->getMockBuilder(Token::class) ->disableOriginalConstructor() - ->setMethods( + ->onlyMethods( [ 'getId', 'load', - 'getType', 'createRequestToken', - 'getToken', - 'getSecret', 'createVerifierToken', 'getVerifier', - 'getConsumerId', 'convertToAccess', - 'getRevoked', 'getResource', 'loadByConsumerIdAndUserType', '__wakeup', ] ) + ->addMethods( + [ + 'getType', + 'getToken', + 'getSecret', + 'getConsumerId', + 'getRevoked' + ] + ) ->getMock(); $this->_tokenFactory->expects($this->any())->method('create')->willReturn($this->_tokenMock); $this->_oauthHelperMock = $this->getMockBuilder(Oauth::class) ->setConstructorArgs([new Random()]) ->getMock(); $this->_httpUtilityMock = $this->getMockBuilder(\Zend_Oauth_Http_Utility::class) - ->setMethods(['sign']) + ->onlyMethods(['sign']) ->getMock(); $this->_dateMock = $this->getMockBuilder(DateTime::class) ->disableOriginalConstructor() @@ -145,6 +172,10 @@ protected function setUp(): void $this->_nonceFactory, $this->_dateMock ); + $this->tokenResourceModelMock = $this->getMockBuilder(TokenResourceModel::class) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + $tokenProvider = new Provider( $this->_consumerFactory, $this->_tokenFactory, @@ -335,18 +366,23 @@ protected function _setupNonce($isUsed = false, $timestamp = 0) $nonceMock = $this->getMockBuilder( Nonce::class )->disableOriginalConstructor() - ->setMethods( + ->onlyMethods( [ 'loadByCompositeKey', + 'save', + '__wakeup', + ] + ) + ->addMethods( + [ 'getNonce', - 'getTimestamp', 'setNonce', 'setConsumerId', 'setTimestamp', - 'save', - '__wakeup', + 'getTimeStamp' ] - )->getMock(); + ) + ->getMock(); $nonceMock->expects($this->any())->method('getNonce')->willReturn($isUsed); $nonceMock->expects($this->any())->method('loadByCompositeKey')->willReturnSelf();
app/code/Magento/JwtFrameworkAdapter/composer.json+8 −6 modified@@ -1,19 +1,20 @@ { "name": "magento/module-jwt-framework-adapter", "description": "JWT Manager implementation based on jwt-framework", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "web-token/jwt-framework": "^v2.2.7" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/LayeredNavigation/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/LoginAsCustomerAdminUi/composer.json+18 −15 modified@@ -1,28 +1,31 @@ { "name": "magento/module-login-as-customer-admin-ui", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-frontend-ui": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-frontend-ui": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerAdminUi\\": "" } } } +
app/code/Magento/LoginAsCustomerApi/composer.json+9 −5 modified@@ -1,19 +1,23 @@ { "name": "magento/module-login-as-customer-api", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerApi\\": "" } } } +
app/code/Magento/LoginAsCustomerAssistance/composer.json+18 −15 modified@@ -1,28 +1,31 @@ { "name": "magento/module-login-as-customer-assistance", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-login-as-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-login-as-customer-admin-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer": "100.4.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-login-as-customer-admin-ui": "100.4.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerAssistance\\": "" } } } +
app/code/Magento/LoginAsCustomer/composer.json+15 −11 modified@@ -1,25 +1,29 @@ { "name": "magento/module-login-as-customer", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-backend": "102.0.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomer\\": "" } } } +
app/code/Magento/LoginAsCustomerFrontendUi/composer.json+12 −9 modified@@ -1,22 +1,25 @@ { "name": "magento/module-login-as-customer-frontend-ui", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-customer": "*", - "magento/module-store": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerFrontendUi\\": "" } } } +
app/code/Magento/LoginAsCustomerGraphQl/composer.json+14 −12 modified@@ -1,23 +1,24 @@ { "name": "magento/module-login-as-customer-graph-ql", "description": "Flexible login as a customer so a merchant or merchant admin can log into an end customer's account to assist them with their account.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-assistance": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/module-customer": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-assistance": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-customer": "103.0.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/LoginAsCustomerLog/composer.json+17 −14 modified@@ -1,27 +1,30 @@ { "name": "magento/module-login-as-customer-log", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-ui": "*", - "magento/module-user": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerLog\\": "" } } } +
app/code/Magento/LoginAsCustomerPageCache/composer.json+14 −11 modified@@ -1,24 +1,27 @@ { "name": "magento/module-login-as-customer-page-cache", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-page-cache": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-page-cache": "100.4.*" + }, "autoload": { - "files": [ "registration.php" ], + "files": [ + "registration.php" + ], "psr-4": { "Magento\\LoginAsCustomerPageCache\\": "" } } } +
app/code/Magento/LoginAsCustomerQuote/composer.json+12 −11 modified@@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-quote", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*" - }, - "suggest": { - "magento/module-login-as-customer-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } +
app/code/Magento/LoginAsCustomerSales/composer.json+12 −11 modified@@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-sales", - "description": "", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-user": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-sales": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-user": "101.2.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-sales": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } +
app/code/Magento/Marketplace/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-marketplace", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/MediaContentApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-content-api", "description": "Magento module provides the API interfaces for managing relations between content and media files used in that content", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-media-gallery-api": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaContentCatalog/composer.json+10 −8 modified@@ -1,19 +1,20 @@ { "name": "magento/module-media-content-catalog", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Catalog module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-media-content-api": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/MediaContentCms/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-content-cms", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Cms module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaContent/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-content", "description": "Magento module provides the implementation for managing relations between content and media files used in that content", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-content-api": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-content-synchronization-api", "description": "Magento module responsible for the media content synchronization implementation API", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationCatalog/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-catalog", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Catalog module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationCms/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-cms", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Cms module", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaContentSynchronization/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-content-synchronization", "description": "Magento module provides implementation of the media content data synchronization.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-asynchronous-operations": "*" - }, - "suggest": { - "magento/module-media-gallery-synchronization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" + }, + "suggest": { + "magento/module-media-gallery-synchronization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGalleryApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-api", "description": "Magento module responsible for media gallery asset attributes storage and management", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "101.0.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryCatalog/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-catalog", "description": "Magento module responsible for catalog gallery processor delete operation handling", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGalleryCatalogIntegration/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-catalog-integration", "description": "Magento module responsible for extending catalog image uploader functionality", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-gallery-ui-api": "*" - }, - "suggest": { - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-gallery-ui-api": "100.4.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGalleryCatalogIntegration/Test/Mftf/Test/AdminUploadSameImageDeleteFromTemporaryFolderTest.xml+4 −0 modified@@ -18,6 +18,9 @@ <testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/943908/scenarios/4836631"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> + <skip> + <issueId value="DEPRECATED">Cannot access catalog/tmp/ directory in media gallery anymore</issueId> + </skip> </annotations> <before> <createData entity="SimpleSubCategory" stepKey="category"/> @@ -39,6 +42,7 @@ <!-- Open tmp/category folder --> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandCatalogTmpFolderActionGroup" stepKey="expandTmpFolder"/> <actionGroup ref="AdminMediaGalleryFolderSelectByFullPathActionGroup" stepKey="selectCategoryFolder"> <argument name="path" value="catalog/tmp/category"/>
app/code/Magento/MediaGalleryCatalogUi/composer.json+11 −9 modified@@ -1,20 +1,21 @@ { "name": "magento/module-media-gallery-catalog-ui", "description": "Magento module that implement category grid for media gallery.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInCategoryFilterTest.xml+22 −8 modified@@ -23,22 +23,36 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> - <argument name="imageName" value="{{UpdatedImageDetails.title}}"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryAfter"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAfter"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandCategoryFolder"> + <argument name="FolderName" value="category"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clickDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> - <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAfter"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectSecondImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clickDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImages"/> + <comment userInput="BIC workaround" stepKey="resetAdminDataGridToDefaultView"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="openCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -52,7 +66,7 @@ <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedContentImage"/> <actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategoryForm"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploaderAgain"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterAgain"/> + <comment userInput="BIC workaround" stepKey="clearFilterAgain"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGridToDefaultViewAgain"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setUsedInFilter">
app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterOnTest.xml+27 −15 modified@@ -29,26 +29,38 @@ <magentoCLI command="config:set {{WysiwygDisabledByDefault.path}} {{WysiwygDisabledByDefault.value}}" stepKey="disableWYSIWYG"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/> - <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToAssertEmptyUsedIn"/> - <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/> - <actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeDetails"/> - - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageMetadata.title}}"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="clearFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clickDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> - - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersAfterDeleteImages"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="openViewImageDetailsToAssertEmptyUsedIn"/> + <comment userInput="BIC workaround" stepKey="assertThereIsNoUsedInSection"/> + <comment userInput="BIC workaround" stepKey="closeDetails"/> + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectFirstImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clickDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImages"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <comment userInput="BIC workaround" stepKey="clearFiltersAfterDeleteImages"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> <argument name="productId" value="$createProduct.id$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -59,7 +71,8 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView2"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setUsedInFilter"> <argument name="filterName" value="Used in Products"/> @@ -73,7 +86,6 @@ <actionGroup ref="AdminAssertMediaGalleryFilterPlaceHolderGridActionGroup" stepKey="assertFilterApplied"> <argument name="filterPlaceholder" value="{{ImageMetadata.title}}"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnProductGrid"/> - + <comment userInput="BIC workaround" stepKey="clearFiltersOnProductGrid"/> </test> </tests>
app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml+8 −7 modified@@ -28,27 +28,27 @@ <after> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderForDelete"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear" /> + <comment userInput="BIC workaround" stepKey="waitForLoadingMaskToDisappear"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetCategoryImageGalleryGridToDefaultView"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createCategoryImageFolder"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertCategoryImageFolderCreated"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> @@ -63,7 +63,7 @@ <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploaderToVerifyLink"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryImageFolder"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> @@ -99,8 +99,9 @@ <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="openCategoryImageFolder"> - <argument name="name" value="categoryImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkedCategoryGridTest.xml+19 −5 modified@@ -22,18 +22,21 @@ <before> <createData entity="SimpleSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> <actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openMediaGalleryCategoryGridPage"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> </before> <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> <actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openMediaGalleryCategoryGridPage"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> @@ -43,8 +46,11 @@ <argument name="id" value="$category.id$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear" /> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <comment userInput="BIC workaround" stepKey="waitForLoadingMaskToDisappear"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/> @@ -61,6 +67,10 @@ <actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploaderToVerifyLink"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters2"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryImageFolder"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInCategories"> @@ -94,6 +104,10 @@ <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder2"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="openCategoryImageFolder"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkProductGridTest.xml+2 −0 modified@@ -61,6 +61,7 @@ <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetProductGridToDefaultView"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInProducts"> <argument name="entityName" value="Products"/> @@ -71,6 +72,7 @@ <deleteData createDataKey="product" stepKey="deleteProduct"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters2"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
app/code/Magento/MediaGalleryCmsUi/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-cms-ui", "description": "Cms related UI elements in the magento media gallery", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryAssertImageUsedInLinkBlocksGridTest.xml+15 −7 modified@@ -21,13 +21,15 @@ <before> <createData entity="_defaultBlock" stepKey="createBlock" /> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllImages"/> </before> <after> <deleteData createDataKey="createBlock" stepKey="deleteBlock"/> - <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnStandaloneMediaGalleryPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFiltersOnStandaloneMediaGalleryPage"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolderAgain"> <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> @@ -40,7 +42,7 @@ <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnMediaGalleryPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFiltersOnMediaGalleryPage"/> <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImagesAfterTest"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> @@ -51,7 +53,10 @@ <click selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="clickInsertImageIcon" /> <waitForPageLoad stepKey="waitForInitialPageLoad" /> <waitForElementVisible selector="{{AdminMediaGalleryFolderSection.folderNewCreateButton}}" stepKey="waitForNewFolderButton"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> @@ -70,7 +75,10 @@ <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="saveBlock"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFiltersOnStandaloneMediaGallery"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> @@ -82,6 +90,6 @@ <actionGroup ref="AdminAssertMediaGalleryFilterPlaceHolderGridActionGroup" stepKey="assertFilterApplied"> <argument name="filterPlaceholder" value="{{ImageMetadata.title}}"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterInBlocksGrid"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilterInBlocksGrid"/> </test> </tests>
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryAssertUsedInLinkBlocksGridTest.xml+6 −5 modified@@ -35,13 +35,14 @@ <click selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="clickInsertImageIcon" /> <waitForPageLoad stepKey="waitForInitialPageLoad" /> <waitForPageLoad stepKey="waitForSecondaryPageLoad" /> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="blockImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> - <argument name="name" value="blockImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> @@ -56,7 +57,7 @@ <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="blockImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInBlocks"> @@ -72,15 +73,15 @@ <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAgain"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAgain"> - <argument name="name" value="blockImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/> <actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeDetails"/> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="blockImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </test> </tests>
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryAssertUsedInLinkedPagesGridTest.xml+18 −6 modified@@ -21,12 +21,15 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> </before> <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/> @@ -37,7 +40,10 @@ <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> <actionGroup ref="AdminCmsPageFillOutBasicFieldsActionGroup" stepKey="fillBasicPageFields"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/> @@ -51,7 +57,10 @@ <actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveCmsPageAndContinue"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFiltersAgain"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFiltersAgain"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInPages"> @@ -64,9 +73,12 @@ <argument name="pageUrlKey" value="{{_defaultCmsPage.identifier}}"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersInPageGrid"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFiltersInPageGrid"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFiltersAndAgain"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFiltersAndAgain"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="expandWysiwygFolder2"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAgain"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryAssertUsedInLinkPagesGridTest.xml+12 −8 modified@@ -21,20 +21,23 @@ <issueId value="DEPRECATED">Use AdminMediaGalleryAssertUsedInLinkedPagesGridTest instead</issueId> </skip> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> + <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAgain"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> <actionGroup ref="FillOutCustomCMSPageContentActionGroup" stepKey="fillBasicPageDataForPageWithDefaultStore"> <argument name="title" value="Unique page title MediaGalleryUi"/> @@ -43,14 +46,15 @@ </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> - <wait time="5" stepKey="waitFilterReallyCleared"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="waitFilterReallyCleared"/> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> @@ -69,7 +73,7 @@ <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInPages"> @@ -85,7 +89,7 @@ <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAgain"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAgain"> - <argument name="name" value="pageTestImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryCmsUiUsedInBlocksFilterTest.xml+18 −0 modified@@ -23,14 +23,31 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="selectWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="block" stepKey="deleteBlock"/> </after> <actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage1"> <argument name="CMSBlockPage" value="$$block$$"/> </actionGroup> <click selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="clickInsertImageIcon" /> <waitForPageLoad stepKey="waitForPageLoad" /> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -40,6 +57,7 @@ <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedContentImage"/> <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="saveBlock"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setUsedInFilter"> <argument name="filterName" value="Used in Blocks"/>
app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryCmsUiUsedInPagesFilterTest.xml+43 −19 modified@@ -18,10 +18,32 @@ <severity value="CRITICAL"/> <group value="media_gallery_ui"/> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCmsPageGrid"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters2"/> + <actionGroup ref="AdminSearchCmsPageInGridByUrlKeyActionGroup" stepKey="findCreatedCmsPage"> + <argument name="urlKey" value="test-page-1"/> + </actionGroup> + <actionGroup ref="AdminDeleteCmsPageFromGridActionGroup" stepKey="deleteCmsPage"> + <argument name="urlKey" value="test-page-1"/> + </actionGroup> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickApplyFiltersButton"/> + </after> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> <actionGroup ref="FillOutCustomCMSPageContentActionGroup" stepKey="fillBasicPageDataForPageWithDefaultStore"> <argument name="title" value="Unique page title MediaGalleryUi"/> @@ -30,17 +52,26 @@ </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <waitForPageLoad stepKey="waitForPageLoad" /> + <comment userInput="BIC workaround" stepKey="waitForPageLoad"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGallery"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> <actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectContentImageInGrid"> <argument name="imageName" value="{{ImageMetadata.title}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedContentImage"/> - <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="savePage"/> + <actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="savePage"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setUsedInFilter"> <argument name="filterName" value="Used in Pages"/> @@ -50,22 +81,15 @@ <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> <argument name="title" value="ImageMetadata.title"/> </actionGroup> - <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageMetadata.title}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clickDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> - - <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCmsPageGrid"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> - <actionGroup ref="AdminSearchCmsPageInGridByUrlKeyActionGroup" stepKey="findCreatedCmsPage"> - <argument name="urlKey" value="test-page-1"/> - </actionGroup> - <actionGroup ref="AdminDeleteCmsPageFromGridActionGroup" stepKey="deleteCmsPage"> - <argument name="urlKey" value="test-page-1"/> - </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickApplyFiltersButton"/> + <comment userInput="BIC workaround" stepKey="resetAdminDataGridToDefaultView"/> + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectFirstImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clickDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImages"/> + <comment userInput="BIC workaround" stepKey="navigateToCmsPageGrid"/> + <comment userInput="BIC workaround" stepKey="clearGridFilters2"/> + <comment userInput="BIC workaround" stepKey="findCreatedCmsPage"/> + <comment userInput="BIC workaround" stepKey="deleteCmsPage"/> + <comment userInput="BIC workaround" stepKey="clickApplyFiltersButton"/> </test> </tests>
app/code/Magento/MediaGallery/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery", "description": "Magento module responsible for media handling", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGalleryIntegration/composer.json+17 −15 modified@@ -1,32 +1,34 @@ { "name": "magento/module-media-gallery-integration", "description": "Magento module responsible for integration of enhanced media gallery", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-ui": "*" - }, - "require-dev": { - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-catalog": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-ui": "101.2.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" ], "psr-4": { "Magento\\MediaGalleryIntegration\\": "" } + }, + "require-dev": { + "magento/module-cms": "*" } } +
app/code/Magento/MediaGalleryMetadataApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-metadata-api", "description": "Magento module responsible for media gallery metadata implementation API", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryMetadata/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-metadata", "description": "Magento module responsible for images metadata processing", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-metadata-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaGallery/Model/Directory/Config/Converter.php+1 −0 modified@@ -11,6 +11,7 @@ /** * Media gallery directory config converter + * @deprecated */ class Converter implements ConverterInterface {
app/code/Magento/MediaGallery/Model/Directory/Config/SchemaLocator.php+1 −0 modified@@ -13,6 +13,7 @@ /** * Media gallery directory config schema locator + * @deprecated */ class SchemaLocator implements SchemaLocatorInterface {
app/code/Magento/MediaGallery/Model/Directory/ExcludedPatternsConfig.php+1 −0 modified@@ -12,6 +12,7 @@ /** * Media gallery directory config + * @deprecated */ class ExcludedPatternsConfig implements ExcludedPatternsConfigInterface {
app/code/Magento/MediaGallery/Model/Directory/IsExcluded.php+47 −11 modified@@ -7,6 +7,8 @@ namespace Magento\MediaGallery\Model\Directory; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Filesystem\File\WriteInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; @@ -18,8 +20,12 @@ */ class IsExcluded implements IsPathExcludedInterface { + private const MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH + = 'system/media_storage_configuration/allowed_resources/media_gallery_image_folders'; + /** * @var ExcludedPatternsConfigInterface + * @deprecated */ private $config; @@ -31,15 +37,31 @@ class IsExcluded implements IsPathExcludedInterface /** @var WriteInterface */ private $mediaDirectory; + /** + * @var ScopeConfigInterface + */ + private $coreConfig; + + /** + * @var string + */ + private $allowedPathPattern; + /** * @param ExcludedPatternsConfigInterface $config * @param Filesystem $filesystem + * @param ScopeConfigInterface $coreConfig */ - public function __construct(ExcludedPatternsConfigInterface $config, Filesystem $filesystem) - { + public function __construct( + ExcludedPatternsConfigInterface $config, + Filesystem $filesystem, + ScopeConfigInterface $coreConfig = null + ) { $this->config = $config; $this->filesystem = $filesystem; $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $this->coreConfig = $coreConfig ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class); + } /** @@ -51,17 +73,31 @@ public function __construct(ExcludedPatternsConfigInterface $config, Filesystem public function execute(string $path): bool { $realPath = $this->mediaDirectory->getDriver()->getRealPathSafety($path); - foreach ($this->config->get() as $pattern) { - if (empty($pattern)) { - continue; - } - preg_match($pattern, $realPath, $result); + return preg_match($this->getAllowedPathPattern(), $realPath) != 1; + } - if ($result) { - return true; + /** + * Get allowed path pattern + * + * @return string + */ + private function getAllowedPathPattern() + { + if (null === $this->allowedPathPattern) { + $mediaGalleryImageFolders = $this->coreConfig->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + $regExp = '/^('; + $or = ''; + foreach($mediaGalleryImageFolders as $folder) { + $folderPattern = str_replace('/', '[\/]+', $folder); + $regExp .= $or . $folderPattern . '\b(?!-)(?:\/?[^\/]+)*\/?$'; + $or = '|'; } + $regExp .= ')/'; + $this->allowedPathPattern = $regExp; } - - return false; + return $this->allowedPathPattern; } }
app/code/Magento/MediaGalleryRenditionsApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-renditions-api", "description": "Magento module that is responsible for the API implementation of Media Gallery Renditions.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryRenditions/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-renditions", "description": "Magento module that implements height and width fields for for media gallery items.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-renditions-api": "*", - "magento/module-media-gallery-api": "*", - "magento/framework-message-queue": "*", - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-renditions-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/module-cms": "104.0.*" + }, + "suggest": { + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGalleryRenditions/Test/Integration/Model/GenerateRenditionsTest.php+47 −8 modified@@ -8,6 +8,7 @@ namespace Magento\MediaGalleryRenditions\Test\Integration\Model; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; @@ -21,6 +22,15 @@ class GenerateRenditionsTest extends TestCase { + private const MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH + = 'system/media_storage_configuration/allowed_resources/media_gallery_image_folders'; + private const TEST_DIR = 'testDir'; + + /** + * @var array + */ + private $origConfigValue; + /** * @var GenerateRenditionsInterface */ @@ -41,13 +51,42 @@ class GenerateRenditionsTest extends TestCase */ private $driver; + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + protected function setup(): void { - $this->generateRenditions = Bootstrap::getObjectManager()->get(GenerateRenditionsInterface::class); - $this->mediaDirectory = Bootstrap::getObjectManager()->get(Filesystem::class) + $this->objectManager = Bootstrap::getObjectManager(); + $this->generateRenditions = $this->objectManager->get(GenerateRenditionsInterface::class); + $this->mediaDirectory = $this->objectManager->get(Filesystem::class) ->getDirectoryWrite(DirectoryList::MEDIA); - $this->driver = Bootstrap::getObjectManager()->get(DriverInterface::class); - $this->renditionSizeConfig = Bootstrap::getObjectManager()->get(Config::class); + $this->mediaDirectory->create(self::TEST_DIR); + $this->driver = $this->objectManager->get(DriverInterface::class); + $this->renditionSizeConfig = $this->objectManager->get(Config::class); + $config = $this->objectManager->get(ScopeConfigInterface::class); + $this->origConfigValue = $config->getValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + 'default' + ); + $scopeConfig = $this->objectManager->get(\Magento\Framework\App\Config\MutableScopeConfigInterface::class); + $scopeConfig->setValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + array_merge($this->origConfigValue, [self::TEST_DIR]), + ); + } + + protected function tearDown(): void + { + $scopeConfig = $this->objectManager->get(\Magento\Framework\App\Config\MutableScopeConfigInterface::class); + $scopeConfig->setValue( + self::MEDIA_GALLERY_IMAGE_FOLDERS_CONFIG_PATH, + $this->origConfigValue + ); + if ($this->mediaDirectory->isExist(self::TEST_DIR)) { + $this->mediaDirectory->delete(self::TEST_DIR); + } } public static function tearDownAfterClass(): void @@ -75,7 +114,7 @@ public static function tearDownAfterClass(): void public function testExecute(string $path, string $renditionPath): void { $this->copyImage($path); - $this->generateRenditions->execute([$path]); + $this->generateRenditions->execute([self::TEST_DIR . '/' . $path]); $expectedRenditionPath = $this->mediaDirectory->getAbsolutePath($renditionPath); list($imageWidth, $imageHeight) = getimagesize($expectedRenditionPath); $this->assertFileExists($expectedRenditionPath); @@ -98,7 +137,7 @@ public function testExecute(string $path, string $renditionPath): void private function copyImage(string $path): void { $imagePath = realpath(__DIR__ . '/../../_files' . $path); - $modifiableFilePath = $this->mediaDirectory->getAbsolutePath($path); + $modifiableFilePath = $this->mediaDirectory->getAbsolutePath(self::TEST_DIR . $path ); $this->driver->copy( $imagePath, $modifiableFilePath @@ -113,11 +152,11 @@ public function renditionsImageProvider(): array return [ 'rendition_image_not_generated' => [ 'paths' => '/magento_medium_image.jpg', - 'renditionPath' => ".renditions/magento_medium_image.jpg" + 'renditionPath' => ".renditions/" . self::TEST_DIR . "/magento_medium_image.jpg" ], 'rendition_image_generated' => [ 'paths' => '/magento_large_image.jpg', - 'renditionPath' => ".renditions/magento_large_image.jpg" + 'renditionPath' => ".renditions/" . self::TEST_DIR . "/magento_large_image.jpg" ] ]; }
app/code/Magento/MediaGalleryRenditions/Test/Mftf/Test/AdminMediaGalleryInsertImageLargeFileSizeTest.xml+15 −4 modified@@ -23,14 +23,22 @@ <before> <createData entity="SimpleSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllImages"/> </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllImages"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFiltersOnStandaloneMediaGalleryPage"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> <actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openMediaGalleryCategoryGridPage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> @@ -41,7 +49,10 @@ <!-- Add image to category from gallery --> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFiltersAgain"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFiltersAgain"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="addCategoryImage"> <argument name="image" value="ImageUpload"/> </actionGroup>
app/code/Magento/MediaGalleryRenditions/Test/Mftf/Test/AdminMediaGalleryInsertLargeImageFileSizeTest.xml+2 −0 modified@@ -33,6 +33,7 @@ <argument name="categoryName" value="$category.name$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryForDelete"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> <argument name="imageName" value="{{ImageUpload.fileName}}"/> @@ -52,6 +53,7 @@ <!-- Add image to category from gallery --> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="addCategoryImage"> <argument name="image" value="ImageUpload"/> </actionGroup>
app/code/Magento/MediaGallerySynchronizationApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-synchronization-api", "description": "Magento module responsible for the media gallery synchronization implementation API", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaGallerySynchronization/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization", "description": "Magento module provides implementation of the media gallery data synchronization.", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/framework-message-queue": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/framework-message-queue": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGallerySynchronizationMetadata/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization-metadata", "description": "Magento module responsible for images metadata synchronization", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.0", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGalleryUiApi/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-ui-api", "description": "Magento module responsible for the media gallery UI implementation API", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*" - }, - "suggest": { - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*" + }, + "suggest": { + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGalleryUi/composer.json+17 −15 modified@@ -1,26 +1,27 @@ { "name": "magento/module-media-gallery-ui", "description": "Magento module responsible for the media gallery UI implementation", - "require": { - "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/module-store": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/module-directory": "*", - "magento/module-authorization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2-p1", + "require": { + "php": "~7.3.0||~7.4.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-directory": "100.4.*", + "magento/module-authorization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/MediaGalleryUi/Model/Directories/GetDirectoryTree.php+12 −2 modified@@ -119,8 +119,18 @@ private function findParent(array &$node, array &$treeNode, int $level = 0): arr } foreach ($treeNode['children'] as &$tnode) { - if ($node['path_array'][$level] === $tnode['path_array'][$level]) { - return $this->findParent($node, $tnode, $level + 1); + $tNodePathLength = count($tnode['path_array']); + $found = false; + while ($level < $tNodePathLength) { + if ($node['path_array'][$level] === $tnode['path_array'][$level]) { + $level ++; + $found = true; + } else { + break; + } + } + if ($found) { + return $this->findParent($node, $tnode, $level); } } return $result;
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup.xml+1 −3 modified@@ -9,14 +9,12 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup"> <annotations> - <description>Validates that the provided elemen present on page but have attribute disabled.</description> + <description>Validates that the provided element is present on the page but is disabled.</description> </annotations> <arguments> <argument name="buttonName" type="string"/> </arguments> - <grabMultiple selector="{{AdminEnhancedMediaGalleryActionsSection.notDisabledButtons}}" stepKey="verifyDisabledAttribute"/> - <assertEquals stepKey="assertSelectedCategories"> <actualResult type="variable">verifyDisabledAttribute</actualResult> <expectedResult type="array">[{{buttonName}}]</expectedResult>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminCloseEnhancedMediaGalleryActionGroup.xml+20 −0 added@@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminCloseEnhancedMediaGalleryActionGroup"> + <annotations> + <description>Clicks the Cancel button in the media gallery</description> + </annotations> + <waitForElementVisible selector="{{AdminEnhancedMediaGalleryActionsSection.cancel}}" stepKey="waitForCancelButton"/> + <click selector="{{AdminEnhancedMediaGalleryActionsSection.cancel}}" stepKey="clickCancelButton"/> + <waitForPageLoad stepKey="waitForMediaGalleryClose"/> + <waitForElementNotVisible selector="{{AdminEnhancedMediaGalleryActionsSection.cancel}}" stepKey="waitForCancelButtonGone"/> + </actionGroup> +</actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryDeleteGridViewActionGroup.xml+1 −1 modified@@ -13,7 +13,7 @@ <description>Delete grid view bookmarks by name</description> </annotations> <arguments> - <argument name="viewToDelete" type="string"/> + <argument name="viewToDelete" type="string" defaultValue="{{NewGridView.name}}"/> </arguments> <click selector="{{AdminDataGridHeaderSection.bookmarkToggle}}" stepKey="openViewBookmarks"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryImageDeleteActionGroup.xml+6 −3 modified@@ -12,11 +12,14 @@ <annotations> <description>Delete image from the Media Gallery</description> </annotations> + <arguments> + <argument name="imageName" type="string" defaultValue=""/> + </arguments> - <click selector="{{AdminEnhancedMediaGalleryImageActionsSection.openContextMenu}}" stepKey="openContextMenu"/> + <click selector="{{AdminEnhancedMediaGalleryImageActionsSection.openContextMenuByImage(imageName)}}" stepKey="openContextMenu"/> <click selector="{{AdminEnhancedMediaGalleryImageActionsSection.delete}}" stepKey="deleteImage"/> - <waitForLoadingMaskToDisappear stepKey="waitForDeleteModal"/> + <waitForPageLoad stepKey="waitForDeleteModal"/> <click selector="{{AdminEnhancedMediaGalleryDeleteModalSection.confirmDelete}}" stepKey="confirmDelete"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGallerySaveCustomViewActionGroup.xml+5 −2 modified@@ -13,12 +13,15 @@ <description>Save custom view media gallery</description> </annotations> <arguments> - <argument name="viewName" type="string" defaultValue="Test View"/> + <argument name="viewName" type="string" defaultValue="{{NewGridView.name}}"/> </arguments> - + <click selector="{{AdminDataGridHeaderSection.bookmarkToggle}}" stepKey="openViewBookmarks"/> + <waitForElementVisible selector="{{AdminGridDefaultViewControls.saveViewAs}}" stepKey="waitForSaveViewButton"/> <click selector="{{AdminGridDefaultViewControls.saveViewAs}}" stepKey="saveView"/> + <waitForElementVisible selector="{{AdminGridDefaultViewControls.viewName}}" stepKey="waitForViewNameInput"/> <fillField selector="{{AdminGridDefaultViewControls.viewName}}" userInput="{{viewName}}" stepKey="inputViewName"/> <pressKey selector="{{AdminGridDefaultViewControls.viewName}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressEnterKey"/> + <waitForElementNotVisible selector="{{AdminGridDefaultViewControls.viewName}}" stepKey="waitForViewNameInputGone"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup.xml+1 −1 modified@@ -13,7 +13,7 @@ <description>Apply custom bookmarks view to the media gallery grid</description> </annotations> <arguments> - <argument name="selectView" type="string"/> + <argument name="selectView" type="string" defaultValue="{{DefaultGridView.name}}"/> </arguments> <click selector="{{AdminDataGridHeaderSection.bookmarkToggle}}" stepKey="openViewBookmarks"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryUploadImageActionGroup.xml+3 −4 modified@@ -10,16 +10,15 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminEnhancedMediaGalleryUploadImageActionGroup"> <annotations> - <description>Uploads the provided Image to Media Gallery. - If you use this action group, you MUST add steps to delete the image in the "after" steps.</description> + <description>Uploads the provided Image to Media Gallery. If you use this action group, you MUST add steps to delete the image in the "after" steps.</description> </annotations> <arguments> <argument name="image"/> </arguments> - <waitForPageLoad stepKey="waitForPageFullyLoaded"/> + <waitForElement selector="{{AdminEnhancedMediaGalleryActionsSection.upload}}" stepKey="waitForUploadButton"/> <attachFile selector="{{AdminEnhancedMediaGalleryActionsSection.upload}}" userInput="{{image.value}}" stepKey="uploadImage"/> <waitForPageLoad stepKey="waitForPageLoad"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <comment userInput="BIC workaround" stepKey="waitForLoadingMaskToDisappear"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryAssertAttentionModalActionGroup.xml+23 −0 added@@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminMediaGalleryAssertAttentionModalActionGroup"> + <annotations> + <description>Verifies that a modal is present that tells the user that they cannot create the directory</description> + </annotations> + <arguments> + <argument name="headerText" type="string" defaultValue="Attention"/> + <argument name="action" type="string" defaultValue="create"/> + <argument name="folderName" type="string" defaultValue="{{AdminMediaGalleryFolderData.name}}"/> + </arguments> + <waitForElementVisible selector="{{AdminMediaGalleryAttentionModalSection.attentionModalHeader(headerText)}}" stepKey="waitForModalHeader"/> + <waitForElementVisible selector="{{AdminMediaGalleryAttentionModalSection.attentionModalContent(action, folderName)}}" stepKey="waitForModalContent"/> + </actionGroup> +</actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryCloseAttentionModalActionGroup.xml+22 −0 added@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminMediaGalleryCloseAttentionModalActionGroup"> + <annotations> + <description>Closes the attention modal</description> + </annotations> + <arguments> + <argument name="headerText" type="string" defaultValue="Attention"/> + </arguments> + <waitForElementVisible selector="{{AdminMediaGalleryAttentionModalSection.attentionModalOkButton}}" stepKey="waitForModalOkButton" /> + <click selector="{{AdminMediaGalleryAttentionModalSection.attentionModalOkButton}}" stepKey="clickModalOkButton"/> + <waitForElementNotVisible selector="{{AdminMediaGalleryAttentionModalSection.attentionModalHeader(headerText)}}" stepKey="waitForModalGone"/> + </actionGroup> +</actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryCreateNewFolderActionGroup.xml+1 −0 modified@@ -14,5 +14,6 @@ </arguments> <fillField selector="{{AdminMediaGalleryFolderSection.folderNameField}}" userInput="{{name}}" stepKey="setFolderName" /> <click selector="{{AdminMediaGalleryFolderSection.folderConfirmCreateButton}}" stepKey="clickCreateButton"/> + <waitForPageLoad stepKey="waitForFolderCreation"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryFolderSelectActionGroup.xml+1 −1 modified@@ -18,6 +18,6 @@ <waitForElementVisible selector="{{AdminMediaGalleryFolderSection.folderInTree(name)}}" stepKey="waitBeforeClickOnFolder"/> <click selector="{{AdminMediaGalleryFolderSection.folderInTree(name)}}" stepKey="selectFolder"/> - <waitForLoadingMaskToDisappear stepKey="waitForFolderContents"/> + <waitForPageLoad stepKey="waitForFolderContents"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryImageDeleteActionGroup.xml+2 −2 modified@@ -14,8 +14,8 @@ </annotations> <waitForElementVisible selector="{{AdminMediaGalleryHeaderButtonsSection.deleteSelected}}" stepKey="waitForDeleteSelectedButton"/> <click selector="{{AdminMediaGalleryHeaderButtonsSection.deleteSelected}}" stepKey="ClickDeleteSelectedButton"/> - <waitForLoadingMaskToDisappear stepKey="waitForDeleteModal"/> + <waitForPageLoad stepKey="waitForDeleteModal"/> <click selector="{{AdminEnhancedMediaGalleryDeleteModalSection.confirmDelete}}" stepKey="confirmDelete"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/> </actionGroup> </actionGroups>
app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminMediaGalleryFolderData.xml+3 −0 modified@@ -11,6 +11,9 @@ <entity name="AdminMediaGalleryFolderData"> <data key="name" unique="suffix">folder</data> </entity> + <entity name="AdminMediaGalleryFolder2Data"> + <data key="name" unique="suffix">folder2</data> + </entity> <entity name="AdminMediaGalleryFolderInvalidData"> <data key="name">,.?/:;'[{]}|~`!@#$%^*()_=+</data> </entity>
app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryActionsSection.xml+1 −1 modified@@ -9,7 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminEnhancedMediaGalleryActionsSection"> <element name="editViewButtonPartial" type="button" selector="/following-sibling::div/button[@class='action-edit']"/> - <element name="deleteViewButton" type="button" selector="//div[@data-bind='afterRender: \$data.setToolbarNode']//input/following-sibling::div/button[@class='action-delete']"/> + <element name="deleteViewButton" type="button" selector="//div[@data-bind='afterRender: \$data.setToolbarNode']//li[contains(@class,'_edit')]//input/following-sibling::div/button[@class='action-delete']"/> <element name="upload" type="input" selector="#image-uploader-input"/> <element name="cancel" type="button" selector="[data-ui-id='cancel-button']"/> <element name="notDisabledButtons" type="button" selector="//div[@class='page-actions floating-header']/button[not(@disabled='disabled') and not(@id='cancel')]"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml+1 −0 modified@@ -9,6 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminEnhancedMediaGalleryImageActionsSection"> <element name="openContextMenu" type="button" selector=".three-dots"/> + <element name="openContextMenuByImage" type="button" parameterized="true" selector="//img[contains(@src,'{{image}}')]/ancestor::*[contains(@class,'media-gallery-wrap')]//*[contains(@class,'three-dots')]"/> <element name="contextMenuItem" type="block" selector="//div[@class='media-gallery-image']//ul[@class='action-menu _active']//li//a[@class='action-menu-item']"/> <element name="viewDetails" type="button" selector="//ul[@class='action-menu _active']//a[text()='View Details']" timeout="30"/> <element name="delete" type="button" selector="//ul[@class='action-menu _active']//a[text()='Delete']"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminMediaGalleryAttentionModalSection.xml+16 −0 added@@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminMediaGalleryAttentionModalSection"> + <element name="attentionModalHeader" type="block" parameterized="true" selector="//h1[contains(text(), '{{headerText}}')]"/> + <element name="attentionModalContent" type="block" parameterized="true" selector="//aside[contains(@class,'_show')]//div[@data-role='content']//div[text()='Could not {{action}} directories: {{folderName}}']"/> + <element name="attentionModalOkButton" type="button" selector="//button/span[contains(text(),'OK')]"/> + </section> +</sections>
app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminMediaGalleryFolderSection.xml+1 −1 modified@@ -17,7 +17,7 @@ <element name="folderConfirmDeleteButton" type="button" selector="//footer//button/span[contains(text(), 'OK')]" timeout="30"/> <element name="folderCancelDeleteButton" type="button" selector="//footer//button/span[contains(text(), 'Cancel')]"/> <element name="folderNameField" type="button" selector="[name=folder_name]"/> - <element name="folderConfirmCreateButton" type="button" selector="//button/span[contains(text(),'Confirm')]" timeout="30"/> + <element name="folderConfirmCreateButton" type="button" selector="//aside[contains(@class,'_show')]//button/span[contains(text(),'Confirm')]" timeout="30"/> <element name="folderNameValidationMessage" type="block" selector="label.mage-error"/> <element name="folderArrow" type="button" selector="#{{id}} > .jstree-icon" parameterized="true"/> <element name="checkIfFolderArrowExpand" type="button" selector="//li[@id='{{id}}' and contains(@class,'jstree-closed')]" parameterized="true"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Suite/MediaGalleryUiSuite.xml+8 −0 modified@@ -13,6 +13,14 @@ <actionGroup ref="AdminDisableWYSIWYGActionGroup" stepKey="disableWYSIWYG" /> <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="enableEnhancedMediaGallery"/> <magentoCLI command="config:set {{MediaGalleryRenditionsDataEnabled.path}} {{MediaGalleryRenditionsDataEnabled.value}}" stepKey="enableMediaGalleryRenditions"/> + + <!-- Create Media Gallery Directories for `catalog/category` and `wysiwyg` --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromCategoryImage"/> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </before> <after> <magentoCLI command="config:set {{MediaGalleryRenditionsDataDisabled.path}} {{MediaGalleryRenditionsDataDisabled.value}}" stepKey="disableMediaGalleryRenditions"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryDeleteImagesInBulkTest.xml+17 −0 modified@@ -26,9 +26,26 @@ <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandCategoryFolder"> + <argument name="FolderName" value="category"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryDuplicatedImagesTest.xml+28 −10 modified@@ -21,17 +21,35 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageUpload.fileName}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> - <argument name="imageName" value="{{ImageUpload_1.fileName}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilter"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> + <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> + <argument name="imageName" value="{{ImageUpload_1.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> + <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> @@ -51,6 +69,6 @@ <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertSecondImageInGrid"> <argument name="title" value="ImageUpload_1.filename"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilter"/> + <comment userInput="BIC workaround" stepKey="clearGridFilter"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryUploadImageWithMetadataTest.xml+40 −18 modified@@ -18,53 +18,75 @@ <severity value="CRITICAL"/> <group value="media_gallery_ui"/> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> + + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + </after> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageDescriptionActionGroup" stepKey="verifyImageDescription"> <argument name="description" value="ImageMetadata.description"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyImageKeywords"> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyImageKeywords"> <argument name="keywords" value="ImageMetadata.keywords"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyImageTitle"> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyImageTitle"> <argument name="title" value="ImageMetadata.title"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteJpegImage"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteJpegImage"/> - <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadPngImage"> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadPngImage"> <argument name="image" value="ImageUploadPng"/> - </actionGroup> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewPngImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageDescriptionActionGroup" stepKey="verifyPngImageDescription"> <argument name="description" value="ImageMetadata.description"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyPngImageKeywords"> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyPngImageKeywords"> <argument name="keywords" value="ImageMetadata.keywords"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyPngImageTitle"> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyPngImageTitle"> <argument name="title" value="ImageMetadata.title"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deletePngImage"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deletePngImage"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadGifImage"> <argument name="image" value="ImageUploadGif"/> - </actionGroup> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewGifImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageDescriptionActionGroup" stepKey="verifyGifImageDescription"> <argument name="description" value="ImageMetadata.description"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyGifImageKeywords"> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyGifImageKeywords"> <argument name="keywords" value="ImageMetadata.keywords"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyGifImageTitle"> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageTitleActionGroup" stepKey="verifyGifImageTitle"> <argument name="title" value="ImageMetadata.title"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteGifImage"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteGifImage"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryVerifyFilterByAssetTest.xml+20 −4 modified@@ -23,16 +23,25 @@ <createData entity="SimpleSubCategory" stepKey="category"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllImages"/> </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllImages"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openMediaGalleryCategoryGridPage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters2"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> @@ -41,7 +50,14 @@ <argument name="id" value="$category.id$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadFirstIMage"> <argument name="image" value="ImageUpload3"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryVerifyNotUsedOptionFilterTest.xml+21 −11 modified@@ -24,27 +24,36 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="wysiwyg"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageMetadata.title}}"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> - <argument name="imageName" value="{{UpdatedImageDetails.title}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImage"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectFirstImageToDelete"/> + <comment userInput="BIC workaround" stepKey="selectSecondImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clikDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadFirstImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -62,6 +71,7 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwygToFilterImage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView2"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplyUsedInFilterActionGroup" stepKey="applyUsedInCategoryFilter">
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryVerifyUpdatedTagsTest.xml+19 −1 modified@@ -20,9 +20,27 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryVerifyUsedInFilterTest.xml+20 −11 modified@@ -24,28 +24,36 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="wysiwyg"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageMetadata.title}}"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> - <argument name="imageName" value="{{UpdatedImageDetails.title}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImage"/> + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectFirstImageToDelete"/> + <comment userInput="BIC workaround" stepKey="selectSecondImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clikDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadFirstIMage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -66,6 +74,7 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwygToFilterIMage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplyUsedInFilterActionGroup" stepKey="applyUsedInCategoryFilter">
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryAddCategoryImageFromTwoComponentsTest.xml+10 −1 modified@@ -24,8 +24,12 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> <argument name="imageName" value="{{ImageMetadata.title}}"/> @@ -43,6 +47,10 @@ <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadContentImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -60,6 +68,7 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters2"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> <argument name="name" value="wysiwyg"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryAddCategoryImageTest.xml+4 −3 modified@@ -29,18 +29,19 @@ <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="waitForPageLoad"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> <actionGroup ref="AdminMediaGalleryExpandFolderActionGroup" stepKey="expandCatalogFolder"> <argument name="fieldId" value="catalog"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryAddFromImageDetailsTest.xml+19 −2 modified@@ -22,15 +22,32 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> </before> <after> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewImageDetails"/> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <comment userInput="BIC workaround" stepKey="viewImageDetails"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryAddImageFromImageDetailsActionGroup" stepKey="addImageFromViewDetails"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryCreateDeleteFolderTest.xml+20 −4 modified@@ -21,7 +21,21 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> </before> + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/> + </after> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolderWithNotValidName"> @@ -38,7 +52,10 @@ <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/> <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteButton}}" stepKey="deleteFolderButtonIsNotDisabled"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFolder"/> @@ -50,8 +67,7 @@ <waitForElementVisible selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="waitBeforeModalLoads"/> <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="cancelDeleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertFolderWasNotDeleted"/> - - <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> - <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/> + <comment userInput="BIC workaround" stepKey="deleteFolder"/> + <comment userInput="BIC workaround" stepKey="assertFolderWasDeleted"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryCreateFolderAclTest.xml+1 −0 modified@@ -65,6 +65,7 @@ </actionGroup> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertCreateButtonEnabledAllOthersDisabled"> <argument name="buttonName" value="Create Folder"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDefaultViewWithoutFiltersTest.xml+3 −3 modified@@ -29,15 +29,15 @@ <!-- Open category page --> <actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openCategoryPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> <actionGroup ref="AdminEditCategoryInGridPageActionGroup" stepKey="editCategoryItem"> <argument name="categoryName" value="$category.name$"/> </actionGroup> <!-- Open media gallery folder --> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="selectDefaultView"> - <argument name="selectView" value="Default View"/> - </actionGroup> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="selectDefaultView"/> <!-- Asset folder is empty --> <actionGroup ref="AdminEnhancedMediaGalleryAssertNoActiveFiltersAppliedActionGroup" stepKey="assertEmptyFolder"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDeleteAssetsAclTest.xml+59 −9 modified@@ -19,24 +19,44 @@ <severity value="MAJOR"/> <group value="media_gallery_ui"/> </annotations> + <before> + <!-- Upload Images --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminBefore"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImageWysiwyg"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImageCategory"> + <argument name="image" value="ImageUpload"/> + </actionGroup> </before> + <after> + <!-- Delete User & Role --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin1"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminAfter"/> - <amOnPage url="{{AdminRolesPage.url}}" stepKey="navigateToUserRoleGrid" /> - <waitForPageLoad stepKey="waitForRolesGridLoad" /> + <actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/> + <comment userInput="BIC workaround" stepKey="waitForRolesGridLoad"/> <actionGroup ref="AdminDeleteRoleActionGroup" stepKey="deleteUserRole"> <argument name="role" value="adminRole"/> </actionGroup> - <amOnPage url="{{AdminUsersPage.url}}" stepKey="goToAllUsersPage"/> - <waitForPageLoad stepKey="waitForUsersGridLoad" /> + <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="goToAllUsersPage"/> + <comment userInput="BIC workaround" stepKey="waitForUsersGridLoad"/> <actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="deleteUser"> <argument name="userName" value="{{admin2.username}}"/> </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> + <!-- Create Admin User & Role --> <actionGroup ref="AdminFillUserRoleRequiredDataActionGroup" stepKey="fillUserRoleRequiredData"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Media Gallery"/> @@ -46,29 +66,59 @@ <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Delete assets"/> </actionGroup> - <actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="AddMediaGalleryPagesResource"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Pages"/> </actionGroup> <actionGroup ref="AdminUserSaveRoleActionGroup" stepKey="saveRole"/> - <actionGroup ref="AdminCreateUserActionGroup" stepKey="createAdminUser"> <argument name="role" value="adminRole"/> <argument name="User" value="admin2"/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + <!-- Login as New User --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsNewUser"> <argument name="username" value="{{admin2.username}}"/> <argument name="password" value="{{admin2.password}}"/> </actionGroup> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertCreateButtonEnabledAllOthersDisabled"> + + <!-- Verify Storage Root Directory --> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="assertCreateButtonEnabledAllOthersDisabled"/> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertDeleteButtonEnabledAllOthersDisabledStorageRoot"> + <argument name="buttonName" value="Delete Images..."/> + </actionGroup> + + <!-- Verify Can Delete Images Under Wysiwyg Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertDeleteButtonEnabledAllOthersDisabledWysiwyg"> <argument name="buttonName" value="Delete Images..."/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage1"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertImageNotExistsInTheGridActionGroup" stepKey="assertImageDeleted1"> + <argument name="title" value="ImageUpload.title"/> + </actionGroup> + + <!-- Verify Can Delete Images Under Category Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertDeleteButtonEnabledAllOthersDisabledCategory"> + <argument name="buttonName" value="Delete Images..."/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage2"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertImageNotExistsInTheGridActionGroup" stepKey="assertImageDeleted2"> + <argument name="title" value="ImageUpload.title"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="logoutFromAdmin"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDeleteFolderAclTest.xml+91 −9 modified@@ -19,24 +19,55 @@ <severity value="MAJOR"/> <group value="media_gallery_ui"/> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminBefore"/> + + <!-- Create Media Gallery Directory --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm2"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder2"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> </before> + <after> + <!-- Delete User & Role --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin1"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminAfter"/> - <amOnPage url="{{AdminRolesPage.url}}" stepKey="navigateToUserRoleGrid" /> - <waitForPageLoad stepKey="waitForRolesGridLoad" /> + <actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/> + <comment userInput="BIC workaround" stepKey="waitForRolesGridLoad"/> <actionGroup ref="AdminDeleteRoleActionGroup" stepKey="deleteUserRole"> <argument name="role" value="adminRole"/> </actionGroup> - <amOnPage url="{{AdminUsersPage.url}}" stepKey="goToAllUsersPage"/> - <waitForPageLoad stepKey="waitForUsersGridLoad" /> + <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="goToAllUsersPage"/> + <comment userInput="BIC workaround" stepKey="waitForUsersGridLoad"/> <actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="deleteUser"> <argument name="userName" value="{{admin2.username}}"/> </actionGroup> + + <!-- Delete Created Directories --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGrid"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> + <!-- Create Admin User & Role --> <actionGroup ref="AdminFillUserRoleRequiredDataActionGroup" stepKey="fillUserRoleRequiredData"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Media Gallery"/> @@ -46,29 +77,80 @@ <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Delete folder"/> </actionGroup> - <actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="AddMediaGalleryPagesResource"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Pages"/> </actionGroup> <actionGroup ref="AdminUserSaveRoleActionGroup" stepKey="saveRole"/> - <actionGroup ref="AdminCreateUserActionGroup" stepKey="createAdminUser"> <argument name="role" value="adminRole"/> <argument name="User" value="admin2"/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + <!-- Login as New User --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsNewUser"> <argument name="username" value="{{admin2.username}}"/> <argument name="password" value="{{admin2.password}}"/> </actionGroup> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertCreateButtonEnabledAllOthersDisabled"> + + <!-- Verify Cannot Delete Storage Root --> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="assertCreateButtonEnabledAllOthersDisabled"/> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertAllButtonsDisabled"> + <argument name="buttonName" value=""/> + </actionGroup> + + <!-- Verify Cannot Delete Wysiwyg Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertDeleteButtonEnabledAllOthersDisabled1"> + <argument name="buttonName" value="Delete Folder"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="attemptDeleteWysiwygFolder"/> + <actionGroup ref="AdminMediaGalleryAssertAttentionModalActionGroup" stepKey="assertAttentionModalWysiwyg"> + <argument name="action" value="delete"/> + <argument name="folderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryCloseAttentionModalActionGroup" stepKey="closeAttentionModalWysiwyg"/> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertWysiwygFolderNotDeleted"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + + <!-- Verify Cannot Delete Category Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertDeleteButtonEnabledAllOthersDisabled2"> <argument name="buttonName" value="Delete Folder"/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="attemptDeleteCategoryFolder"/> + <actionGroup ref="AdminMediaGalleryAssertAttentionModalActionGroup" stepKey="assertAttentionModalCategory"> + <argument name="action" value="delete"/> + <argument name="folderName" value="catalog/category"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryCloseAttentionModalActionGroup" stepKey="closeAttentionModalCategory"/> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertCategoryFolderNotDeleted"> + <argument name="name" value="category"/> + </actionGroup> + + <!-- Verify Can Delete Subdirectory --> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandCreatedFolder"> + <argument name="FolderName" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder2"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> + <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> + <argument name="name" value="{{AdminMediaGalleryFolder2Data.name}}"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="logoutFromAdmin"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDeleteImageContextMenuTest.xml+22 −0 modified@@ -18,10 +18,32 @@ <severity value="CRITICAL"/> <group value="media_gallery_ui"/> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> + + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + </after> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDeleteImageFileTest.xml+20 −0 modified@@ -21,8 +21,28 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + </after> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDeleteImageWithWarningPopupTest.xml+10 −4 modified@@ -20,21 +20,24 @@ </annotations> <before> <createData entity="SimpleSubCategory" stepKey="category"/> - <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> + <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadCategoryImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -45,8 +48,11 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwygToAssertMessage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterAgain"/> + <comment userInput="BIC workaround" stepKey="clearFilterAgain"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGridToDefaultViewAgain"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder2"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> <argument name="imageName" value="{{ImageMetadata.title}}"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDisabledContentFilterTest.xml+23 −15 modified@@ -24,25 +24,36 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> - <waitForPageLoad stepKey="waitForPageLoad" /> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="waitForPageLoad"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="testImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> - <argument name="name" value="testImage"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterNewFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -55,6 +66,7 @@ <actionGroup ref="AdminEnableCategoryActionGroup" stepKey="disableCategory"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> <argument name="filterLabel" value="Content Status"/> @@ -64,14 +76,10 @@ <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> <argument name="title" value="ImageMetadata.title"/> </actionGroup> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterInMediaGalleryGrid"/> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderToDelete"> - <argument name="name" value="testImage"/> - </actionGroup> - <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> - <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="testImage"/> - </actionGroup> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <comment userInput="BIC workaround" stepKey="clearFilterInMediaGalleryGrid"/> + <comment userInput="BIC workaround" stepKey="selectFolderToDelete"/> + <comment userInput="BIC workaround" stepKey="deleteFolder"/> + <comment userInput="BIC workaround" stepKey="assertFolderWasDeleted"/> + <comment userInput="BIC workaround" stepKey="waitForLoadingMaskToDisappear"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryEditImageDetailsFromGridTest.xml+14 −3 modified@@ -21,16 +21,27 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryEnabledContentFilterTest.xml+20 −2 modified@@ -24,16 +24,33 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -44,6 +61,7 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> <argument name="filterLabel" value="Content Status"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryFilterImagesBySourceTest.xml+15 −6 modified@@ -22,14 +22,23 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewContentImageDetails"/> - <actionGroup ref="AdminEnhancedMediaGalleryVerifyImageDetailsActionGroup" stepKey="verifyImageDetails"> - <argument name="image" value="ImageUpload"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteContentImage"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="viewContentImageDetails"/> + <comment userInput="BIC workaround" stepKey="verifyImageDetails"/> + <comment userInput="BIC workaround" stepKey="deleteContentImage"/> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadContentImage"> <argument name="image" value="ImageUpload3"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySaveFiltersStateTest.xml+3 −4 modified@@ -25,6 +25,7 @@ <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminEnhancedMediaGallerySelectSourceFilterActionGroup" stepKey="applyLocalFilter"> <argument name="filterValue" value="Local"/> @@ -34,12 +35,10 @@ <actionGroup ref="AdminEnhancedMediaGalleryAssertActiveFiltersActionGroup" stepKey="assertFilterApplied"> <argument name="resultValue" value="Uploaded Locally"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="selectDefaultView"> - <argument name="selectView" value="Default View"/> - </actionGroup> + <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="selectDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryAssertNoActiveFiltersAppliedActionGroup" stepKey="assertNoActiveFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryDeleteGridViewActionGroup" stepKey="deleteView"> - <argument name="viewToDelete" value="Test View"/> + <argument name="viewToDelete" value="{{NewGridView.name}}"/> </actionGroup> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryAscendingTest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByDirectoryAscending"> <argument name="sortName" value="directory_asc"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryDescendingTest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByDirectoryDescending"> <argument name="sortName" value="directory_desc"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameAToZTest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByNameAToZ"> <argument name="sortName" value="name_az"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameZToATest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByNameZToA"> <argument name="sortName" value="name_za"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNewestFirstTest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByNewestFirst"> <argument name="sortName" value="newest_first"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByOldestFirstTest.xml+12 −6 modified@@ -24,24 +24,30 @@ <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectParentFolderForDelete"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteParentFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertParentFolderWasDeleted"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryPage"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openParentFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createParentFolder"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertParentFolderCreated"> - <argument name="name" value="parentFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoadAfterParentFolderCreated"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoadAfterParentFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -51,7 +57,7 @@ <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadThirdImage"> <argument name="image" value="ImageUpload1"/> </actionGroup> - <waitForPageLoad stepKey="waitForGridToLoad"/> + <comment userInput="BIC workaround" stepKey="waitForGridToLoad"/> <actionGroup ref="AdminEnhancedMediaGalleryClickSortActionGroup" stepKey="sortByOldestFirst"> <argument name="sortName" value="oldest_first"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryStoreViewCategoryFilterTest.xml+18 −2 modified@@ -24,17 +24,32 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> </after> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> @@ -45,6 +60,7 @@ <actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> <argument name="filterLabel" value="Store View"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryStoreViewContentFilterTest.xml+25 −10 modified@@ -23,24 +23,42 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <deleteData createDataKey="createCMSPage" stepKey="deleteCmsPage"/> </after> <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> <argument name="CMSPage" value="$$createCMSPage$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openCreateFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup> <actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> <argument name="imageName" value="{{ImageMetadata.title}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> - <scrollToTopOfPage stepKey="scrollToTop"/> - <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePage"/> - <waitForPageLoad stepKey="waitForPageSave"/> + <comment userInput="BIC workaround" stepKey="scrollToTop"/> + <actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="clickSavePage"/> + <comment userInput="BIC workaround" stepKey="waitForPageSave"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> <actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> <argument name="filterLabel" value="Store View"/> @@ -50,12 +68,9 @@ <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> <argument name="title" value="ImageMetadata.title"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete"> - <argument name="imageName" value="{{ImageMetadata.title}}"/> - </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> - + <comment userInput="BIC workaround" stepKey="enableMassActionToDeleteImages"/> + <comment userInput="BIC workaround" stepKey="selectFirstImageToDelete"/> + <comment userInput="BIC workaround" stepKey="clikDeleteSelectedButton"/> + <comment userInput="BIC workaround" stepKey="deleteImages"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySwitchingBetweenViewsTest.xml+16 −8 modified@@ -25,7 +25,7 @@ <after> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryDeleteGridViewActionGroup" stepKey="deleteView"> - <argument name="viewToDelete" value="New View"/> + <argument name="viewToDelete" value="{{NewGridView.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderForDelete"/> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> @@ -34,27 +34,35 @@ </after> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> - <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"/> - <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/> - <waitForLoadingMaskToDisappear stepKey="waitForFolderContents"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="waitForFolderContents"/> <actionGroup ref="AdminEnhancedMediaGallerySaveCustomViewActionGroup" stepKey="saveCustomView"> - <argument name="viewName" value="New View"/> + <argument name="viewName" value="{{NewGridView.name}}"/> </actionGroup> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters2"/> <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="selectDefaultView"> - <argument name="selectView" value="Default View"/> + <argument name="selectView" value="{{DefaultGridView.name}}"/> </actionGroup> <actionGroup ref="AssertFolderIsChangedActionGroup" stepKey="assertFolderIsChanged"> <argument name="newSelectedFolder" value="category" /> </actionGroup> <actionGroup ref="AdminEnhancedMediaGallerySelectCustomBookmarksViewActionGroup" stepKey="switchBackToNewView"> - <argument name="selectView" value="New View"/> + <argument name="selectView" value="{{NewGridView.name}}"/> </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryAssertActiveFiltersActionGroup" stepKey="assertFilterApplied"> <argument name="resultValue" value="{{AdminMediaGalleryFolderData.name}}"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryUploadAssetsAclTest.xml+67 −9 modified@@ -19,24 +19,45 @@ <severity value="MAJOR"/> <group value="media_gallery_ui"/> </annotations> + <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminBefore"/> </before> + <after> + <!-- Delete User & Role --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin1"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminAfter"/> - <amOnPage url="{{AdminRolesPage.url}}" stepKey="navigateToUserRoleGrid" /> - <waitForPageLoad stepKey="waitForRolesGridLoad" /> + <actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/> + <comment userInput="BIC workaround" stepKey="waitForRolesGridLoad"/> <actionGroup ref="AdminDeleteRoleActionGroup" stepKey="deleteUserRole"> <argument name="role" value="adminRole"/> </actionGroup> - <amOnPage url="{{AdminUsersPage.url}}" stepKey="goToAllUsersPage"/> - <waitForPageLoad stepKey="waitForUsersGridLoad" /> + <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="goToAllUsersPage"/> + <comment userInput="BIC workaround" stepKey="waitForUsersGridLoad"/> <actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="deleteUser"> <argument name="userName" value="{{admin2.username}}"/> </actionGroup> + + <!-- Delete Uploaded Images --> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage1"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage2"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> + <!-- Create Admin User & Role --> <actionGroup ref="AdminFillUserRoleRequiredDataActionGroup" stepKey="fillUserRoleRequiredData"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Media Gallery"/> @@ -46,29 +67,66 @@ <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Upload assets"/> </actionGroup> - <actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="AddMediaGalleryPagesResource"> <argument name="User" value="adminRole"/> <argument name="restrictedRole" value="Pages"/> </actionGroup> <actionGroup ref="AdminUserSaveRoleActionGroup" stepKey="saveRole"/> - <actionGroup ref="AdminCreateUserActionGroup" stepKey="createAdminUser"> <argument name="role" value="adminRole"/> <argument name="User" value="admin2"/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + <!-- Login as New User --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsNewUser"> <argument name="username" value="{{admin2.username}}"/> <argument name="password" value="{{admin2.password}}"/> </actionGroup> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertCreateButtonEnabledAllOthersDisabled"> + + <!-- Verify Cannot Upload To Storage Root Directory --> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="assertCreateButtonEnabledAllOthersDisabled"/> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertUploadButtonEnabledAllOthersDisabledStorageRoot"> <argument name="buttonName" value="Upload Image"/> </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="attemptToUploadImage"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + <waitForText userInput="{{ImageUpload.file}}: We can't upload the file to the current folder right now. Please try another folder." stepKey="waitForErrorMessage"/> + <actionGroup ref="AdminMediaGalleryAssertImageNotExistsInTheGridActionGroup" stepKey="assertImageNotUploaded"> + <argument name="title" value="ImageUpload.title"/> + </actionGroup> + + <!-- Verify Can Upload To Wysiwyg Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertUploadButtonEnabledAllOthersDisabledWysiwyg"> + <argument name="buttonName" value="Upload Image"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="attemptToUploadImageWysiwyg"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGridWysiwyg"> + <argument name="title" value="ImageUpload.filename"/> + </actionGroup> + + <!-- Verify Can Upload To Category Directory --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryFolder"> + <argument name="name" value="category"/> + </actionGroup> + <actionGroup ref="AdminAssertMediaGalleryButtonNotDisabledOnPageActionGroup" stepKey="assertUploadButtonEnabledAllOthersDisabledCategory"> + <argument name="buttonName" value="Upload Image"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="attemptToUploadImageCategory"> + <argument name="image" value="ImageUpload"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGridCategory"> + <argument name="title" value="ImageUpload.filename"/> + </actionGroup> + <comment userInput="BIC workaround" stepKey="logoutFromAdmin"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryUploadCategoryImageTest.xml+2 −1 modified@@ -36,7 +36,8 @@ <actionGroup ref="AddCategoryImageActionGroup" stepKey="addCategoryImage"/> <actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategoryForm"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> + <comment userInput="BIC workaround" stepKey="clearFilter"/> <actionGroup ref="AdminMediaGalleryExpandFolderActionGroup" stepKey="expandCatalogFolder"> <argument name="fieldId" value="catalog"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryVerifyImageGridAttributesTest.xml+9 −0 modified@@ -21,8 +21,17 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> </before> <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> </after>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryViewDetailsDeleteImageTest.xml+22 −0 modified@@ -21,7 +21,29 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryViewDetailsEditTest.xml+21 −1 modified@@ -21,9 +21,29 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryViewDetailsTest.xml+13 −6 modified@@ -21,27 +21,34 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> </before> <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <wait time="5" stepKey="waitFilterReallyCleared"/> + <comment userInput="BIC workaround" stepKey="waitFilterReallyCleared"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="assetFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="assetFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <wait time="5" stepKey="waitFilterReallyCleared"/> + <comment userInput="BIC workaround" stepKey="waitFilterReallyCleared"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="assetFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> - <argument name="name" value="assetFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminStandaloneMediaGalleryCreateDeleteFolderTest.xml+22 −3 modified@@ -21,8 +21,24 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> </before> + <after> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> + </after> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolderWithNotValidName"> <argument name="name" value="{{AdminMediaGalleryFolderInvalidData.name}}"/> @@ -38,6 +54,10 @@ <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGalleryForPage"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/> <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteButton}}" stepKey="deleteFolderButtonIsNotDisabled"/> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFolder"/> @@ -49,8 +69,7 @@ <waitForElementVisible selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="waitBeforeModalLoads"/> <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="cancelDeleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertFolderWasNotDeleted"/> - - <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> - <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/> + <comment userInput="BIC workaround" stepKey="deleteFolder"/> + <comment userInput="BIC workaround" stepKey="assertFolderWasDeleted"/> </test> </tests>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminStandaloneMediaGalleryEditImageDetailsFromDialogTest.xml+14 −3 modified@@ -21,16 +21,27 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/> + <comment userInput="BIC workaround" stepKey="deleteAllMediaGalleryImages"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"> + <argument name="imageName" value="{{ImageUpload.fileName}}"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetMediaGalleryGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminStandaloneMediaGalleryEditImageDetailsTest.xml+1 −0 modified@@ -24,6 +24,7 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> </before> <after> <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminStandaloneMediaGalleryViewDetailsEditTest.xml+21 −1 modified@@ -21,9 +21,29 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryImageDetailsDeleteActionGroup" stepKey="deleteImage"/> + <comment userInput="BIC workaround" stepKey="deleteImage"/> + <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteCreatedFolder"/> </after> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload3"/>
app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminStandaloneMediaGalleryViewDetailsTest.xml+13 −6 modified@@ -21,27 +21,34 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView"/> </before> <after> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <wait time="5" stepKey="waitFilterReallyCleared"/> + <comment userInput="BIC workaround" stepKey="waitFilterReallyCleared"/> + <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder"> + <argument name="FolderName" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"> - <argument name="name" value="assetTestFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> - <argument name="name" value="assetTestFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> </after> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> - <wait time="5" stepKey="waitFilterReallyCleared"/> + <comment userInput="BIC workaround" stepKey="waitFilterReallyCleared"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="assetTestFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"> - <argument name="name" value="assetTestFolder"/> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> </actionGroup> <waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
app/code/Magento/MediaStorage/composer.json+16 −14 modified@@ -1,26 +1,27 @@ { "name": "magento/module-media-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2-p1", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-theme": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-theme": "101.1.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/MediaStorage/Model/File/Storage.php+4 −3 modified@@ -299,9 +299,10 @@ public function getScriptConfig() $config['media_directory'] = $this->localMediaDirectory->getAbsolutePath(); $allowedResources = $this->_coreConfig->getValue(self::XML_PATH_MEDIA_RESOURCE_WHITELIST, 'default'); - foreach ($allowedResources as $allowedResource) { - $config['allowed_resources'][] = $allowedResource; - } + array_walk_recursive($allowedResources, function($value, $key) use (&$resources) { + $resources[] = $value; + }, $resources); + $config['allowed_resources'] = $resources; $config['update_time'] = $this->_scopeConfig->getValue( self::XML_PATH_MEDIA_UPDATE_TIME,
app/code/Magento/MessageQueue/composer.json+9 −7 modified@@ -1,20 +1,21 @@ { "name": "magento/module-message-queue", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "magento/magento-composer-installer": "*", "php": "~7.3.0||~7.4.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Msrp/composer.json+15 −13 modified@@ -1,27 +1,28 @@ { "name": "magento/module-msrp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.3.0||~7.4.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*" }, "suggest": { - "magento/module-bundle": "*", - "magento/module-msrp-sample-data": "*" + "magento/module-bundle": "101.0.*", + "magento/module-msrp-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
5548bc64b5bcMagento Release 2.4.4-p1
249 files changed · +4483 −2846
app/code/Magento/AdminAnalytics/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-admin-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-release-notification": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-release-notification": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/AdminNotification/composer.json+13 −11 modified@@ -1,24 +1,25 @@ { "name": "magento/module-admin-notification", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/AdvancedPricingImportExport/composer.json+16 −14 modified@@ -1,26 +1,27 @@ { "name": "magento/module-advanced-pricing-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/AdvancedSearch/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-advanced-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-search": "*", - "magento/module-store": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Amqp/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-amqp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-amqp": "100.4.*", + "magento/framework-message-queue": "100.4.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/AmqpStore/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-amqp-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/module-store": "*", + "magento/framework": "103.0.*", + "magento/framework-amqp": "100.4.*", + "magento/module-store": "101.1.*", "php": "~7.4.0||~8.1.0" }, "suggest": { - "magento/module-asynchronous-operations": "*", - "magento/framework-message-queue": "*" + "magento/module-asynchronous-operations": "100.4.*", + "magento/framework-message-queue": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Analytics/composer.json+10 −8 modified@@ -1,19 +1,20 @@ { "name": "magento/module-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AsynchronousOperations/composer.json+14 −12 modified@@ -1,27 +1,28 @@ { "name": "magento/module-asynchronous-operations", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", - "magento/framework-bulk": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/framework-bulk": "101.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", "php": "~7.4.0||~8.1.0" }, "suggest": { - "magento/module-admin-notification": "*", + "magento/module-admin-notification": "100.4.*", "magento/module-logging": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Authorization/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-authorization", "description": "Authorization module provides access to Magento ACL functionality.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/AwsS3/composer.json+8 −6 modified@@ -1,20 +1,21 @@ { "name": "magento/module-aws-s3", "description": "N/A", + "type": "magento2-module", + "license": [ + "proprietary" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-remote-storage": "*", + "magento/framework": "103.0.*", + "magento/module-remote-storage": "100.4.*", "league/flysystem": "^2.0", "league/flysystem-aws-s3-v3": "^2.0" }, - "type": "magento2-module", - "license": [ - "proprietary" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Backend/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-backend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backup": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-developer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-sales": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-backup": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-developer": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-translation": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php", @@ -43,3 +44,4 @@ } } } +
app/code/Magento/Backup/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-backup", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Bundle/composer.json+27 −25 modified@@ -1,39 +1,40 @@ { "name": "magento/module-bundle", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-directory": "100.4.*" }, "suggest": { - "magento/module-webapi": "*", - "magento/module-bundle-sample-data": "*", - "magento/module-sales-rule": "*" + "magento/module-webapi": "100.4.*", + "magento/module-bundle-sample-data": "Sample Data version: 100.4.*", + "magento/module-sales-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -43,3 +44,4 @@ } } } +
app/code/Magento/BundleGraphQl/composer.json+15 −13 modified@@ -2,23 +2,24 @@ "name": "magento/module-bundle-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-graph-ql": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-store": "*", - "magento/module-sales": "*", - "magento/module-sales-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-catalog": "104.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/BundleImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-bundle-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-bundle": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/CacheInvalidate/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-cache-invalidate", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-page-cache": "*" + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Captcha/composer.json+14 −12 modified@@ -1,27 +1,28 @@ { "name": "magento/module-captcha", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-authorization": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-authorization": "100.4.*", "laminas/laminas-captcha": "^2.11.0", "laminas/laminas-db": "^2.13.4", "laminas/laminas-session": "^2.12.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/CardinalCommerce/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cardinal-commerce", "description": "Provides a possibility to enable 3-D Secure 2.0 support for payment methods.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CatalogAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-catalog-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/CatalogCmsGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-catalog-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Catalog/composer.json+36 −34 modified@@ -1,48 +1,49 @@ { "name": "magento/module-catalog", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-checkout": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-indexer": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-product-alert": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-indexer": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-product-alert": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-catalog-sample-data": "*" + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-catalog-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -52,3 +53,4 @@ } } } +
app/code/Magento/CatalogCustomerGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-catalog-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-catalog-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/CatalogGraphQl/composer.json+19 −17 modified@@ -2,28 +2,29 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-eav": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-catalog-search": "*", - "magento/framework": "*", - "magento/module-graph-ql": "*", - "magento/module-advanced-search": "*" + "magento/module-eav": "102.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-eav-graph-ql": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/framework": "103.0.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-advanced-search": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogImportExport/composer.json+18 −16 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.4", "require": { "php": "~7.4.0||~8.1.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogInventory/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ }, "abandoned": "magento/inventory-composer-metapackage" } +
app/code/Magento/CatalogInventoryGraphQl/composer.json+10 −8 modified@@ -2,18 +2,19 @@ "name": "magento/module-catalog-inventory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/CatalogRule/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-import-export": "*", - "magento/module-catalog-rule-sample-data": "*" + "magento/module-import-export": "101.0.*", + "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogRuleConfigurable/composer.json+12 −10 modified@@ -1,25 +1,26 @@ { "name": "magento/module-catalog-rule-configurable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-configurable-product": "*" + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-configurable-product": "100.4.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/CatalogRuleGraphQl/composer.json+8 −6 modified@@ -2,17 +2,18 @@ "name": "magento/module-catalog-rule-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/CatalogSearch/composer.json+20 −18 modified@@ -1,32 +1,33 @@ { "name": "magento/module-catalog-search", "description": "Catalog search", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-indexer": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-indexer": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } +
app/code/Magento/CatalogUrlRewrite/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-catalog-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/CatalogUrlRewriteGraphQl/composer.json+14 −12 modified@@ -2,23 +2,24 @@ "name": "magento/module-catalog-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*" + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/CatalogWidget/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-catalog-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/CheckoutAgreements/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-checkout-agreements", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/CheckoutAgreementsGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-checkout-agreements-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-checkout-agreements": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-checkout-agreements": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Checkout/composer.json+29 −27 modified@@ -1,41 +1,42 @@ { "name": "magento/module-checkout", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-security": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-security": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-authorization": "100.4.*" }, "suggest": { - "magento/module-cookie": "*" + "magento/module-cookie": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } +
app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php+14 −2 modified@@ -3,19 +3,25 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Checkout\Controller\Sidebar; use Magento\Checkout\Model\Cart\RequestQuantityProcessor; use Magento\Checkout\Model\Sidebar; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; +use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\App\Response\Http; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Json\Helper\Data; use Psr\Log\LoggerInterface; -class UpdateItemQty extends Action +/** + * Class used to update item quantity. + */ +class UpdateItemQty extends Action implements HttpPostActionInterface { /** * @var Sidebar @@ -61,12 +67,18 @@ public function __construct( } /** + * Action for Quantity update + * * @return $this */ public function execute() { $itemId = (int)$this->getRequest()->getParam('item_id'); - $itemQty = $this->getRequest()->getParam('item_qty') * 1; + $itemQty = (int)$this->getRequest()->getParam('item_qty'); + + if ($itemQty <= 0) { + return $this->jsonResponse(__('Invalid Item Quantity Requested.')); + } $itemQty = $this->quantityProcessor->prepareQuantity($itemQty); try {
app/code/Magento/Checkout/i18n/en_US.csv+1 −0 modified@@ -186,3 +186,4 @@ Payment,Payment "Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" "You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>." "The shipping method is missing. Select the shipping method and try again.","The shipping method is missing. Select the shipping method and try again." +"Invalid Item Quantity Requested.","Invalid Item Quantity Requested."
app/code/Magento/Checkout/Model/DefaultConfigProvider.php+11 −1 modified@@ -31,6 +31,7 @@ use Magento\Quote\Model\QuoteIdMaskFactory; use Magento\Store\Model\ScopeInterface; use Magento\Ui\Component\Form\Element\Multiline; +use Magento\Framework\Escaper; /** * Default Config Provider for checkout @@ -191,6 +192,11 @@ class DefaultConfigProvider implements ConfigProviderInterface */ private $configPostProcessor; + /** + * @var Escaper + */ + private $escaper; + /** * @param CheckoutHelper $checkoutHelper * @param Session $checkoutSession @@ -222,6 +228,7 @@ class DefaultConfigProvider implements ConfigProviderInterface * @param AddressMetadataInterface $addressMetadata * @param AttributeOptionManagementInterface $attributeOptionManager * @param CustomerAddressDataProvider|null $customerAddressData + * @param Escaper|null $escaper * @codeCoverageIgnore * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -255,7 +262,8 @@ public function __construct( CaptchaConfigPostProcessorInterface $configPostProcessor, AddressMetadataInterface $addressMetadata = null, AttributeOptionManagementInterface $attributeOptionManager = null, - CustomerAddressDataProvider $customerAddressData = null + CustomerAddressDataProvider $customerAddressData = null, + Escaper $escaper = null ) { $this->checkoutHelper = $checkoutHelper; $this->checkoutSession = $checkoutSession; @@ -289,6 +297,7 @@ public function __construct( $this->customerAddressData = $customerAddressData ?: ObjectManager::getInstance()->get(CustomerAddressDataProvider::class); $this->configPostProcessor = $configPostProcessor; + $this->escaper = $escaper ?? ObjectManager::getInstance()->get(Escaper::class); } /** @@ -343,6 +352,7 @@ public function getConfig() 'shipping/shipping_policy/shipping_policy_content', ScopeInterface::SCOPE_STORE ); + $policyContent = $this->escaper->escapeHtml($policyContent); $output['shippingPolicy'] = [ 'isEnabled' => $this->scopeConfig->isSetFlag( 'shipping/shipping_policy/enable_shipping_policy',
app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/UpdateItemQtyTest.php+35 −0 modified@@ -19,6 +19,9 @@ use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +/** + * Class used to execute test cases for update item quantity + */ class UpdateItemQtyTest extends TestCase { /** @@ -244,4 +247,36 @@ public function testExecuteWithException(): void $this->assertEquals('json represented', $this->updateItemQty->execute()); } + + /** + * @return void + */ + public function testExecuteWithInvalidItemQty(): void + { + $error = [ + 'success' => false, + 'error_message' => 'Invalid Item Quantity Requested.' + ]; + $jsonResult = json_encode($error); + $this->requestMock + ->method('getParam') + ->withConsecutive(['item_id', null], ['item_qty', null]) + ->willReturnOnConsecutiveCalls('1', '{{7+2}}'); + + $this->sidebarMock->expects($this->once()) + ->method('getResponseData') + ->with('Invalid Item Quantity Requested.') + ->willReturn($error); + + $this->jsonHelperMock->expects($this->once()) + ->method('jsonEncode') + ->with($error) + ->willReturn($jsonResult); + + $this->responseMock->expects($this->once()) + ->method('representJson') + ->willReturn($jsonResult); + + $this->assertEquals($jsonResult, $this->updateItemQty->execute()); + } }
app/code/Magento/Cms/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-cms", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-variable": "*", - "magento/module-widget": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "magento/module-widget": "101.2.*" }, "suggest": { - "magento/module-cms-sample-data": "*" + "magento/module-cms-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/CmsGraphQl/composer.json+13 −11 modified@@ -2,22 +2,23 @@ "name": "magento/module-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-widget": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-widget": "101.2.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CmsUrlRewrite/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-cms-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/CmsUrlRewriteGraphQl/composer.json+13 −11 modified@@ -2,22 +2,23 @@ "name": "magento/module-cms-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-cms-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CompareListGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-compare-list-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Config/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-config", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/ConfigurableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-configurable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/ConfigurableProduct/composer.json+26 −24 modified@@ -1,38 +1,39 @@ { "name": "magento/module-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-msrp": "*", - "magento/module-webapi": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-product-video": "*", - "magento/module-configurable-sample-data": "*", - "magento/module-product-links-sample-data": "*", - "magento/module-tax": "*" + "magento/module-msrp": "100.4.*", + "magento/module-webapi": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-product-video": "100.4.*", + "magento/module-configurable-sample-data": "Sample Data version: 100.4.*", + "magento/module-product-links-sample-data": "Sample Data version: 100.4.*", + "magento/module-tax": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } +
app/code/Magento/ConfigurableProductGraphQl/composer.json+13 −11 modified@@ -2,21 +2,22 @@ "name": "magento/module-configurable-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-configurable-product": "*", - "magento/module-graph-ql": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-catalog": "104.0.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/ConfigurableProductSales/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-configurable-product-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-configurable-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-configurable-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Contact/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-contact", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cookie/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cookie", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-backend": "*" + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Cron/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-cron", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Csp/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-csp", "description": "CSP module enables Content Security Policies for Magento", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/CurrencySymbol/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-currency-symbol", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-page-cache": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/CustomerAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-customer-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-customer": "103.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Customer/composer.json+29 −27 modified@@ -1,41 +1,42 @@ { "name": "magento/module-customer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-integration": "*", - "magento/module-media-storage": "*", - "magento/module-newsletter": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-integration": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-customer-sample-data": "*", - "magento/module-webapi": "*" + "magento/module-cookie": "100.4.*", + "magento/module-customer-sample-data": "Sample Data version: 100.4.*", + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } +
app/code/Magento/Customer/Controller/Account/Confirmation.php+36 −26 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Customer\Controller\Account; use Magento\Customer\Api\AccountManagementInterface; @@ -13,22 +15,26 @@ use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\App\Action\Context; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Controller\Result\Redirect; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; use Magento\Store\Model\StoreManagerInterface; /** - * Class Confirmation. Send confirmation link to specified email + * Send confirmation link to specified email */ class Confirmation extends AbstractAccount implements HttpGetActionInterface, HttpPostActionInterface { /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $storeManager; /** - * @var \Magento\Customer\Api\AccountManagementInterface + * @var AccountManagementInterface */ protected $customerAccountManagement; @@ -53,7 +59,7 @@ class Confirmation extends AbstractAccount implements HttpGetActionInterface, Ht * @param PageFactory $resultPageFactory * @param StoreManagerInterface $storeManager * @param AccountManagementInterface $customerAccountManagement - * @param Url $customerUrl + * @param Url|null $customerUrl */ public function __construct( Context $context, @@ -74,48 +80,52 @@ public function __construct( /** * Send confirmation link to specified email * - * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page + * @return Redirect|Page + * @throws LocalizedException */ public function execute() { if ($this->session->isLoggedIn()) { - /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultRedirectFactory->create(); - $resultRedirect->setPath('*/*/'); - return $resultRedirect; + return $this->getRedirect('*/*/'); } - // try to confirm by email $email = $this->getRequest()->getPost('email'); - if ($email) { - /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultRedirectFactory->create(); + if ($email) { try { $this->customerAccountManagement->resendConfirmation( $email, $this->storeManager->getStore()->getWebsiteId() ); $this->messageManager->addSuccessMessage(__('Please check your email for confirmation key.')); + return $this->getRedirect('*/*/index', ['_secure' => true]); } catch (InvalidTransitionException $e) { $this->messageManager->addSuccessMessage(__('This email does not require confirmation.')); - } catch (\Exception $e) { - $this->messageManager->addExceptionMessage($e, __('Wrong email.')); - $resultRedirect->setPath('*/*/*', ['email' => $email, '_secure' => true]); - return $resultRedirect; + return $this->getRedirect('*/*/index', ['_secure' => true]); + } catch (NoSuchEntityException $e) { + $this->messageManager->addErrorMessage(__('Wrong email.')); } - $this->session->setUsername($email); - $resultRedirect->setPath('*/*/index', ['_secure' => true]); - return $resultRedirect; } - /** @var \Magento\Framework\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); - $resultPage->getLayout()->getBlock('accountConfirmation')->setEmail( - $this->getRequest()->getParam('email', $email) - )->setLoginUrl( - $this->customerUrl->getLoginUrl() - ); + $resultPage->getLayout()->getBlock('accountConfirmation') + ->setEmail($email) + ->setLoginUrl($this->customerUrl->getLoginUrl()); return $resultPage; } + + /** + * Returns redirect object + * + * @param string $path + * @param array $params + * @return Redirect + */ + private function getRedirect(string $path, array $params = []): Redirect + { + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath($path, $params); + + return $resultRedirect; + } }
app/code/Magento/CustomerDownloadableGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-customer-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-downloadable-graph-ql": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" + "magento/module-downloadable-graph-ql": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/CustomerGraphQl/composer.json+16 −14 modified@@ -2,24 +2,25 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-authorization": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-graph-ql": "*", - "magento/module-newsletter": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*", - "magento/module-directory": "*", - "magento/module-tax": "*", - "magento/module-graph-ql-cache": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-authorization": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-tax": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/CustomerImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-customer-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php+16 −3 modified@@ -11,6 +11,8 @@ use Magento\Framework\Webapi\Rest\Request as RestRequest; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\App\ObjectManager; /** * Update customer by id from request param @@ -22,12 +24,19 @@ class UpdateCustomer */ private $request; + /** + * @var UserContextInterface + */ + private $userContext; + /** * @param RestRequest $request + * @param UserContextInterface|null $userContext */ - public function __construct(RestRequest $request) + public function __construct(RestRequest $request, ?UserContextInterface $userContext = null) { $this->request = $request; + $this->userContext = $userContext ?? ObjectManager::getInstance()->get(UserContextInterface::class); } /** @@ -43,10 +52,14 @@ public function beforeSave( CustomerInterface $customer, ?string $passwordHash = null ): array { - $customerId = $this->request->getParam('customerId'); + $customerSessionId = $this->userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER ? + (int)$this->userContext->getUserId() : 0; + $customerId = (int)$this->request->getParam('customerId'); $bodyParams = $this->request->getBodyParams(); if (!isset($bodyParams['customer']['Id']) && $customerId) { - $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); + if ($customerId === $customerSessionId || $customerSessionId === 0) { + $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); + } } return [$customer, $passwordHash];
app/code/Magento/Deploy/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-deploy", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Developer/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-developer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Dhl/composer.json+18 −16 modified@@ -1,31 +1,32 @@ { "name": "magento/module-dhl", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-checkout": "*" + "magento/module-checkout": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/Directory/composer.json+11 −9 modified@@ -1,22 +1,23 @@ { "name": "magento/module-directory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/DirectoryGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-directory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-directory": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Downloadable/composer.json+25 −23 modified@@ -1,37 +1,38 @@ { "name": "magento/module-downloadable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-downloadable-sample-data": "*" + "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/DownloadableGraphQl/composer.json+15 −13 modified@@ -2,24 +2,25 @@ "name": "magento/module-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-quote-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*", - "magento/module-sales-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-sales-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/DownloadableImportExport/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-downloadable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Eav/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-eav", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.1.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/EavGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-eav-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-eav": "*" + "magento/framework": "103.0.*", + "magento/module-eav": "102.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Elasticsearch6/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-6", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-search": "101.1.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.16.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch7/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-7", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.16.0", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*" + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*" }, "suggest": { - "magento/module-config": "*", - "magento/module-search": "*" + "magento/module-config": "101.2.*", + "magento/module-search": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Elasticsearch/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-elasticsearch", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "101.0.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-advanced-search": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*", "elasticsearch/elasticsearch": "~7.16.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Elasticsearch/SearchAdapter/Query/Builder/Sort.php+2 −1 modified@@ -89,7 +89,8 @@ public function getSort(RequestInterface $request) if (in_array($item['field'], $this->skippedFields)) { continue; } - $attribute = $this->attributeAdapterProvider->getByAttributeCode($item['field']); + $itemField = $item['field'] != null ? $item['field'] : ''; + $attribute = $this->attributeAdapterProvider->getByAttributeCode($itemField); $fieldName = $this->fieldNameResolver->getFieldName($attribute); if (isset($this->map[$fieldName])) { $fieldName = $this->map[$fieldName];
app/code/Magento/Email/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-email", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-require-js": "*", - "magento/module-media-storage": "*", - "magento/module-variable": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-variable": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/EncryptionKey/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-encryption-key", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Fedex/composer.json+16 −14 modified@@ -1,27 +1,28 @@ { "name": "magento/module-fedex", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/GiftMessage/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-gift-message", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-eav": "*", - "magento/module-multishipping": "*" + "magento/module-eav": "102.1.*", + "magento/module-multishipping": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/GiftMessageGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-gift-message-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-gift-message": "*" + "magento/framework": "103.0.*", + "magento/module-gift-message": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/GoogleAdwords/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-google-adwords", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/GoogleAnalytics/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GoogleOptimizer/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-google-optimizer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-google-analytics": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-google-analytics": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/GraphQlCache/composer.json+10 −8 modified@@ -2,18 +2,19 @@ "name": "magento/module-graph-ql-cache", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-page-cache": "*", - "magento/module-graph-ql": "*", - "magento/module-authorization": "*", - "magento/module-integration": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-integration": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/GraphQl/composer.json+12 −10 modified@@ -2,22 +2,23 @@ "name": "magento/module-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-eav": "*", - "magento/framework": "*", - "magento/module-webapi": "*", - "magento/module-new-relic-reporting": "*", - "magento/module-authorization": "*", + "magento/module-eav": "102.1.*", + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*", + "magento/module-new-relic-reporting": "100.4.*", + "magento/module-authorization": "100.4.*", "webonyx/graphql-php": "~14.11.3" }, "suggest": { - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql-cache": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/GroupedCatalogInventory/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-grouped-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-grouped-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-grouped-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/GroupedImportExport/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-grouped-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-grouped-product": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/GroupedProduct/composer.json+22 −20 modified@@ -1,34 +1,35 @@ { "name": "magento/module-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-grouped-product-sample-data": "*" + "magento/module-grouped-product-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -38,3 +39,4 @@ } } } +
app/code/Magento/GroupedProductGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-grouped-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-grouped-product": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-grouped-product": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/ImportExport/composer.json+14 −12 modified@@ -1,25 +1,26 @@ { "name": "magento/module-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.4", "require": { "php": "~7.4.0||~8.1.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Indexer/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-indexer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/InstantPurchase/composer.json+10 −8 modified@@ -6,16 +6,17 @@ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-quote": "*", - "magento/module-vault": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-vault": "101.2.*", + "magento/framework": "103.0.*" }, "autoload": { "files": [ @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Integration/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-integration", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-user": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/JwtFrameworkAdapter/composer.json+8 −6 modified@@ -1,19 +1,20 @@ { "name": "magento/module-jwt-framework-adapter", "description": "JWT Manager implementation based on jwt-framework", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "web-token/jwt-framework": "^v2.2.7" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/JwtUserToken/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-jwt-user-token", "description": "Introduces JWT token support for web API authentication", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-integration": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-integration": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/LayeredNavigation/composer.json+10 −8 modified@@ -1,20 +1,21 @@ { "name": "magento/module-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/LoginAsCustomerAdminUi/composer.json+15 −14 modified@@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-admin-ui", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-frontend-ui": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-frontend-ui": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +28,4 @@ } } } +
app/code/Magento/LoginAsCustomerApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-login-as-customer-api", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/LoginAsCustomerAssistance/composer.json+15 −14 modified@@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-assistance", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-login-as-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-login-as-customer-admin-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer": "100.4.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-login-as-customer-admin-ui": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +28,4 @@ } } } +
app/code/Magento/LoginAsCustomer/composer.json+12 −10 modified@@ -1,21 +1,22 @@ { "name": "magento/module-login-as-customer", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-backend": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/LoginAsCustomerFrontendUi/composer.json+9 −8 modified@@ -1,18 +1,18 @@ { "name": "magento/module-login-as-customer-frontend-ui", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-customer": "*", - "magento/module-store": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +22,4 @@ } } } +
app/code/Magento/LoginAsCustomerGraphQl/composer.json+14 −12 modified@@ -1,23 +1,24 @@ { "name": "magento/module-login-as-customer-graph-ql", "description": "Flexible login as a customer so a merchant or merchant admin can log into an end customer's account to assist them with their account.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-assistance": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/module-customer": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-assistance": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-customer": "103.0.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/LoginAsCustomerLog/composer.json+14 −13 modified@@ -1,23 +1,23 @@ { "name": "magento/module-login-as-customer-log", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-ui": "*", - "magento/module-user": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +27,4 @@ } } } +
app/code/Magento/LoginAsCustomerPageCache/composer.json+11 −10 modified@@ -1,20 +1,20 @@ { "name": "magento/module-login-as-customer-page-cache", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-page-cache": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-page-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +24,4 @@ } } } +
app/code/Magento/LoginAsCustomerQuote/composer.json+12 −11 modified@@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-quote", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*" - }, - "suggest": { - "magento/module-login-as-customer-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } +
app/code/Magento/LoginAsCustomerSales/composer.json+12 −11 modified@@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-sales", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-user": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-sales": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-user": "101.2.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-sales": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } +
app/code/Magento/Marketplace/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-marketplace", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/MediaContentApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-content-api", "description": "Magento module provides the API interfaces for managing relations between content and media files used in that content", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-gallery-api": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaContentCatalog/composer.json+10 −8 modified@@ -1,19 +1,20 @@ { "name": "magento/module-media-content-catalog", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Catalog module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-content-api": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/MediaContentCms/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-content-cms", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Cms module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaContent/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-content", "description": "Magento module provides the implementation for managing relations between content and media files used in that content", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-api": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-content-synchronization-api", "description": "Magento module responsible for the media content synchronization implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationCatalog/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-catalog", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Catalog module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaContentSynchronizationCms/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-cms", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Cms module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaContentSynchronization/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-content-synchronization", "description": "Magento module provides implementation of the media content data synchronization.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-asynchronous-operations": "*" - }, - "suggest": { - "magento/module-media-gallery-synchronization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" + }, + "suggest": { + "magento/module-media-gallery-synchronization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGalleryApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-api", "description": "Magento module responsible for media gallery asset attributes storage and management", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "101.0.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryCatalog/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-catalog", "description": "Magento module responsible for catalog gallery processor delete operation handling", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGalleryCatalogIntegration/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-catalog-integration", "description": "Magento module responsible for extending catalog image uploader functionality", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-gallery-ui-api": "*" - }, - "suggest": { - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-gallery-ui-api": "100.4.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGalleryCatalogUi/composer.json+11 −9 modified@@ -1,20 +1,21 @@ { "name": "magento/module-media-gallery-catalog-ui", "description": "Magento module that implement category grid for media gallery.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/MediaGalleryCmsUi/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-cms-ui", "description": "Cms related UI elements in the magento media gallery", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGallery/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery", "description": "Magento module responsible for media handling", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/MediaGalleryIntegration/composer.json+17 −15 modified@@ -1,32 +1,34 @@ { "name": "magento/module-media-gallery-integration", "description": "Magento module responsible for integration of enhanced media gallery", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-ui": "*" - }, - "require-dev": { - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-catalog": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-ui": "101.2.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" ], "psr-4": { "Magento\\MediaGalleryIntegration\\": "" } + }, + "require-dev": { + "magento/module-cms": "*" } } +
app/code/Magento/MediaGalleryMetadataApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-metadata-api", "description": "Magento module responsible for media gallery metadata implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryMetadata/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-metadata", "description": "Magento module responsible for images metadata processing", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-metadata-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaGalleryRenditionsApi/composer.json+6 −4 modified@@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-renditions-api", "description": "Magento module that is responsible for the API implementation of Media Gallery Renditions.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } +
app/code/Magento/MediaGalleryRenditions/composer.json+13 −11 modified@@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-renditions", "description": "Magento module that implements height and width fields for for media gallery items.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-renditions-api": "*", - "magento/module-media-gallery-api": "*", - "magento/framework-message-queue": "*", - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-renditions-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/module-cms": "104.0.*" + }, + "suggest": { + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/MediaGallerySynchronizationApi/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-synchronization-api", "description": "Magento module responsible for the media gallery synchronization implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/MediaGallerySynchronization/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization", "description": "Magento module provides implementation of the media gallery data synchronization.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/framework-message-queue": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/framework-message-queue": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGallerySynchronizationMetadata/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization-metadata", "description": "Magento module responsible for images metadata synchronization", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGalleryUiApi/composer.json+9 −7 modified@@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-ui-api", "description": "Magento module responsible for the media gallery UI implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, - "suggest": { - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, + "suggest": { + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/MediaGalleryUi/composer.json+17 −15 modified@@ -1,26 +1,27 @@ { "name": "magento/module-media-gallery-ui", "description": "Magento module responsible for the media gallery UI implementation", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/module-store": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/module-directory": "*", - "magento/module-authorization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-directory": "100.4.*", + "magento/module-authorization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/MediaStorage/composer.json+16 −14 modified@@ -1,26 +1,27 @@ { "name": "magento/module-media-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-theme": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-theme": "101.1.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/MessageQueue/composer.json+9 −7 modified@@ -1,20 +1,21 @@ { "name": "magento/module-message-queue", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "magento/magento-composer-installer": "*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/Msrp/composer.json+15 −13 modified@@ -1,27 +1,28 @@ { "name": "magento/module-msrp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*" }, "suggest": { - "magento/module-bundle": "*", - "magento/module-msrp-sample-data": "*" + "magento/module-bundle": "101.0.*", + "magento/module-msrp-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/MsrpConfigurableProduct/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-msrp-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-configurable-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-msrp": "100.4.*", + "magento/module-configurable-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/MsrpGroupedProduct/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-msrp-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-grouped-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-msrp": "100.4.*", + "magento/module-grouped-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Multishipping/composer.json+18 −16 modified@@ -1,28 +1,29 @@ { "name": "magento/module-multishipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-captcha": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-captcha": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/MysqlMq/composer.json+10 −8 modified@@ -1,21 +1,22 @@ { "name": "magento/module-mysql-mq", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "magento/magento-composer-installer": "*", - "magento/module-store": "*", + "magento/module-store": "101.1.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/NewRelicReporting/composer.json+14 −12 modified@@ -1,25 +1,26 @@ { "name": "magento/module-new-relic-reporting", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Newsletter/composer.json+17 −15 modified@@ -1,27 +1,28 @@ { "name": "magento/module-newsletter", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-email": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-email": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-widget": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/NewsletterGraphQl/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-newsletter-graph-ql", "description": "Provides GraphQl functionality for the newsletter subscriptions.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, - "type": "magento2-module", + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-newsletter": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-customer": "103.0.*", + "magento/module-newsletter": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/OfflinePayments/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-offline-payments", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-quote": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/OfflineShipping/composer.json+19 −17 modified@@ -1,31 +1,32 @@ { "name": "magento/module-offline-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-checkout": "*", - "magento/module-offline-shipping-sample-data": "*" + "magento/module-checkout": "100.4.*", + "magento/module-offline-shipping-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/PageCache/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-page-cache", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Payment/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-payment", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/PaymentGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-payment-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-payment": "*", - "magento/module-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-graph-ql": "100.4.*" }, "suggest": { - "magento/module-store-graph-ql": "*" + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/PaypalCaptcha/composer.json+12 −10 modified@@ -1,24 +1,25 @@ { "name": "magento/module-paypal-captcha", "description": "Provides CAPTCHA validation for PayPal Payflow Pro", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-paypal": "*" + "magento/module-paypal": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/Paypal/composer.json+26 −24 modified@@ -1,39 +1,40 @@ { "name": "magento/module-paypal", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-instant-purchase": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-vault": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-instant-purchase": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-vault": "101.2.*" }, "suggest": { - "magento/module-checkout-agreements": "*" + "magento/module-checkout-agreements": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -43,3 +44,4 @@ } } } +
app/code/Magento/PaypalGraphQl/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-paypal-graph-ql", "description": "GraphQl support for Paypal", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-paypal": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-payment": "*", - "magento/module-store": "*", - "magento/module-vault": "*" + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-paypal": "101.0.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-vault": "101.2.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Persistent/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-persistent", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-cron": "*", - "magento/module-customer": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-cron": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/ProductAlert/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-product-alert", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/ProductVideo/composer.json+15 −13 modified@@ -1,28 +1,29 @@ { "name": "magento/module-product-video", "description": "Add Video to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-customer": "*", - "magento/module-config": "*" + "magento/module-customer": "103.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/QuoteAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-quote-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/QuoteBundleOptions/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-quote-bundle-options", "description": "Magento module provides data provider for creating buy request for bundle products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/Quote/composer.json+23 −21 modified@@ -1,35 +1,36 @@ { "name": "magento/module-quote", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } +
app/code/Magento/QuoteConfigurableOptions/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-quote-configurable-options", "description": "Magento module provides data provider for creating buy request for configurable products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/QuoteDownloadableLinks/composer.json+7 −5 modified@@ -1,16 +1,17 @@ { "name": "magento/module-quote-downloadable-links", "description": "Magento module provides data provider for creating buy request for links of downloadable products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } +
app/code/Magento/Quote/etc/webapi_rest/di.xml+3 −0 modified@@ -19,4 +19,7 @@ <type name="Magento\Quote\Model\Quote"> <plugin name="updateQuoteStoreId" type="Magento\Quote\Model\Quote\Plugin\UpdateQuoteStoreId" /> </type> + <type name="Magento\Webapi\Controller\Rest\ParamsOverrider"> + <plugin name="validateQuoteData" type="Magento\Quote\Plugin\Webapi\Controller\Rest\ValidateQuoteData" sortOrder="1" disabled="false" /> + </type> </config>
app/code/Magento/QuoteGraphQl/composer.json+21 −19 modified@@ -2,30 +2,31 @@ "name": "magento/module-quote-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-customer": "*", - "magento/module-customer-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-directory": "*", - "magento/module-graph-ql": "*", - "magento/module-gift-message": "*", - "magento/module-catalog-inventory": "*" + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-customer": "103.0.*", + "magento/module-customer-graph-ql": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-gift-message": "100.4.*", + "magento/module-catalog-inventory": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*", - "magento/module-catalog-inventory-graph-ql": "*", - "magento/module-payment-graph-ql": "*" + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-catalog-inventory-graph-ql": "100.4.*", + "magento/module-payment-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } +
app/code/Magento/Quote/Model/ShippingMethodManagement.php+27 −2 modified@@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Quote\Model; use Magento\Customer\Api\AddressRepositoryInterface; @@ -25,6 +27,7 @@ use Magento\Quote\Model\Quote\Address\Rate; use Magento\Quote\Model\Quote\TotalsCollector; use Magento\Quote\Model\ResourceModel\Quote\Address as QuoteAddressResource; +use Magento\Customer\Model\Data\Address as CustomerAddress; /** * Shipping method read service @@ -38,7 +41,7 @@ class ShippingMethodManagement implements ShipmentEstimationInterface { /** - * Quote repository. + * Quote repository model * * @var CartRepositoryInterface */ @@ -268,6 +271,8 @@ public function estimateByExtendedAddress($cartId, AddressInterface $address) /** * @inheritDoc + * @throws InputException + * @throws NoSuchEntityException */ public function estimateByAddressId($cartId, $addressId) { @@ -278,7 +283,7 @@ public function estimateByAddressId($cartId, $addressId) if ($quote->isVirtual() || 0 == $quote->getItemsCount()) { return []; } - $address = $this->addressRepository->getById($addressId); + $address = $this->getAddress($addressId, $quote); return $this->getShippingMethods($quote, $address); } @@ -384,4 +389,24 @@ private function getDataObjectProcessor() } return $this->dataProcessor; } + + /** + * Gets the address if exists for customer + * + * @param int $addressId + * @param Quote $quote + * @return CustomerAddress + * @throws InputException The shipping address is incorrect. + */ + private function getAddress(int $addressId, Quote $quote): CustomerAddress + { + $addresses = $quote->getCustomer()->getAddresses(); + foreach ($addresses as $address) { + if ($addressId === (int)$address->getId()) { + return $address; + } + } + + throw new InputException(__('The shipping address is missing. Set the address and try again.')); + } }
app/code/Magento/Quote/Plugin/Webapi/Controller/Rest/ValidateQuoteData.php+55 −0 added@@ -0,0 +1,55 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Quote\Plugin\Webapi\Controller\Rest; + +use Magento\Webapi\Controller\Rest\ParamsOverrider; + +/** + * Validates Quote Data + */ +class ValidateQuoteData +{ + private const QUOTE_KEY = 'quote'; + + /** + * Before Overriding to validate data + * + * @param ParamsOverrider $subject + * @param array $inputData + * @param array $parameters + * @return array[] + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeOverride(ParamsOverrider $subject, array $inputData, array $parameters): array + { + if (isset($inputData[self:: QUOTE_KEY])) { + $inputData[self:: QUOTE_KEY] = $this->validateInputData($inputData[self:: QUOTE_KEY]); + } + return [$inputData, $parameters]; + } + + /** + * Validates InputData + * + * @param array $inputData + * @return array + */ + private function validateInputData(array $inputData): array + { + $result = []; + + $data = array_filter($inputData, function ($k) use (&$result) { + $key = is_string($k) ? strtolower($k) : $k; + return !isset($result[$key]) && ($result[$key] = true); + }, ARRAY_FILTER_USE_KEY); + + return array_map(function ($value) { + return is_array($value) ? $this->validateInputData($value) : $value; + }, $data); + } +}
app/code/Magento/Quote/Test/Unit/Model/ShippingMethodManagementTest.php+120 −94 modified@@ -24,12 +24,13 @@ use Magento\Quote\Model\QuoteRepository; use Magento\Quote\Model\ResourceModel\Quote\Address as QuoteAddressResource; use Magento\Quote\Model\ShippingMethodManagement; -use Magento\Store\Model\Store; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Magento\Quote\Api\Data\CartExtensionInterface; use Magento\Sales\Model\Order\ShippingAssignmentBuilder; use Magento\Quote\Api\Data\ShippingInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Model\Session; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -41,16 +42,6 @@ class ShippingMethodManagementTest extends TestCase */ protected $model; - /** - * @var MockObject - */ - protected $shippingMethodMock; - - /** - * @var MockObject - */ - protected $methodDataFactoryMock; - /** * @var ShippingMethodConverter|MockObject */ @@ -96,11 +87,6 @@ class ShippingMethodManagementTest extends TestCase */ private $totalsCollector; - /** - * @var Store|MockObject - */ - private $storeMock; - /** * @var QuoteAddressResource|MockObject */ @@ -121,13 +107,20 @@ class ShippingMethodManagementTest extends TestCase */ private $shippingAssignmentBuilder; + /** + * @var Session + */ + private $customerSession; + protected function setUp(): void { $this->objectManager = new ObjectManager($this); $this->quoteRepository = $this->getMockForAbstractClass(CartRepositoryInterface::class); $this->addressRepository = $this->getMockForAbstractClass(AddressRepositoryInterface::class); + $this->customerSession = $this->createMock(Session::class); - $this->methodDataFactoryMock = $this->getMockBuilder(ShippingMethodInterfaceFactory::class) + /** @var MockObject $methodDataFactoryMock */ + $methodDataFactoryMock = $this->getMockBuilder(ShippingMethodInterfaceFactory::class) ->disableOriginalConstructor() ->onlyMethods(['create']) ->getMock(); @@ -141,7 +134,6 @@ protected function setUp(): void $this->dataProcessor = $this->createMock($className); $this->quoteAddressResource = $this->createMock(QuoteAddressResource::class); - $this->storeMock = $this->createMock(Store::class); $this->quote = $this->getMockBuilder(Quote::class) ->disableOriginalConstructor() ->setMethods([ @@ -153,7 +145,8 @@ protected function setUp(): void 'collectTotals', 'save', '__wakeup', - 'getExtensionAttributes' + 'getExtensionAttributes', + 'getCustomer' ]) ->getMock(); @@ -190,25 +183,17 @@ protected function setUp(): void ShippingMethodManagement::class, [ 'quoteRepository' => $this->quoteRepository, - 'methodDataFactory' => $this->methodDataFactoryMock, + 'methodDataFactory' => $methodDataFactoryMock, 'converter' => $this->converter, 'totalsCollector' => $this->totalsCollector, 'addressRepository' => $this->addressRepository, 'quoteAddressResource' => $this->quoteAddressResource, + 'customerSession' => $this->customerSession, ] ); - $this->objectManager->setBackwardCompatibleProperty( - $this->model, - 'addressFactory', - $this->addressFactory - ); - - $this->objectManager->setBackwardCompatibleProperty( - $this->model, - 'dataProcessor', - $this->dataProcessor - ); + $this->objectManager->setBackwardCompatibleProperty($this->model, 'addressFactory', $this->addressFactory); + $this->objectManager->setBackwardCompatibleProperty($this->model, 'dataProcessor', $this->dataProcessor); $this->extensionAttributesMock = $this->getMockBuilder(CartExtensionInterface::class) ->setMethods(['getShippingAssignments']) @@ -266,11 +251,12 @@ public function testGetMethod() ->with('one_two') ->willReturn($shippingRateMock); - $this->shippingMethodMock = $this->getMockForAbstractClass(ShippingMethodInterface::class); + /** @var MockObject $shippingMethodMock */ + $shippingMethodMock = $this->getMockForAbstractClass(ShippingMethodInterface::class); $this->converter->expects($this->once()) ->method('modelToDataObject') ->with($shippingRateMock, $currencyCode) - ->willReturn($this->shippingMethodMock); + ->willReturn($shippingMethodMock); $this->model->get($cartId); } @@ -578,32 +564,32 @@ public function testEstimateByExtendedAddress() ->method('create') ->willReturn($address); - $this->quoteRepository->expects(static::once()) + $this->quoteRepository->expects(self::once()) ->method('getActive') ->with($cartId) ->willReturn($this->quote); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('isVirtual') ->willReturn(false); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('getItemsCount') ->willReturn(1); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('getShippingAddress') ->willReturn($this->shippingAddress); - $this->dataProcessor->expects(static::any()) + $this->dataProcessor->expects(self::any()) ->method('buildOutputDataArray') ->willReturn($addressData); - $this->shippingAddress->expects(static::once()) + $this->shippingAddress->expects(self::once()) ->method('setCollectShippingRates') ->with(true) ->willReturnSelf(); - $this->totalsCollector->expects(static::once()) + $this->totalsCollector->expects(self::once()) ->method('collectAddressTotals') ->with($this->quote, $this->shippingAddress) ->willReturnSelf(); @@ -615,104 +601,144 @@ public function testEstimateByExtendedAddress() $methodObject = $this->getMockForAbstractClass(ShippingMethodInterface::class); $expectedRates = [$methodObject]; - $this->shippingAddress->expects(static::once()) + $this->shippingAddress->expects(self::once()) ->method('getGroupedAllShippingRates') ->willReturn([[$rate]]); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('getQuoteCurrencyCode') ->willReturn($currencyCode); - $this->converter->expects(static::once()) + $this->converter->expects(self::once()) ->method('modelToDataObject') ->with($rate, $currencyCode) ->willReturn($methodObject); $carriersRates = $this->model->estimateByExtendedAddress($cartId, $address); - static::assertEquals($expectedRates, $carriersRates); + self::assertEquals($expectedRates, $carriersRates); } /** + * @dataProvider getAddressDataProvider + * * @covers \Magento\Quote\Model\ShippingMethodManagement::estimateByAddressId + * @param int $cartId + * @param int $addressId + * @param int $randomAddressId + * @param bool $throwsException */ - public function testEstimateByAddressId() + public function testEstimateByAddressId($cartId, $addressId, $randomAddressId, $throwsException) { - $cartId = 1; - $addressData = [ 'region' => 'California', 'region_id' => 23, 'country_id' => 1, 'postcode' => 90200, ]; $currencyCode = 'UAH'; + $customerId = 1; - /** - * @var \Magento\Customer\Api\Data\AddressInterface|MockObject $address - */ - $address = $this->getMockBuilder(\Magento\Customer\Api\Data\AddressInterface::class) + $rate = $this->getMockBuilder(Rate::class) ->disableOriginalConstructor() + ->setMethods([]) ->getMock(); + $methodObject = $this->getMockForAbstractClass(ShippingMethodInterface::class); - $this->addressRepository->expects($this->any()) - ->method('getById') - ->willReturn($address); - - $this->addressFactory->expects($this->any()) - ->method('create') - ->willReturn($address); - - $this->quoteRepository->expects(static::once()) + $this->quoteRepository->expects(self::once()) ->method('getActive') ->with($cartId) ->willReturn($this->quote); - $this->quote->expects(static::once()) + $this->quote->expects(self::once()) ->method('isVirtual') ->willReturn(false); - $this->quote->expects(static::once()) + + $this->quote->expects(self::once()) ->method('getItemsCount') ->willReturn(1); - $this->quote->expects(static::once()) - ->method('getShippingAddress') - ->willReturn($this->shippingAddress); - - $this->dataProcessor->expects(static::any()) - ->method('buildOutputDataArray') - ->willReturn($addressData); - - $this->shippingAddress->expects(static::once()) - ->method('setCollectShippingRates') - ->with(true) - ->willReturnSelf(); + $this->setCustomerSession($addressId, $customerId); + if ($throwsException) { + $this->expectException('Magento\Framework\Exception\InputException'); + $this->expectExceptionMessage('The shipping address is missing. Set the address and try again.'); + $this->model->estimateByAddressId($cartId, $randomAddressId); + } else { + $this->quote->expects(self::once()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddress); + + $this->dataProcessor->expects(self::any()) + ->method('buildOutputDataArray') + ->willReturn($addressData); + + $this->shippingAddress->expects(self::once()) + ->method('setCollectShippingRates') + ->with(true) + ->willReturnSelf(); + + $this->totalsCollector->expects(self::once()) + ->method('collectAddressTotals') + ->with($this->quote, $this->shippingAddress) + ->willReturnSelf(); + + $expectedRates = [$methodObject]; + $this->shippingAddress->expects(self::once()) + ->method('getGroupedAllShippingRates') + ->willReturn([[$rate]]); + + $this->quote->expects(self::once()) + ->method('getQuoteCurrencyCode') + ->willReturn($currencyCode); + + $this->converter->expects(self::once()) + ->method('modelToDataObject') + ->with($rate, $currencyCode) + ->willReturn($methodObject); + + $carriersRates = $this->model->estimateByAddressId($cartId, $addressId); + self::assertEquals($expectedRates, $carriersRates); + } + } - $this->totalsCollector->expects(static::once()) - ->method('collectAddressTotals') - ->with($this->quote, $this->shippingAddress) - ->willReturnSelf(); + /** + * @return array + */ + public function getAddressDataProvider() + { + return [ + [1, 1, 5, true], + [1, 1, 1, false], + ]; + } - $rate = $this->getMockBuilder(Rate::class) + private function setCustomerSession($addressId, $customerId) + { + /** + * @var \Magento\Customer\Model\Data\Address|MockObject $address + */ + $address = $this->getMockBuilder(\Magento\Customer\Model\Data\Address::class) + ->setMethods(['getId']) ->disableOriginalConstructor() - ->setMethods([]) ->getMock(); - $methodObject = $this->getMockForAbstractClass(ShippingMethodInterface::class); - $expectedRates = [$methodObject]; + $address->expects($this->atLeastOnce()) + ->method('getId') + ->willReturn($addressId); - $this->shippingAddress->expects(static::once()) - ->method('getGroupedAllShippingRates') - ->willReturn([[$rate]]); + $this->addressRepository->expects($this->any()) + ->method('getById') + ->willReturn($address); - $this->quote->expects(static::once()) - ->method('getQuoteCurrencyCode') - ->willReturn($currencyCode); + $this->addressFactory->expects($this->any()) + ->method('create') + ->willReturn($address); - $this->converter->expects(static::once()) - ->method('modelToDataObject') - ->with($rate, $currencyCode) - ->willReturn($methodObject); + $customerAddresses = [$address]; + $customerMock = $this->getMockForAbstractClass(CustomerInterface::class); + $customerMock->method('getAddresses')->willReturn($customerAddresses); - $carriersRates = $this->model->estimateByAddressId($cartId, $address); - static::assertEquals($expectedRates, $carriersRates); + $this->quote->method('getCustomer')->willReturn($customerMock); + $this->customerSession->method('getCustomerId')->willReturn($customerId); + $this->customerSession->expects(self::any())->method('isLoggedIn')->willReturn(true); + $this->customerSession->expects(self::any())->method('getCustomerData')->willReturn($customerMock); } }
app/code/Magento/Quote/Test/Unit/Plugin/Webapi/Controller/Rest/ValidateQuoteDataTest.php+113 −0 added@@ -0,0 +1,113 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Quote\Test\Unit\Plugin\Webapi\Controller\Rest; + +use Exception; +use Magento\Framework\App\ObjectManager; +use Magento\Quote\Plugin\Webapi\Controller\Rest\ValidateQuoteData; +use PHPUnit\Framework\TestCase; +use ReflectionClass; + +/** + * Unit test for ValidateQuoteData plugin + */ +class ValidateQuoteDataTest extends TestCase +{ + + /** + * @var ValidateQuoteData + */ + private $validateQuoteDataObject; + + /** + * @var ReflectionClass + * + */ + private $reflectionObject; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->validateQuoteDataObject = ObjectManager::getInstance()->get(ValidateQuoteData::class); + $this->reflectionObject = new ReflectionClass(get_class($this->validateQuoteDataObject)); + } + /** + * Test if the quote array is valid + * + * @param array $array + * @param array $result + * @dataProvider dataProviderInputData + * @throws Exception + */ + public function testValidateInputData(array $array, array $result) + { + $this->assertEquals( + $result, + $this->invokeValidateInputData('validateInputData', [$array]) + ); + } + + /** + * @param string $methodName + * @param array $arguments + * @return mixed + * @throws Exception + */ + private function invokeValidateInputData(string $methodName, array $arguments = []) + { + $validateInputDataMethod = $this->reflectionObject->getMethod($methodName); + $validateInputDataMethod->setAccessible(true); + return $validateInputDataMethod->invokeArgs($this->validateQuoteDataObject, $arguments); + } + + /** + * @return array + */ + public function dataProviderInputData(): array + { + return [ + [ + ['person' => + [ + 'id' => -1, + 'Id' => 1, + 'name' => + [ + 'firstName' => 'John', + 'LastName' => 'S' + ], + 'isHavingVehicle' => 1, + 'address' => + [ + 'street' => '4th Street', + 'Street' => '2nd Street', + 'city' => 'Atlanta' + ], + ] + ], + ['person' => + [ + 'id' => -1, + 'name' => + [ + 'firstName' => 'John', + 'LastName' => 'S' + ], + 'isHavingVehicle' => 1, + 'address' => + [ + 'street' => '4th Street', + 'city' => 'Atlanta' + ], + ] + ], + ] + ]; + } +}
app/code/Magento/RelatedProductGraphQl/composer.json+10 −8 modified@@ -2,19 +2,20 @@ "name": "magento/module-related-product-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } +
app/code/Magento/ReleaseNotification/composer.json+12 −10 modified@@ -1,21 +1,22 @@ { "name": "magento/module-release-notification", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-user": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/framework": "*" - }, - "suggest": { - "magento/module-config": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-user": "101.2.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "magento/framework": "103.0.*" + }, + "suggest": { + "magento/module-config": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/RemoteStorage/composer.json+19 −17 modified@@ -1,29 +1,30 @@ { "name": "magento/module-remote-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-backend": "*", - "magento/module-sitemap": "*", - "magento/module-cms": "*", - "magento/module-downloadable": "*", - "magento/module-catalog": "*", - "magento/module-media-storage": "*", - "magento/module-media-gallery-metadata": "*", - "magento/module-media-gallery-synchronization": "*", - "magento/module-import-export": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable-import-export": "*", + "magento/module-backend": "102.0.*", + "magento/module-sitemap": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-media-gallery-metadata": "100.4.*", + "magento/module-media-gallery-synchronization": "100.4.*", + "magento/module-import-export": "101.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-downloadable-import-export": "100.4.*", "predis/predis": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Reports/composer.json+25 −23 modified@@ -1,35 +1,36 @@ { "name": "magento/module-reports", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-review": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-review": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } +
app/code/Magento/RequireJs/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-require-js", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/ReviewAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-review-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-review": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-review": "100.4.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Review/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-review", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-newsletter": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-newsletter": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-review-sample-data": "*" + "magento/module-cookie": "100.4.*", + "magento/module-review-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/ReviewGraphQl/composer.json+12 −10 modified@@ -2,21 +2,22 @@ "name": "magento/module-review-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-review": "*", - "magento/module-store": "*", - "magento/framework": "*" + "magento/module-catalog": "104.0.*", + "magento/module-review": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Robots/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-robots", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Rss/composer.json+11 −9 modified@@ -1,21 +1,22 @@ { "name": "magento/module-rss", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Rule/composer.json+12 −10 modified@@ -1,23 +1,24 @@ { "name": "magento/module-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/SalesAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-sales-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Sales/composer.json+33 −31 modified@@ -1,45 +1,46 @@ { "name": "magento/module-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales-rule": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-sales-sample-data": "*" + "magento/module-sales-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -49,3 +50,4 @@ } } } +
app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php+4 −5 modified@@ -20,12 +20,12 @@ class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements Ht * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Sales::comment'; + public const ADMIN_RESOURCE = 'Magento_Sales::comment'; /** * ACL resource needed to send comment email notification */ - const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails'; + public const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails'; /** * Add order comment action @@ -52,13 +52,12 @@ public function execute() $notify = false; } - $history = $order->addStatusHistoryComment($data['comment'], $data['status']); + $comment = trim(strip_tags($data['comment'])); + $history = $order->addStatusHistoryComment($comment, $data['status']); $history->setIsVisibleOnFront($visible); $history->setIsCustomerNotified($notify); $history->save(); - $comment = trim(strip_tags($data['comment'])); - $order->save(); /** @var OrderCommentSender $orderCommentSender */ $orderCommentSender = $this->_objectManager
app/code/Magento/SalesGraphQl/composer.json+13 −11 modified@@ -2,21 +2,22 @@ "name": "magento/module-sales-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-tax": "*", - "magento/module-quote": "*", - "magento/module-graph-ql": "*", - "magento/module-shipping": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-tax": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-shipping": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/SalesInventory/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-sales-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/SalesRule/composer.json+30 −28 modified@@ -1,42 +1,43 @@ { "name": "magento/module-sales-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-rule": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-rule": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "magento/module-captcha": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" }, "suggest": { - "magento/module-sales-rule-sample-data": "*" + "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -46,3 +47,4 @@ } } } +
app/code/Magento/SalesSequence/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-sales-sequence", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/SampleData/composer.json+9 −7 modified@@ -1,21 +1,22 @@ { "name": "magento/module-sample-data", "description": "Sample Data fixtures", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/sample-data-media": "*" + "magento/sample-data-media": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Search/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-search": "*", - "magento/module-reports": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-reports": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Security/composer.json+13 −11 modified@@ -1,25 +1,26 @@ { "name": "magento/module-security", "description": "Security management module", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-backend": "102.0.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-customer": "*" + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/SendFriend/composer.json+14 −12 modified@@ -1,24 +1,25 @@ { "name": "magento/module-send-friend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-captcha": "*", - "magento/module-authorization": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-captcha": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } +
app/code/Magento/SendFriendGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-send-friend-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-send-friend": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-send-friend": "100.4.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Shipping/composer.json+24 −22 modified@@ -1,37 +1,38 @@ { "name": "magento/module-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "ext-gd": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-contact": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-contact": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-fedex": "*", - "magento/module-ups": "*", - "magento/module-config": "*" + "magento/module-fedex": "100.4.*", + "magento/module-ups": "100.4.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/Sitemap/composer.json+18 −16 modified@@ -1,30 +1,31 @@ { "name": "magento/module-sitemap", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-robots": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-robots": "101.1.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } +
app/code/Magento/Store/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-media-storage": "*", - "magento/module-ui": "*", - "magento/module-customer": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Store/etc/config.xml+1 −0 modified@@ -135,6 +135,7 @@ <pht>pht</pht> <phar>phar</phar> <svg>svg</svg> + <svgz>svgz</svgz> <xml>xml</xml> <xhtml>xhtml</xhtml> </protected_extensions>
app/code/Magento/StoreGraphQl/composer.json+9 −7 modified@@ -2,17 +2,18 @@ "name": "magento/module-store-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Swagger/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-swagger", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/SwaggerWebapiAsync/composer.json+10 −8 modified@@ -1,22 +1,23 @@ { "name": "magento/module-swagger-webapi-async", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "103.0.*", + "magento/module-swagger": "100.4.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/SwaggerWebapi/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-swagger-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "103.0.*", + "magento/module-swagger": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Swatches/composer.json+20 −18 modified@@ -1,32 +1,33 @@ { "name": "magento/module-swatches", "description": "Add Swatches to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, "suggest": { - "magento/module-layered-navigation": "*", - "magento/module-swatches-sample-data": "*" + "magento/module-layered-navigation": "100.4.*", + "magento/module-swatches-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } +
app/code/Magento/SwatchesGraphQl/composer.json+11 −9 modified@@ -2,20 +2,21 @@ "name": "magento/module-swatches-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swatches": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-swatches": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" }, "suggest": { - "magento/module-configurable-product-graph-ql": "*" + "magento/module-configurable-product-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/SwatchesLayeredNavigation/composer.json+8 −6 modified@@ -1,19 +1,20 @@ { "name": "magento/module-swatches-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Tax/composer.json+23 −21 modified@@ -1,35 +1,36 @@ { "name": "magento/module-tax", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-tax-sample-data": "*" + "magento/module-tax-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } +
app/code/Magento/TaxGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-tax-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-tax": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-tax": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/TaxImportExport/composer.json+13 −11 modified@@ -1,23 +1,24 @@ { "name": "magento/module-tax-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-directory": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } +
app/code/Magento/Theme/composer.json+21 −19 modified@@ -1,33 +1,34 @@ { "name": "magento/module-theme", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*" }, "suggest": { - "magento/module-theme-sample-data": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*" + "magento/module-theme-sample-data": "Sample Data version: 100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } +
app/code/Magento/ThemeGraphQl/composer.json+8 −6 modified@@ -2,17 +2,18 @@ "name": "magento/module-theme-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-store-graph-ql": "*" + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/Translation/composer.json+13 −11 modified@@ -1,25 +1,26 @@ { "name": "magento/module-translation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-developer": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-developer": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Ui/composer.json+14 −12 modified@@ -1,26 +1,27 @@ { "name": "magento/module-ui", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/Ups/composer.json+16 −14 modified@@ -1,28 +1,29 @@ { "name": "magento/module-ups", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } +
app/code/Magento/UrlRewrite/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-cms-url-rewrite": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/UrlRewriteGraphQl/composer.json+9 −7 modified@@ -2,18 +2,19 @@ "name": "magento/module-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-url-rewrite": "102.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/User/composer.json+15 −13 modified@@ -1,25 +1,26 @@ { "name": "magento/module-user", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-email": "*", - "magento/module-integration": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-email": "101.1.*", + "magento/module-integration": "100.4.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Usps/composer.json+16 −14 modified@@ -1,27 +1,28 @@ { "name": "magento/module-usps", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } +
app/code/Magento/Variable/composer.json+12 −10 modified@@ -1,22 +1,23 @@ { "name": "magento/module-variable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-config": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-store": "101.1.*", + "magento/module-config": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } +
app/code/Magento/Vault/composer.json+15 −14 modified@@ -1,25 +1,25 @@ { "name": "magento/module-vault", - "description": "", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +29,4 @@ } } } +
app/code/Magento/VaultGraphQl/composer.json+8 −6 modified@@ -2,16 +2,17 @@ "name": "magento/module-vault-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-vault": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-vault": "101.2.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Version/composer.json+8 −6 modified@@ -1,18 +1,19 @@ { "name": "magento/module-version", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } +
app/code/Magento/WebapiAsync/composer.json+13 −11 modified@@ -1,25 +1,26 @@ { "name": "magento/module-webapi-async", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-message-queue": "*", - "magento/module-webapi": "*", - "magento/module-asynchronous-operations": "*" + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/module-webapi": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" }, "suggest": { - "magento/module-user": "*", - "magento/module-customer": "*" + "magento/module-user": "101.2.*", + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } +
app/code/Magento/Webapi/composer.json+14 −12 modified@@ -1,26 +1,27 @@ { "name": "magento/module-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-integration": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-user": "*", - "magento/module-customer": "*" + "magento/module-user": "101.2.*", + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } +
app/code/Magento/WebapiSecurity/composer.json+9 −7 modified@@ -1,19 +1,20 @@ { "name": "magento/module-webapi-security", "description": "WebapiSecurity module provides option to loosen security on some webapi resources.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-webapi": "*" + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } +
app/code/Magento/Weee/composer.json+21 −19 modified@@ -1,33 +1,34 @@ { "name": "magento/module-weee", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-bundle": "*" + "magento/module-bundle": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } +
app/code/Magento/WeeeGraphQl/composer.json+11 −9 modified@@ -2,20 +2,21 @@ "name": "magento/module-weee-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-weee": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-weee": "100.4.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/code/Magento/Widget/composer.json+17 −15 modified@@ -1,29 +1,30 @@ { "name": "magento/module-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4-p1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-email": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-variable": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-variable": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-widget-sample-data": "*" + "magento/module-widget-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } +
app/code/Magento/Widget/Model/Widget/Instance.php+11 −11 modified@@ -33,28 +33,28 @@ */ class Instance extends \Magento\Framework\Model\AbstractModel { - const SPECIFIC_ENTITIES = 'specific'; + public const SPECIFIC_ENTITIES = 'specific'; - const ALL_ENTITIES = 'all'; + public const ALL_ENTITIES = 'all'; - const DEFAULT_LAYOUT_HANDLE = 'default'; + public const DEFAULT_LAYOUT_HANDLE = 'default'; - const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view'; + public const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view'; /** * @deprecated see self::SINGLE_PRODUCT_LAYOUT_HANDLE */ - const SINGLE_PRODUCT_LAYOUT_HANLDE = self::SINGLE_PRODUCT_LAYOUT_HANDLE; + public const SINGLE_PRODUCT_LAYOUT_HANLDE = self::SINGLE_PRODUCT_LAYOUT_HANDLE; - const SINGLE_PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_id_{{ID}}'; + public const SINGLE_PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_id_{{ID}}'; - const PRODUCT_TYPE_LAYOUT_HANDLE = 'catalog_product_view_type_{{TYPE}}'; + public const PRODUCT_TYPE_LAYOUT_HANDLE = 'catalog_product_view_type_{{TYPE}}'; - const ANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_type_layered'; + public const ANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_type_layered'; - const NOTANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_type_default'; + public const NOTANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_type_default'; - const SINGLE_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_id_{{ID}}'; + public const SINGLE_CATEGORY_LAYOUT_HANDLE = 'catalog_category_view_id_{{ID}}'; /** * @var array @@ -644,7 +644,7 @@ public function generateLayoutUpdateXml($container, $templatePath = '') return ''; } $parameters = $this->getWidgetParameters(); - $xml = '<body><referenceContainer name="' . $container . '">'; + $xml = '<body><referenceContainer name="' . $this->_escaper->escapeHtmlAttr($container) . '">'; $template = ''; if (isset($parameters['template'])) { unset($parameters['template']);
app/code/Magento/WishlistAnalytics/composer.json+8 −6 modified@@ -1,17 +1,18 @@ { "name": "magento/module-wishlist-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-wishlist": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-wishlist": "101.2.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } +
app/code/Magento/Wishlist/composer.json+25 −23 modified@@ -1,37 +1,38 @@ { "name": "magento/module-wishlist", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-rss": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-captcha": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-rss": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-captcha": "100.4.*" }, "suggest": { - "magento/module-configurable-product": "*", - "magento/module-downloadable": "*", - "magento/module-bundle": "*", - "magento/module-cookie": "*", - "magento/module-grouped-product": "*", - "magento/module-wishlist-sample-data": "*" + "magento/module-configurable-product": "100.4.*", + "magento/module-downloadable": "100.4.*", + "magento/module-bundle": "101.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-wishlist-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } +
app/code/Magento/WishlistGraphQl/composer.json+12 −10 modified@@ -2,20 +2,21 @@ "name": "magento/module-wishlist-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-wishlist": "*", - "magento/module-store": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-wishlist": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } +
app/design/adminhtml/Magento/backend/composer.json+8 −6 modified@@ -1,21 +1,23 @@ { "name": "magento/theme-adminhtml-backend", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } +
app/design/frontend/Magento/blank/composer.json+8 −6 modified@@ -1,21 +1,23 @@ { "name": "magento/theme-frontend-blank", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } +
app/design/frontend/Magento/luma/composer.json+9 −7 modified@@ -1,22 +1,24 @@ { "name": "magento/theme-frontend-luma", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/theme-frontend-blank": "*" + "magento/framework": "103.0.*", + "magento/theme-frontend-blank": "100.4.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/de_DE/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/en_US/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-en_us", "description": "English (United States) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/es_ES/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/fr_FR/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/nl_NL/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/pt_BR/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
app/i18n/Magento/zh_Hans_CN/composer.json+4 −2 modified@@ -1,20 +1,22 @@ { "name": "magento/language-zh_hans_cn", "description": "Chinese (China) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } +
composer.json+269 −267 modified@@ -7,14 +7,15 @@ "AFL-3.0" ], "config": { - "preferred-install": "dist", - "sort-packages": true, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "laminas/laminas-dependency-plugin": true, "magento/*": true - } + }, + "preferred-install": "dist", + "sort-packages": true }, + "version": "2.4.4-p1", "require": { "php": "~7.4.0||~8.1.0", "ext-bcmath": "*", @@ -70,7 +71,7 @@ "magento/composer-dependency-version-audit-plugin": "~0.1", "magento/magento-composer-installer": ">=0.3.0", "magento/zendframework1": "~1.15.0", - "monolog/monolog": "^2.3", + "monolog/monolog": "^2.7", "pelago/emogrifier": "^6.0.0", "php-amqplib/php-amqplib": "~3.1.0", "phpseclib/mcrypt_compat": "~2.0.0", @@ -85,6 +86,30 @@ "webonyx/graphql-php": "~14.11.3", "wikimedia/less.php": "^3.0.0" }, + "suggest": { + "ext-pcntl": "Need for run processes in parallel mode" + }, + "autoload": { + "exclude-from-classmap": [ + "**/dev/**", + "**/update/**", + "**/Test/**" + ], + "files": [ + "app/etc/NonComposerComponentRegistration.php" + ], + "psr-0": { + "": [ + "app/code/", + "generated/code/" + ] + }, + "psr-4": { + "Magento\\": "app/code/Magento/", + "Magento\\Framework\\": "lib/internal/Magento/Framework/", + "Magento\\Setup\\": "setup/src/Magento/Setup/" + } + }, "require-dev": { "allure-framework/allure-phpunit": "~1.5.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", @@ -100,291 +125,268 @@ "squizlabs/php_codesniffer": "~3.6.0", "symfony/finder": "^5.2" }, - "suggest": { - "ext-pcntl": "Need for run processes in parallel mode" + "conflict": { + "gene/bluefoot": "*" }, "replace": { - "magento/module-marketplace": "*", - "magento/module-admin-analytics": "*", - "magento/module-admin-notification": "*", - "magento/module-advanced-pricing-import-export": "*", - "magento/module-amqp": "*", - "magento/module-amqp-store": "*", - "magento/module-analytics": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*", - "magento/module-advanced-search": "*", - "magento/module-backend": "*", - "magento/module-backup": "*", - "magento/module-bundle": "*", - "magento/module-bundle-graph-ql": "*", - "magento/module-bundle-import-export": "*", - "magento/module-cache-invalidate": "*", - "magento/module-captcha": "*", - "magento/module-cardinal-commerce": "*", - "magento/module-catalog": "*", - "magento/module-catalog-customer-graph-ql": "*", - "magento/module-catalog-analytics": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-inventory-graph-ql": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-rule-graph-ql": "*", - "magento/module-catalog-rule-configurable": "*", - "magento/module-catalog-search": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-widget": "*", - "magento/module-checkout": "*", - "magento/module-checkout-agreements": "*", - "magento/module-checkout-agreements-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-cms-url-rewrite": "*", - "magento/module-compare-list-graph-ql": "*", - "magento/module-config": "*", - "magento/module-configurable-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-configurable-product-sales": "*", - "magento/module-contact": "*", - "magento/module-cookie": "*", - "magento/module-cron": "*", - "magento/module-currency-symbol": "*", - "magento/module-customer": "*", - "magento/module-customer-analytics": "*", - "magento/module-customer-downloadable-graph-ql": "*", - "magento/module-customer-import-export": "*", - "magento/module-deploy": "*", - "magento/module-developer": "*", - "magento/module-dhl": "*", - "magento/module-directory": "*", - "magento/module-directory-graph-ql": "*", - "magento/module-downloadable": "*", - "magento/module-downloadable-graph-ql": "*", - "magento/module-downloadable-import-export": "*", - "magento/module-eav": "*", - "magento/module-elasticsearch": "*", - "magento/module-elasticsearch-6": "*", - "magento/module-elasticsearch-7": "*", - "magento/module-email": "*", - "magento/module-encryption-key": "*", - "magento/module-fedex": "*", - "magento/module-gift-message": "*", - "magento/module-gift-message-graph-ql": "*", - "magento/module-google-adwords": "*", - "magento/module-google-analytics": "*", - "magento/module-google-optimizer": "*", - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-catalog-cms-graph-ql": "*", - "magento/module-catalog-url-rewrite-graph-ql": "*", - "magento/module-configurable-product-graph-ql": "*", - "magento/module-customer-graph-ql": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-swatches-graph-ql": "*", - "magento/module-tax-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/module-cms-url-rewrite-graph-ql": "*", - "magento/module-weee-graph-ql": "*", - "magento/module-cms-graph-ql": "*", - "magento/module-grouped-import-export": "*", - "magento/module-grouped-product": "*", - "magento/module-grouped-catalog-inventory": "*", - "magento/module-grouped-product-graph-ql": "*", - "magento/module-import-export": "*", - "magento/module-indexer": "*", - "magento/module-instant-purchase": "*", - "magento/module-integration": "*", - "magento/module-layered-navigation": "*", - "magento/module-login-as-customer": "*", - "magento/module-login-as-customer-admin-ui": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-assistance": "*", - "magento/module-login-as-customer-frontend-ui": "*", - "magento/module-login-as-customer-graph-ql": "*", - "magento/module-login-as-customer-log": "*", - "magento/module-login-as-customer-quote": "*", - "magento/module-login-as-customer-page-cache": "*", - "magento/module-login-as-customer-sales": "*", - "magento/module-media-content": "*", - "magento/module-media-content-api": "*", - "magento/module-media-content-catalog": "*", - "magento/module-media-content-cms": "*", - "magento/module-media-gallery": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-ui": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-integration": "*", - "magento/module-media-gallery-synchronization": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-synchronization": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-content-synchronization-catalog": "*", - "magento/module-media-content-synchronization-cms": "*", - "magento/module-media-gallery-synchronization-metadata": "*", - "magento/module-media-gallery-metadata": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-catalog-ui": "*", - "magento/module-media-gallery-cms-ui": "*", - "magento/module-media-gallery-catalog-integration": "*", - "magento/module-media-gallery-catalog": "*", - "magento/module-media-gallery-renditions": "*", - "magento/module-media-gallery-renditions-api": "*", - "magento/module-media-storage": "*", - "magento/module-message-queue": "*", - "magento/module-msrp": "*", - "magento/module-msrp-configurable-product": "*", - "magento/module-msrp-grouped-product": "*", - "magento/module-multishipping": "*", - "magento/module-mysql-mq": "*", - "magento/module-new-relic-reporting": "*", - "magento/module-newsletter": "*", - "magento/module-newsletter-graph-ql": "*", - "magento/module-offline-payments": "*", - "magento/module-offline-shipping": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-payment-graph-ql": "*", - "magento/module-paypal": "*", - "magento/module-paypal-captcha": "*", - "magento/module-paypal-graph-ql": "*", - "magento/module-persistent": "*", - "magento/module-product-alert": "*", - "magento/module-product-video": "*", - "magento/module-quote": "*", - "magento/module-quote-analytics": "*", - "magento/module-quote-bundle-options": "*", - "magento/module-quote-configurable-options": "*", - "magento/module-quote-downloadable-links": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-related-product-graph-ql": "*", - "magento/module-release-notification": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-review": "*", - "magento/module-review-graph-ql": "*", - "magento/module-review-analytics": "*", - "magento/module-robots": "*", - "magento/module-rss": "*", - "magento/module-rule": "*", - "magento/module-sales": "*", - "magento/module-sales-analytics": "*", - "magento/module-sales-graph-ql": "*", - "magento/module-sales-inventory": "*", - "magento/module-sales-rule": "*", - "magento/module-sales-sequence": "*", - "magento/module-sample-data": "*", - "magento/module-search": "*", - "magento/module-security": "*", - "magento/module-send-friend": "*", - "magento/module-send-friend-graph-ql": "*", - "magento/module-shipping": "*", - "magento/module-sitemap": "*", - "magento/module-store": "*", - "magento/module-store-graph-ql": "*", - "magento/module-swagger": "*", - "magento/module-swagger-webapi": "*", - "magento/module-swagger-webapi-async": "*", - "magento/module-swatches": "*", - "magento/module-swatches-layered-navigation": "*", - "magento/module-tax": "*", - "magento/module-tax-import-export": "*", - "magento/module-theme": "*", - "magento/module-theme-graph-ql": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-ups": "*", - "magento/module-url-rewrite": "*", - "magento/module-user": "*", - "magento/module-usps": "*", - "magento/module-variable": "*", - "magento/module-vault": "*", - "magento/module-vault-graph-ql": "*", - "magento/module-version": "*", - "magento/module-webapi": "*", - "magento/module-webapi-async": "*", - "magento/module-webapi-security": "*", - "magento/module-weee": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-wishlist-graph-ql": "*", - "magento/module-wishlist-analytics": "*", - "magento/theme-adminhtml-backend": "*", - "magento/theme-frontend-blank": "*", - "magento/theme-frontend-luma": "*", - "magento/language-de_de": "*", - "magento/language-en_us": "*", - "magento/language-es_es": "*", - "magento/language-fr_fr": "*", - "magento/language-nl_nl": "*", - "magento/language-pt_br": "*", - "magento/language-zh_hans_cn": "*", - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-bulk": "*", - "magento/framework-message-queue": "*", + "magento/module-marketplace": "100.4.3", + "magento/module-admin-analytics": "100.4.4", + "magento/module-admin-notification": "100.4.3", + "magento/module-advanced-pricing-import-export": "100.4.4", + "magento/module-amqp": "100.4.2", + "magento/module-amqp-store": "100.4.2", + "magento/module-analytics": "100.4.4", + "magento/module-asynchronous-operations": "100.4.4", + "magento/module-authorization": "100.4.4", + "magento/module-advanced-search": "100.4.2", + "magento/module-backend": "102.0.4", + "magento/module-backup": "100.4.4", + "magento/module-bundle": "101.0.4", + "magento/module-bundle-graph-ql": "100.4.4", + "magento/module-bundle-import-export": "100.4.3", + "magento/module-cache-invalidate": "100.4.2", + "magento/module-captcha": "100.4.4", + "magento/module-cardinal-commerce": "100.4.2", + "magento/module-catalog": "104.0.4", + "magento/module-catalog-customer-graph-ql": "100.4.4", + "magento/module-catalog-analytics": "100.4.2", + "magento/module-catalog-import-export": "101.1.4", + "magento/module-catalog-inventory": "100.4.4", + "magento/module-catalog-inventory-graph-ql": "100.4.1", + "magento/module-catalog-rule": "101.2.4", + "magento/module-catalog-rule-graph-ql": "100.4.2", + "magento/module-catalog-rule-configurable": "100.4.3", + "magento/module-catalog-search": "102.0.4", + "magento/module-catalog-url-rewrite": "100.4.4", + "magento/module-catalog-widget": "100.4.4", + "magento/module-checkout": "100.4.4-p1", + "magento/module-checkout-agreements": "100.4.3", + "magento/module-checkout-agreements-graph-ql": "100.4.1", + "magento/module-cms": "104.0.4", + "magento/module-cms-url-rewrite": "100.4.3", + "magento/module-compare-list-graph-ql": "100.4.1", + "magento/module-config": "101.2.4", + "magento/module-configurable-import-export": "100.4.2", + "magento/module-configurable-product": "100.4.4", + "magento/module-configurable-product-sales": "100.4.2", + "magento/module-contact": "100.4.4", + "magento/module-cookie": "100.4.4", + "magento/module-cron": "100.4.4", + "magento/module-currency-symbol": "100.4.3", + "magento/module-customer": "103.0.4-p1", + "magento/module-customer-analytics": "100.4.2", + "magento/module-customer-downloadable-graph-ql": "100.4.1", + "magento/module-customer-import-export": "100.4.4", + "magento/module-deploy": "100.4.4", + "magento/module-developer": "100.4.4", + "magento/module-dhl": "100.4.3", + "magento/module-directory": "100.4.4", + "magento/module-directory-graph-ql": "100.4.2", + "magento/module-downloadable": "100.4.4", + "magento/module-downloadable-graph-ql": "100.4.4", + "magento/module-downloadable-import-export": "100.4.3", + "magento/module-eav": "102.1.4", + "magento/module-elasticsearch": "101.0.4-p1", + "magento/module-elasticsearch-6": "100.4.4", + "magento/module-elasticsearch-7": "100.4.4", + "magento/module-email": "101.1.4", + "magento/module-encryption-key": "100.4.3", + "magento/module-fedex": "100.4.3", + "magento/module-gift-message": "100.4.3", + "magento/module-gift-message-graph-ql": "100.4.2", + "magento/module-google-adwords": "100.4.2", + "magento/module-google-analytics": "100.4.1", + "magento/module-google-optimizer": "100.4.3", + "magento/module-graph-ql": "100.4.4", + "magento/module-graph-ql-cache": "100.4.1", + "magento/module-catalog-graph-ql": "100.4.4", + "magento/module-catalog-cms-graph-ql": "100.4.1", + "magento/module-catalog-url-rewrite-graph-ql": "100.4.3", + "magento/module-configurable-product-graph-ql": "100.4.4", + "magento/module-customer-graph-ql": "100.4.4", + "magento/module-eav-graph-ql": "100.4.2", + "magento/module-swatches-graph-ql": "100.4.3", + "magento/module-tax-graph-ql": "100.4.1", + "magento/module-url-rewrite-graph-ql": "100.4.3", + "magento/module-cms-url-rewrite-graph-ql": "100.4.2", + "magento/module-weee-graph-ql": "100.4.2", + "magento/module-cms-graph-ql": "100.4.2", + "magento/module-grouped-import-export": "100.4.2", + "magento/module-grouped-product": "100.4.4", + "magento/module-grouped-catalog-inventory": "100.4.1", + "magento/module-grouped-product-graph-ql": "100.4.4", + "magento/module-import-export": "101.0.4", + "magento/module-indexer": "100.4.4", + "magento/module-instant-purchase": "100.4.3", + "magento/module-integration": "100.4.4", + "magento/module-layered-navigation": "100.4.4", + "magento/module-login-as-customer": "100.4.4", + "magento/module-login-as-customer-admin-ui": "100.4.4", + "magento/module-login-as-customer-api": "100.4.3", + "magento/module-login-as-customer-assistance": "100.4.3", + "magento/module-login-as-customer-frontend-ui": "100.4.4", + "magento/module-login-as-customer-graph-ql": "100.4.1", + "magento/module-login-as-customer-log": "100.4.3", + "magento/module-login-as-customer-quote": "100.4.3", + "magento/module-login-as-customer-page-cache": "100.4.4", + "magento/module-login-as-customer-sales": "100.4.4", + "magento/module-media-content": "100.4.3", + "magento/module-media-content-api": "100.4.3", + "magento/module-media-content-catalog": "100.4.3", + "magento/module-media-content-cms": "100.4.3", + "magento/module-media-gallery": "100.4.3", + "magento/module-media-gallery-api": "101.0.3", + "magento/module-media-gallery-ui": "100.4.3", + "magento/module-media-gallery-ui-api": "100.4.2", + "magento/module-media-gallery-integration": "100.4.3", + "magento/module-media-gallery-synchronization": "100.4.3", + "magento/module-media-gallery-synchronization-api": "100.4.2", + "magento/module-media-content-synchronization": "100.4.3", + "magento/module-media-content-synchronization-api": "100.4.2", + "magento/module-media-content-synchronization-catalog": "100.4.2", + "magento/module-media-content-synchronization-cms": "100.4.2", + "magento/module-media-gallery-synchronization-metadata": "100.4.1", + "magento/module-media-gallery-metadata": "100.4.2", + "magento/module-media-gallery-metadata-api": "100.4.1", + "magento/module-media-gallery-catalog-ui": "100.4.2", + "magento/module-media-gallery-cms-ui": "100.4.2", + "magento/module-media-gallery-catalog-integration": "100.4.2", + "magento/module-media-gallery-catalog": "100.4.2", + "magento/module-media-gallery-renditions": "100.4.2", + "magento/module-media-gallery-renditions-api": "100.4.1", + "magento/module-media-storage": "100.4.3", + "magento/module-message-queue": "100.4.4", + "magento/module-msrp": "100.4.3", + "magento/module-msrp-configurable-product": "100.4.2", + "magento/module-msrp-grouped-product": "100.4.2", + "magento/module-multishipping": "100.4.4", + "magento/module-mysql-mq": "100.4.2", + "magento/module-new-relic-reporting": "100.4.2", + "magento/module-newsletter": "100.4.4", + "magento/module-newsletter-graph-ql": "100.4.1", + "magento/module-offline-payments": "100.4.3", + "magento/module-offline-shipping": "100.4.3", + "magento/module-page-cache": "100.4.4", + "magento/module-payment": "100.4.4", + "magento/module-payment-graph-ql": "100.4.0", + "magento/module-paypal": "101.0.4", + "magento/module-paypal-captcha": "100.4.2", + "magento/module-paypal-graph-ql": "100.4.2", + "magento/module-persistent": "100.4.4", + "magento/module-product-alert": "100.4.3", + "magento/module-product-video": "100.4.4", + "magento/module-quote": "101.2.4-p1", + "magento/module-quote-analytics": "100.4.4", + "magento/module-quote-bundle-options": "100.4.1", + "magento/module-quote-configurable-options": "100.4.1", + "magento/module-quote-downloadable-links": "100.4.1", + "magento/module-quote-graph-ql": "100.4.4", + "magento/module-related-product-graph-ql": "100.4.2", + "magento/module-release-notification": "100.4.2", + "magento/module-reports": "100.4.4", + "magento/module-require-js": "100.4.1", + "magento/module-review": "100.4.4", + "magento/module-review-graph-ql": "100.4.1", + "magento/module-review-analytics": "100.4.2", + "magento/module-robots": "101.1.1", + "magento/module-rss": "100.4.3", + "magento/module-rule": "100.4.3", + "magento/module-sales": "103.0.4-p1", + "magento/module-sales-analytics": "100.4.2", + "magento/module-sales-graph-ql": "100.4.4", + "magento/module-sales-inventory": "100.4.1", + "magento/module-sales-rule": "101.2.4", + "magento/module-sales-sequence": "100.4.2", + "magento/module-sample-data": "100.4.2", + "magento/module-search": "101.1.4", + "magento/module-security": "100.4.4", + "magento/module-send-friend": "100.4.3", + "magento/module-send-friend-graph-ql": "100.4.1", + "magento/module-shipping": "100.4.4", + "magento/module-sitemap": "100.4.3", + "magento/module-store": "101.1.4-p1", + "magento/module-store-graph-ql": "100.4.3", + "magento/module-swagger": "100.4.3", + "magento/module-swagger-webapi": "100.4.1", + "magento/module-swagger-webapi-async": "100.4.1", + "magento/module-swatches": "100.4.4", + "magento/module-swatches-layered-navigation": "100.4.1", + "magento/module-tax": "100.4.4", + "magento/module-tax-import-export": "100.4.4", + "magento/module-theme": "101.1.4", + "magento/module-theme-graph-ql": "100.4.2", + "magento/module-translation": "100.4.4", + "magento/module-ui": "101.2.4", + "magento/module-ups": "100.4.4", + "magento/module-url-rewrite": "102.0.3", + "magento/module-user": "101.2.4", + "magento/module-usps": "100.4.3", + "magento/module-variable": "100.4.2", + "magento/module-vault": "101.2.4", + "magento/module-vault-graph-ql": "100.4.1", + "magento/module-version": "100.4.1", + "magento/module-webapi": "100.4.3", + "magento/module-webapi-async": "100.4.2", + "magento/module-webapi-security": "100.4.2", + "magento/module-weee": "100.4.4", + "magento/module-widget": "101.2.4-p1", + "magento/module-wishlist": "101.2.4", + "magento/module-wishlist-graph-ql": "100.4.4", + "magento/module-wishlist-analytics": "100.4.3", + "magento/theme-adminhtml-backend": "100.4.4", + "magento/theme-frontend-blank": "100.4.4", + "magento/theme-frontend-luma": "100.4.4", + "magento/language-de_de": "100.4.0", + "magento/language-en_us": "100.4.0", + "magento/language-es_es": "100.4.0", + "magento/language-fr_fr": "100.4.0", + "magento/language-nl_nl": "100.4.0", + "magento/language-pt_br": "100.4.0", + "magento/language-zh_hans_cn": "100.4.0", + "magento/framework": "103.0.4-p1", + "magento/framework-amqp": "100.4.2-p1", + "magento/framework-bulk": "101.0.1", + "magento/framework-message-queue": "100.4.4", "trentrichardson/jquery-timepicker-addon": "1.4.3", "components/jquery": "1.11.0", "blueimp/jquery-file-upload": "5.6.14", "components/jqueryui": "1.10.4", "twbs/bootstrap": "3.1.0", "tinymce/tinymce": "3.4.7", - "magento/module-csp": "*", - "magento/module-aws-s3": "*", - "magento/module-remote-storage": "*", - "magento/module-jwt-framework-adapter": "*", - "magento/module-jwt-user-token": "*" + "magento/module-csp": "100.4.3", + "magento/module-aws-s3": "100.4.2", + "magento/module-remote-storage": "100.4.2", + "magento/module-jwt-framework-adapter": "100.4.1", + "magento/module-jwt-user-token": "100.4.0" }, - "conflict": { - "gene/bluefoot": "*" + "autoload-dev": { + "psr-4": { + "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/", + "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", + "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", + "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", + "Magento\\Tools\\": "dev/tools/Magento/Tools/", + "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/" + } }, + "prefer-stable": true, "extra": { "component_paths": { - "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", + "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", "components/jquery": [ "lib/web/jquery.js", "lib/web/jquery/jquery.min.js", "lib/web/jquery/jquery-migrate.js" ], - "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", "components/jqueryui": [ "lib/web/jquery/jquery-ui.js" ], + "tinymce/tinymce": "lib/web/tiny_mce_5", + "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", "twbs/bootstrap": [ "lib/web/jquery/jquery.tabs.js" - ], - "tinymce/tinymce": "lib/web/tiny_mce_5" - } - }, - "autoload": { - "psr-4": { - "Magento\\Framework\\": "lib/internal/Magento/Framework/", - "Magento\\Setup\\": "setup/src/Magento/Setup/", - "Magento\\": "app/code/Magento/" - }, - "psr-0": { - "": [ - "app/code/", - "generated/code/" ] - }, - "files": [ - "app/etc/NonComposerComponentRegistration.php" - ], - "exclude-from-classmap": [ - "**/dev/**", - "**/update/**", - "**/Test/**" - ] - }, - "autoload-dev": { - "psr-4": { - "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", - "Magento\\Tools\\": "dev/tools/Magento/Tools/", - "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/", - "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", - "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", - "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" } - }, - "prefer-stable": true + } } +
composer.lock+7 −7 modified@@ -4000,16 +4000,16 @@ }, { "name": "monolog/monolog", - "version": "2.3.5", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "shasum": "" }, "require": { @@ -4083,7 +4083,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.3.5" + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" }, "funding": [ { @@ -4095,7 +4095,7 @@ "type": "tidelift" } ], - "time": "2021-10-01T21:08:31+00:00" + "time": "2022-06-09T08:59:12+00:00" }, { "name": "mtdowling/jmespath.php", @@ -12785,5 +12785,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.1.0" }
dev/tests/integration/framework/Magento/TestFramework/ErrorLog/Logger.php+9 −2 modified@@ -9,6 +9,7 @@ use Magento\Framework\Logger\Monolog; use Monolog\Handler\HandlerInterface; +use Monolog\DateTimeImmutable; class Logger extends Monolog { @@ -43,6 +44,8 @@ public function __construct( } /** + * Clear messages + * * @return void */ public function clearMessages(): void @@ -51,6 +54,8 @@ public function clearMessages(): void } /** + * Get messages + * * @return array */ public function getMessages(): array @@ -64,19 +69,21 @@ public function getMessages(): array * @param int $level The logging level * @param string $message The log message * @param array $context The log context + * @param DateTimeImmutable $datetime Optional log date to log into the past or future * @return bool Whether the record has been processed */ public function addRecord( int $level, string $message, - array $context = [] + array $context = [], + DateTimeImmutable $datetime = null ): bool { if ($level <= $this->minimumErrorLevel) { $this->messages[] = [ 'level' => $this->getLevelName($level), 'message' => $message, ]; } - return parent::addRecord($level, $message, $context); + return parent::addRecord($level, $message, $context, $datetime); } }
dev/tests/integration/testsuite/Magento/Quote/Model/ShippingMethodManagementTest.php+8 −1 modified@@ -32,6 +32,7 @@ use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Quote\Model\GetQuoteByReservedOrderId; use PHPUnit\Framework\TestCase; +use Magento\Customer\Model\Session; /** * Test for shipping methods management @@ -319,10 +320,16 @@ public function testEstimateByAddressWithInclExclTaxAndVATGroup() $this->changeCustomerAddress($customer->getDefaultShipping()); $quote = $this->objectManager->get(GetQuoteByReservedOrderId::class)->execute('test01'); + $addressRepository = $this->objectManager->get(AddressRepositoryInterface::class); + $address = $addressRepository->getById(1); + $address->setIsDefaultShipping(true); + $customer->setAddresses([$address]); + $customerSession = $this->objectManager->get(Session::class); + $customerSession->loginById($customer->getId()); /** @var ShippingMethodManagementInterface $shippingEstimation */ $shippingEstimation = $this->objectManager->get(ShippingMethodManagementInterface::class); - $result = $shippingEstimation->estimateByAddressId($quote->getId(), $customer->getDefaultShipping()); + $result = $shippingEstimation->estimateByAddressId($quote->getId(), (int)$customer->getDefaultShipping()); $this->assertEquals(6.05, $result[0]->getPriceInclTax()); $this->assertEquals(5.0, $result[0]->getPriceExclTax());
lib/internal/GnuFreeFont/gpl-3.0.txt+674 −0 added@@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>.
lib/internal/Magento/Framework/Amqp/composer.json+10 −8 modified@@ -1,25 +1,27 @@ { "name": "magento/framework-amqp", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "100.4.2-p1", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0", "php-amqplib/php-amqplib": "~3.1.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\Amqp\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\Amqp\\": "" + } } } +
lib/internal/Magento/Framework/Amqp/Config.php+10 −10 modified@@ -23,20 +23,20 @@ class Config /** * Queue config key */ - const QUEUE_CONFIG = 'queue'; + public const QUEUE_CONFIG = 'queue'; /** * Amqp config key */ - const AMQP_CONFIG = 'amqp'; + public const AMQP_CONFIG = 'amqp'; - const HOST = 'host'; - const PORT = 'port'; - const USERNAME = 'user'; - const PASSWORD = 'password'; - const VIRTUALHOST = 'virtualhost'; - const SSL = 'ssl'; - const SSL_OPTIONS = 'ssl_options'; + public const HOST = 'host'; + public const PORT = 'port'; + public const USERNAME = 'user'; + public const PASSWORD = 'password'; + public const VIRTUALHOST = 'virtualhost'; + public const SSL = 'ssl'; + public const SSL_OPTIONS = 'ssl_options'; /** * Deployment configuration @@ -140,7 +140,7 @@ public function getValue($key) */ private function createConnection(): AbstractConnection { - $sslEnabled = trim($this->getValue(self::SSL)) === 'true'; + $sslEnabled = $this->getValue(self::SSL) && trim($this->getValue(self::SSL)) === 'true'; $options = new FactoryOptions(); $options->setHost($this->getValue(self::HOST)); $options->setPort($this->getValue(self::PORT));
lib/internal/Magento/Framework/Bulk/composer.json+10 −8 modified@@ -1,24 +1,26 @@ { "name": "magento/framework-bulk", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "101.0.1", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\Bulk\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\Bulk\\": "" + } } } +
lib/internal/Magento/Framework/composer.json+7 −5 modified@@ -9,6 +9,7 @@ "config": { "sort-packages": true }, + "version": "103.0.4-p1", "require": { "php": "~7.4.0||~8.1.0", "ext-bcmath": "*", @@ -35,7 +36,7 @@ "laminas/laminas-uri": "^2.9.1", "laminas/laminas-validator": "^2.15.0", "magento/zendframework1": "~1.15.0", - "monolog/monolog": "^2.3", + "monolog/monolog": "^2.7", "ramsey/uuid": "~4.2.0", "symfony/console": "~4.4.0", "symfony/process": "~4.4.0", @@ -55,11 +56,12 @@ "ext-imagick": "Use Image Magick >=3.0.0 as an optional alternative image processing library" }, "autoload": { - "psr-4": { - "Magento\\Framework\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\": "" + } } } +
lib/internal/Magento/Framework/DataObject.php+2 −1 modified@@ -120,6 +120,7 @@ public function unsetData($key = null) * @param string $key * @param string|int $index * @return mixed + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getData($key = '', $index = null) { @@ -128,7 +129,7 @@ public function getData($key = '', $index = null) } /* process a/b/c key as ['a']['b']['c'] */ - if (strpos($key, '/') !== false) { + if ($key !== null && strpos($key, '/') !== false) { $data = $this->getDataByPath($key); } else { $data = $this->_getData($key);
lib/internal/Magento/Framework/MessageQueue/composer.json+10 −8 modified@@ -1,24 +1,26 @@ { "name": "magento/framework-message-queue", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "100.4.4", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\MessageQueue\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\MessageQueue\\": "" + } } } +
lib/internal/Magento/Framework/Search/Request/Binder.php+1 −1 modified@@ -82,7 +82,7 @@ private function processDimensions($data, $bindData) private function processData($data, $bindData) { array_walk_recursive($bindData, function (&$item) { - $item = trim($item); + $item = $item !== null ? trim($item) : ''; }); $bindData = array_filter($bindData, function ($element) { return is_array($element) ? count($element) : strlen($element);
pub/errors/default/page.phtml+3 −1 modified@@ -3,12 +3,14 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:ignoreFile ?> <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title><?= $this->pageTitle ?></title> - <base href="<?= $this->getViewFileUrl() ?>" /> + <base href="<?= $this->escaper->escapeHtmlAttr($this->getViewFileUrl()) ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="*"/> <link rel="stylesheet" href="css/styles.css" type="text/css" />
pub/errors/processor.php+1 −1 modified@@ -595,7 +595,7 @@ private function redirectToBaseUrl() */ private function isReportIdValid(string $reportId): bool { - return (bool)preg_match('/[a-fA-F0-9]{64}/', $reportId); + return (bool)preg_match('/^[a-fA-F0-9]{64}$/', $reportId); } /**
setup/pub/fonts/opensans/LICENSE-2.0.txt+202 −0 added@@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-rg7p-wmgj-f374ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-34257ghsaADVISORY
- github.com/magento/magento2/commit/246d524b7586af2245092008e0d92b8d6fdd8523ghsaWEB
- github.com/magento/magento2/commit/5548bc64b5bc904346c0af9193a7fbb5274b4efaghsaWEB
- github.com/magento/magento2/commit/5f07eba878296a37bd5c3a2baecad48948547594ghsaWEB
- helpx.adobe.com/security/products/magento/apsb22-38.htmlghsaWEB
News mentions
0No linked articles in our index yet.