From e238bc16ef21c0746d9153fac9bdeba42022e9fe Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Mon, 22 Apr 2019 15:19:27 -0500 Subject: [PATCH 1/8] MAGETWO-98917: CMS block cache --- app/code/Magento/Cms/Block/Block.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/Magento/Cms/Block/Block.php b/app/code/Magento/Cms/Block/Block.php index d0d75ea691195..99c18c4913948 100644 --- a/app/code/Magento/Cms/Block/Block.php +++ b/app/code/Magento/Cms/Block/Block.php @@ -18,6 +18,11 @@ class Block extends AbstractBlock implements \Magento\Framework\DataObject\Ident */ protected $_filterProvider; + /** + * Prefix for cache key of CMS block + */ + const CACHE_KEY_PREFIX = 'CMS_BLOCK_'; + /** * Store manager * From 48ee8485de43ba36e947a6a4235a67a873fd428c Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Wed, 24 Apr 2019 13:47:12 -0500 Subject: [PATCH 2/8] MAGETWO-98917: CMS block cache --- app/code/Magento/Cms/Block/Block.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Cms/Block/Block.php b/app/code/Magento/Cms/Block/Block.php index 99c18c4913948..2ff740c9303b3 100644 --- a/app/code/Magento/Cms/Block/Block.php +++ b/app/code/Magento/Cms/Block/Block.php @@ -14,14 +14,14 @@ class Block extends AbstractBlock implements \Magento\Framework\DataObject\IdentityInterface { /** - * @var \Magento\Cms\Model\Template\FilterProvider + * Prefix for cache key of CMS block */ - protected $_filterProvider; + const CACHE_KEY_PREFIX = 'CMS_BLOCK_'; /** - * Prefix for cache key of CMS block + * @var \Magento\Cms\Model\Template\FilterProvider */ - const CACHE_KEY_PREFIX = 'CMS_BLOCK_'; + protected $_filterProvider; /** * Store manager From 25044047c2c0cc6b7ce0359b873c24881b0191df Mon Sep 17 00:00:00 2001 From: Dan Mooney Date: Wed, 1 May 2019 09:36:33 -0500 Subject: [PATCH 3/8] MAGETWO-99415: Update symfony/http-foundation --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index acdfe237272f1..59702984f7d57 100644 --- a/composer.lock +++ b/composer.lock @@ -8350,16 +8350,16 @@ }, { "name": "symfony/http-foundation", - "version": "v3.4.23", + "version": "v3.4.26", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "9a96d77ceb1fd913c9d4a89e8a7e1be87604be8a" + "reference": "90454ad44c95d75faf3507d56388056001b74baf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9a96d77ceb1fd913c9d4a89e8a7e1be87604be8a", - "reference": "9a96d77ceb1fd913c9d4a89e8a7e1be87604be8a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/90454ad44c95d75faf3507d56388056001b74baf", + "reference": "90454ad44c95d75faf3507d56388056001b74baf", "shasum": "" }, "require": { @@ -8400,7 +8400,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-02-23T15:06:07+00:00" + "time": "2019-04-17T14:51:18+00:00" }, { "name": "symfony/options-resolver", From db701a8925042546e4abee2757bd0ed8f3b72206 Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Wed, 1 May 2019 15:51:31 -0500 Subject: [PATCH 4/8] MAGETWO-99337: Fixed incorrect behavior of template variables --- lib/internal/Magento/Framework/Filter/Template.php | 1 + lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/internal/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php index 98b05baa739f7..af81c1d8182a9 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -72,6 +72,7 @@ class Template implements \Zend_Filter_Interface 'gettemplateprocessor', 'vardirective', 'delete', + 'getdatausingmethod' ]; /** diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php index 0dbd1c752f892..78ded81313669 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php @@ -259,6 +259,7 @@ public function disallowedMethods(): array ['getTemplateProcessor'], ['varDirective'], ['delete'], + ['getDataUsingMethod'] ]; } From e88ae4032cd0eb5e9f905dc416203919cc69639a Mon Sep 17 00:00:00 2001 From: Anthoula Wojczak Date: Tue, 23 Apr 2019 14:25:34 -0500 Subject: [PATCH 5/8] MAGETWO-98163: Email to a Friend updates - default config option - update integration tests with compatible config --- app/code/Magento/SendFriend/etc/config.xml | 2 +- .../SendFriend/Controller/Product/CustomerSendmailTest.php | 7 ++++++- .../Magento/SendFriend/Controller/SendmailTest.php | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/SendFriend/etc/config.xml b/app/code/Magento/SendFriend/etc/config.xml index d65e5a4a073dd..6239a4da591e2 100644 --- a/app/code/Magento/SendFriend/etc/config.xml +++ b/app/code/Magento/SendFriend/etc/config.xml @@ -9,7 +9,7 @@ - 1 + 0 0 5 diff --git a/dev/tests/integration/testsuite/Magento/SendFriend/Controller/Product/CustomerSendmailTest.php b/dev/tests/integration/testsuite/Magento/SendFriend/Controller/Product/CustomerSendmailTest.php index d464c51050834..aeedccbcd379c 100644 --- a/dev/tests/integration/testsuite/Magento/SendFriend/Controller/Product/CustomerSendmailTest.php +++ b/dev/tests/integration/testsuite/Magento/SendFriend/Controller/Product/CustomerSendmailTest.php @@ -17,6 +17,9 @@ use Magento\Framework\Message\MessageInterface; use Magento\Captcha\Helper\Data as CaptchaHelper; +/** + * Class CustomerSendmailTest + */ class CustomerSendmailTest extends AbstractController { /** @@ -58,6 +61,7 @@ protected function setUp() } /** + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php */ @@ -95,6 +99,7 @@ public function testExecute() * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php * @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form + * @magentoConfigFixture default_store sendfriend/email/enabled 1 */ public function testWithCaptchaFailed() { @@ -130,7 +135,7 @@ public function testWithCaptchaFailed() * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php * @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form - * + * @magentoConfigFixture default_store sendfriend/email/enabled 1 */ public function testWithCaptchaSuccess() { diff --git a/dev/tests/integration/testsuite/Magento/SendFriend/Controller/SendmailTest.php b/dev/tests/integration/testsuite/Magento/SendFriend/Controller/SendmailTest.php index a075398e9cdb7..5c2ddf86d6f96 100644 --- a/dev/tests/integration/testsuite/Magento/SendFriend/Controller/SendmailTest.php +++ b/dev/tests/integration/testsuite/Magento/SendFriend/Controller/SendmailTest.php @@ -26,6 +26,7 @@ class SendmailTest extends AbstractController * * @magentoDbIsolation enabled * @magentoAppIsolation enabled + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @magentoDataFixture Magento/SendFriend/_files/disable_allow_guest_config.php * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Catalog/_files/products.php From 51b021e590fa7d62358e64c38e49c347e6460b21 Mon Sep 17 00:00:00 2001 From: Anthoula Wojczak Date: Thu, 25 Apr 2019 14:03:51 -0500 Subject: [PATCH 6/8] MAGETWO-98163: Email to a Friend updates - add messaging to encourage CAPTCHA installation --- app/code/Magento/SendFriend/etc/adminhtml/system.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/SendFriend/etc/adminhtml/system.xml b/app/code/Magento/SendFriend/etc/adminhtml/system.xml index 785b7a8bb40c8..f655d07cde8e6 100644 --- a/app/code/Magento/SendFriend/etc/adminhtml/system.xml +++ b/app/code/Magento/SendFriend/etc/adminhtml/system.xml @@ -15,6 +15,9 @@ + + CAPTCHA solution alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> + Magento\Config\Model\Config\Source\Yesno From b229f4544962513ab89f070e74a9daf832a949cf Mon Sep 17 00:00:00 2001 From: Anthoula Wojczak Date: Mon, 29 Apr 2019 10:19:53 -0500 Subject: [PATCH 7/8] MAGETWO-98163: Email to a Friend updates - add translation --- app/code/Magento/SendFriend/etc/adminhtml/system.xml | 2 +- app/code/Magento/SendFriend/i18n/en_US.csv | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/SendFriend/etc/adminhtml/system.xml b/app/code/Magento/SendFriend/etc/adminhtml/system.xml index f655d07cde8e6..7889b58e125a9 100644 --- a/app/code/Magento/SendFriend/etc/adminhtml/system.xml +++ b/app/code/Magento/SendFriend/etc/adminhtml/system.xml @@ -13,7 +13,7 @@ Magento_Config::sendfriend - + CAPTCHA solution alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> diff --git a/app/code/Magento/SendFriend/i18n/en_US.csv b/app/code/Magento/SendFriend/i18n/en_US.csv index eee540c89a7b0..92c1c7bb42c60 100644 --- a/app/code/Magento/SendFriend/i18n/en_US.csv +++ b/app/code/Magento/SendFriend/i18n/en_US.csv @@ -45,3 +45,4 @@ Enabled,Enabled "Max Recipients","Max Recipients" "Max Products Sent in 1 Hour","Max Products Sent in 1 Hour" "Limit Sending By","Limit Sending By" +"We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." From 1c45d04829a52ffa5dac6a259fe25be17fb3464a Mon Sep 17 00:00:00 2001 From: Anthoula Wojczak Date: Mon, 29 Apr 2019 11:45:22 -0500 Subject: [PATCH 8/8] MAGETWO-98163: Email to a Friend updates - add translation --- app/code/Magento/SendFriend/i18n/en_US.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SendFriend/i18n/en_US.csv b/app/code/Magento/SendFriend/i18n/en_US.csv index 92c1c7bb42c60..0f55c57fd7586 100644 --- a/app/code/Magento/SendFriend/i18n/en_US.csv +++ b/app/code/Magento/SendFriend/i18n/en_US.csv @@ -45,4 +45,4 @@ Enabled,Enabled "Max Recipients","Max Recipients" "Max Products Sent in 1 Hour","Max Products Sent in 1 Hour" "Limit Sending By","Limit Sending By" -"We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." +"We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to install a CAPTCHA solution alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur."