Skip to content

Commit

Permalink
Merge pull request #94 from magento-commerce/1.1.15
Browse files Browse the repository at this point in the history
1.1.15 Release
  • Loading branch information
katmoon authored Jun 8, 2022
2 parents 9549002 + ae2796a commit 7efad5c
Show file tree
Hide file tree
Showing 17 changed files with 4,349 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/quality-patches",
"description": "Provides quality patches for Magento 2",
"type": "magento2-component",
"version": "1.1.14",
"version": "1.1.15",
"license": "proprietary",
"repositories": {
"repo": {
Expand Down
2 changes: 1 addition & 1 deletion magento_releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,6 @@
"2.3.0": {
"magento/magento2-base": "2.3.0",
"magento/magento2-ee-base": "2.3.0",
"magento/magento2-b2b-base": "1.1.1"
"magento/magento2-b2b-base": "1.1.0"
}
}
2 changes: 1 addition & 1 deletion patches-info.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions patches/commerce/MDVA-38559_2.4.1-p1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php b/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
index 6bdaa40019f..d3f8bcb8765 100644
--- a/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
+++ b/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
@@ -244,11 +244,21 @@ class CustomerPlugin
*/
public function afterGetList(CustomerRepositoryInterface $subject, SearchResults $searchResults): SearchResults
{
+ $customerEmails = [];
+
+ foreach ($searchResults->getItems() as $customer) {
+ $customerEmails[] = $customer->getEmail();
+ }
+
+ $collection = $this->collectionFactory->create();
+ $collection->addFieldToFilter('subscriber_email', ['in' => $customerEmails]);
+
foreach ($searchResults->getItems() as $customer) {
/** @var CustomerExtensionInterface $extensionAttributes */
$extensionAttributes = $customer->getExtensionAttributes();
-
- $isSubscribed = (int) $extensionAttributes->getIsSubscribed() === Subscriber::STATUS_SUBSCRIBED ?: false;
+ /** @var Subscriber $subscribe */
+ $subscribe = $collection->getItemByColumnValue('subscriber_email', $customer->getEmail());
+ $isSubscribed = $subscribe && (int) $subscribe->getStatus() === Subscriber::STATUS_SUBSCRIBED;
$extensionAttributes->setIsSubscribed($isSubscribed);
}

diff --git a/vendor/magento/module-newsletter/etc/extension_attributes.xml b/vendor/magento/module-newsletter/etc/extension_attributes.xml
index 09925024e97..5c38c02c032 100644
--- a/vendor/magento/module-newsletter/etc/extension_attributes.xml
+++ b/vendor/magento/module-newsletter/etc/extension_attributes.xml
@@ -8,10 +8,6 @@

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
<extension_attributes for="Magento\Customer\Api\Data\CustomerInterface">
- <attribute code="is_subscribed" type="boolean" >
- <join reference_table="newsletter_subscriber" reference_field="customer_id" join_on_field="entity_id">
- <field>subscriber_status</field>
- </join>
- </attribute>
+ <attribute code="is_subscribed" type="boolean"/>
</extension_attributes>
</config>

20 changes: 20 additions & 0 deletions patches/commerce/MDVA-40961_1.3.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/vendor/magento/module-bundle-requisition-list/view/frontend/layout/requisition_list_item_configure_type_bundle.xml b/vendor/magento/module-bundle-requisition-list/view/frontend/layout/requisition_list_item_configure_type_bundle.xml
index cf98eaf52fe7..f4e56332b325 100644
--- a/vendor/magento/module-bundle-requisition-list/view/frontend/layout/requisition_list_item_configure_type_bundle.xml
+++ b/vendor/magento/module-bundle-requisition-list/view/frontend/layout/requisition_list_item_configure_type_bundle.xml
@@ -43,12 +43,14 @@
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Select" name="product.info.bundle.options.select" as="select">
<arguments>
<argument name="tier_price_renderer" xsi:type="object">\Magento\Bundle\Block\DataProviders\OptionPriceRenderer</argument>
+ <argument name="validateQuantityViewModel" xsi:type="object">Magento\Bundle\ViewModel\ValidateQuantity</argument>
</arguments>
</block>
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Multi" name="product.info.bundle.options.multi" as="multi"/>
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio">
<arguments>
<argument name="tier_price_renderer" xsi:type="object">\Magento\Bundle\Block\DataProviders\OptionPriceRenderer</argument>
+ <argument name="validateQuantityViewModel" xsi:type="object">Magento\Bundle\ViewModel\ValidateQuantity</argument>
</arguments>
</block>
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Checkbox" name="product.info.bundle.options.checkbox" as="checkbox">

104 changes: 104 additions & 0 deletions patches/commerce/MDVA-43718_2.4.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
diff --git a/vendor/magento/module-shared-catalog/etc/webapi.xml b/vendor/magento/module-shared-catalog/etc/webapi.xml
index 5f06bc13cf..035874b695 100644
--- a/vendor/magento/module-shared-catalog/etc/webapi.xml
+++ b/vendor/magento/module-shared-catalog/etc/webapi.xml
@@ -10,85 +10,85 @@
<route url="/V1/sharedCatalog/:sharedCatalogId" method="GET">
<service class="Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface" method="get"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::list"/>
</resources>
</route>
<route url="/V1/sharedCatalog" method="POST">
<service class="Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface" method="save"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id" method="PUT">
<service class="Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface" method="save"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:sharedCatalogId" method="DELETE">
<service class="Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface" method="deleteById"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/" method="GET">
<service class="Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface" method="getList"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::list"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:sharedCatalogId/companies" method="GET">
<service class="Magento\SharedCatalog\Api\CompanyManagementInterface" method="getCompanies"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::list"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:sharedCatalogId/assignCompanies" method="POST">
<service class="Magento\SharedCatalog\Api\CompanyManagementInterface" method="assignCompanies"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:sharedCatalogId/unassignCompanies" method="POST">
<service class="Magento\SharedCatalog\Api\CompanyManagementInterface" method="unassignCompanies"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/products" method="GET">
<service class="Magento\SharedCatalog\Api\ProductManagementInterface" method="getProducts"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::list"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/assignProducts" method="POST">
<service class="Magento\SharedCatalog\Api\ProductManagementInterface" method="assignProducts"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/unassignProducts" method="POST">
<service class="Magento\SharedCatalog\Api\ProductManagementInterface" method="unassignProducts"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/categories" method="GET">
<service class="Magento\SharedCatalog\Api\CategoryManagementInterface" method="getCategories"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::list"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/assignCategories" method="POST">
<service class="Magento\SharedCatalog\Api\CategoryManagementInterface" method="assignCategories"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
<route url="/V1/sharedCatalog/:id/unassignCategories" method="POST">
<service class="Magento\SharedCatalog\Api\CategoryManagementInterface" method="unassignCategories"/>
<resources>
- <resource ref="Magento_SharedCatalog::sharedCatalog"/>
+ <resource ref="Magento_SharedCatalog::manage"/>
</resources>
</route>
</routes>
44 changes: 44 additions & 0 deletions patches/os/MDVA-38559_2.4.1-p1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php b/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
index 6bdaa40019f..d3f8bcb8765 100644
--- a/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
+++ b/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
@@ -244,11 +244,21 @@ class CustomerPlugin
*/
public function afterGetList(CustomerRepositoryInterface $subject, SearchResults $searchResults): SearchResults
{
+ $customerEmails = [];
+
+ foreach ($searchResults->getItems() as $customer) {
+ $customerEmails[] = $customer->getEmail();
+ }
+
+ $collection = $this->collectionFactory->create();
+ $collection->addFieldToFilter('subscriber_email', ['in' => $customerEmails]);
+
foreach ($searchResults->getItems() as $customer) {
/** @var CustomerExtensionInterface $extensionAttributes */
$extensionAttributes = $customer->getExtensionAttributes();
-
- $isSubscribed = (int) $extensionAttributes->getIsSubscribed() === Subscriber::STATUS_SUBSCRIBED ?: false;
+ /** @var Subscriber $subscribe */
+ $subscribe = $collection->getItemByColumnValue('subscriber_email', $customer->getEmail());
+ $isSubscribed = $subscribe && (int) $subscribe->getStatus() === Subscriber::STATUS_SUBSCRIBED;
$extensionAttributes->setIsSubscribed($isSubscribed);
}

diff --git a/vendor/magento/module-newsletter/etc/extension_attributes.xml b/vendor/magento/module-newsletter/etc/extension_attributes.xml
index 09925024e97..5c38c02c032 100644
--- a/vendor/magento/module-newsletter/etc/extension_attributes.xml
+++ b/vendor/magento/module-newsletter/etc/extension_attributes.xml
@@ -8,10 +8,6 @@

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
<extension_attributes for="Magento\Customer\Api\Data\CustomerInterface">
- <attribute code="is_subscribed" type="boolean" >
- <join reference_table="newsletter_subscriber" reference_field="customer_id" join_on_field="entity_id">
- <field>subscriber_status</field>
- </join>
- </attribute>
+ <attribute code="is_subscribed" type="boolean"/>
</extension_attributes>
</config>
26 changes: 26 additions & 0 deletions patches/os/MDVA-40896_2.4.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/vendor/magento/module-re-captcha-webapi-rest/Plugin/RestValidationPlugin.php b/vendor/magento/module-re-captcha-webapi-rest/Plugin/RestValidationPlugin.php
index fe434c8..3e85ef0 100644
--- a/vendor/magento/module-re-captcha-webapi-rest/Plugin/RestValidationPlugin.php
+++ b/vendor/magento/module-re-captcha-webapi-rest/Plugin/RestValidationPlugin.php
@@ -71,15 +71,17 @@ class RestValidationPlugin
* Validate ReCaptcha if needed.
*
* @param RequestValidator $subject
+ * @param callable $proceed
* @throws WebapiException
* @return void
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
- public function afterValidate(RequestValidator $subject): void
+ public function aroundValidate(RequestValidator $subject, callable $proceed): void
{
- $route = $this->restRouter->match($this->request);
- /** @var Endpoint $endpoint */
+ $request = clone $this->request;
+ $proceed();
+ $route = $this->restRouter->match($request);
$endpoint = $this->endpointFactory->create([
'class' => $route->getServiceClass(),
'method' => $route->getServiceMethod(),

Loading

0 comments on commit 7efad5c

Please sign in to comment.